Create multiple accounts
This guide explains how to create additional accounts linked to one account holder.
Guide
- Call the
openAccountmutation (line 2). - Include the
accountHolderId(line 4). - Add the
languageparameter (optional) to select the account language. If not specified, English (en) is used as the default language (line 5). - Add a
nameparameter (optional) for the account. If not specified, "My account" is used as the default name (line 6). - Use the
OpenAccountSuccessPayloadpayload (line 9) to specify the information you'd like to receive about the additional account. - Include error handling for all rejection types defined in the
OpenAccountPayloadunion (lines 26-73).
Mutation
Open in API Explorermutation 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
- Call the
projectInfoquery (line 2). - Select
multipleAccountsSettings(line 3). - Add
accountCreationLimitandcanOpenAccountto check your account creation limit (lines 4-5).
Query
Open in API Explorerquery 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:1indicates that only the initial account can be created (line 5).canOpenAccount:falseconfirms 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:6shows that a maximum of six accounts can be created (line 5).canOpenAccount:trueconfirms that additional accounts can be opened (line 6).
{
"data": {
"projectInfo": {
"multipleAccountsSettings": {
"accountCreationLimit": 6,
"canOpenAccount": true
}
}
}
}