Add a Bank Account to a Profile
POST /customervault/v1/profiles/profile_id/achbankaccounts
The Customer Vault API allows you to store multiple bank accounts against your customer's profile. For billing purposes, each bank account can be associated to a different address, or all bank accounts can be associated to the same billing address, depending on your business needs.
To add a bank account to a profile and associate it to the address you just created, you must use the profile ID (716adb4f-6b85-4089-ba9c-d9c0eb649cd7 in the previous example) and make a POST request to the appropriate bank account endpoint of the relevant profile.
- ACH Bank Accounts – endpoint ends in achbankaccounts
- BACS Bank Accounts – endpoint ends in bacsbankaccounts
- EFT Bank Account – endpoint ends in eftbankaccounts
- SEPA Bank Accounts – endpoint ends in sepabankaccounts
- Mandates – endpoint ends in mandates
When you use the Customer Vault API to create a bank account, the newly created bank account becomes part of the profile that owns the profile ID and address ID (billingAddressId) you have used. The example below shows how to create an ACH bank account to add to a customer profile.
Before trying the example, you should replace the API key (after the -u) with the API key you have received and the profile ID and billingAddressId values with the values returned when you created an example profile and address respectively.
curl -X POST https://api.test.paysafe.com/customervault/v1/profiles/716adb4f-6b85-4089-ba9c-d9c0eb649cd7/achbankaccounts \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
"nickName": "John's RBC Business Bank Account",
"accountNumber": "511201",
"routingNumber": "123456789",
"accountHolderName": "XYZ Business",
"billingAddressId": "60022f38-fd17-4731-909c-923930d0d5d4",
"accountType": "CHECKING"
}'
Value | Required? | Type | Description |
---|---|---|---|
accountHolderName | Yes | string | The name of the customer or company that owns the bank account. |
accountNumber | Yes | string | The bank account number. |
accountType | Yes (ACH only) | enum | The bank account type:
|
bic | Yes (SEPA only) | string | The bank identification code. |
billingAddressId | Yes | string | The id returned when the address was created, to be associated with the bank account. |
iban | Yes (SEPA only) | string | The international bank account number. |
institutionId | Yes (EFT only) | string | The three-digit institution ID of the customer's bank. |
mandates | array | One or more mandates associated with the bank account (BACS and SEPA only). | |
merchantRefNum | string | A reference number created by the merchant. Stored by the Paysafe system, but with no effect on the request. | |
nickName | string | An alias for this bank account defined by the customer (for example, "John's account"). | |
routingNumber | Yes (ACH only) | string | For USD accounts, the customer bank's 9-digit routing number. |
sortCode | Yes (BACS only) | string | A six-digit code that identifies the customer's bank and branch. |
transitNumber | Yes (EFT only) | string | The five-digit code that identifies the customer's bank branch. |
{
"id": "6a275b7c-6f11-4ed1-ae77-21071724574a",
"status": "ACTIVE",
"nickName": "John's RBC Business Bank Account",
"routingNumber": "123456789",
"accountHolderName": "XYZ Business",
"billingAddressId": "60022f38-fd17-4731-909c-923930d0d5d4",
"accountType": "CHECKING",
"lastDigits": "01",
"paymentToken": "CNjEzMTM4NDg1"
}
Value | Type | Description |
---|---|---|
id | string | The unique bank account ID. |
status | string | The status of the request:
|
lastDigits | string | The last two digits of the bank account number. |
paymentToken | string | A token representing the bank account, which can be used in place of bank account information in Direct Debit transactions. |