Skip to main content

Create multiple accounts

This guide explains how to create additional accounts linked to one account holder.

Guide​

  1. Call the openAccount mutation with a user access token.
  2. Add the accountHolderId (line 4).
  3. Add the language parameter (optional) to select the account language. If not specified, English (en) is used as the default language (line 5).
  4. Add a name parameter (optional) for the account. If not specified, "My account" is used as the default name (line 6).
  5. Use the OpenAccountSuccessPayload payload (line 9) to specify the information you'd like to receive about the additional account.
  6. Include error handling for all rejection types defined in the OpenAccountPayload union (lines 26-73).

Mutation​

Open in API Explorer
mutation CreateAccount {
openAccount(
input: {
accountHolderId: "$ACCOUNT_HOLDER_ID"
language: en
name: "Taxes"
}
) {
... on OpenAccountSuccessPayload {
__typename
account {
BIC
IBAN
country
currency
id
language
name
paymentLevel
paymentAccountType
statusInfo {
status
}
}
}
... on InternalErrorRejection {
__typename
message
}
... on ForbiddenRejection {
__typename
message
}
... on AccountHolderNotFoundRejection {
__typename
message
}
... on AccountHolderTypeNotEligibleRejection {
__typename
message
}
... on AccountHolderStatusNotEligibleRejection {
__typename
message
}
... on AccountHolderVerificationStatusNotEligibleRejection {
__typename
message
}
... on AccountHolderAccountsTypeNotEligibleRejection {
__typename
message
}
... on AccountHolderAccountsStatusNotEligibleRejection {
__typename
message
}
... on AccountMembershipNotEligibleRejection {
__typename
message
}
... on AccountHolderProjectSettingsNotEligibleRejection {
__typename
message
}
... on AccountHolderAccountsCreationLimitRejection {
__typename
message
}
... on ProjectSettingsNotFoundRejection {
__typename
message
}
}
}

Payload​

The mutation returns all of the requested information such as the account details, the accountId (line 10) and the account status (line 16).

{
"data": {
"openAccount": {
"__typename": "OpenAccountSuccessPayload",
"account": {
"IBAN": "FR7699999001007663023512982",
"BIC": "SWNBFR22",
"currency": "EUR",
"country": "FRA",
"id": "9217e570-f785-4c88-be55-dc8b626ca8c7",
"language": "en",
"name": "Taxes",
"paymentLevel": "Unlimited",
"paymentAccountType": "PaymentService",
"statusInfo": {
"status": "Opened"
}
}
}
}
}

Check your account creation limit​

  1. Call the projectInfo query (line 2).
  2. Select multipleAccountsSettings (line 3).
  3. Add accountCreationLimit and canOpenAccount to check your account creation limit (lines 4-5).

Query​

Open in API Explorer
query AccountCreationLimit {
projectInfo {
multipleAccountsSettings {
accountCreationLimit
canOpenAccount
}
}
}

Payloads​

The multipleAccountsSettings query returns a payload that indicates the current status of the Multiple Accounts feature for an account holder.

Example one: Multiple Accounts is active

This payload shows the response when Multiple Accounts has not been activated.

  • accountCreationLimit: 1 indicates that only the initial account can be created (line 5).
  • canOpenAccount: false confirms that additional accounts cannot be created (line 6).
{
"data": {
"projectInfo": {
"multipleAccountsSettings": {
"accountCreationLimit": 1,
"canOpenAccount": false
}
}
}
}

Example two: Multiple Accounts is active

This payload shows the response when Multiple Accounts has been activated.

  • accountCreationLimit: 6 shows that a maximum of six accounts can be created (line 5).
  • canOpenAccount: true confirms that additional accounts can be opened (line 6).
{
"data": {
"projectInfo": {
"multipleAccountsSettings": {
"accountCreationLimit": 6,
"canOpenAccount": true
}
}
}
}