Bank Accounts
Bank Accounts are used to get money in and out of a Centrapay Account. Money is moved by creating "Top Up" or "Withdrawal" Funds Transfers .
Bank Accounts must be "direct debit authorized" before they can be used for a Top Up and they must be "verified" before top up funds are released. Bank Accounts do not require "direct debit authorization" or "verification" in order to perform a Withdrawal. A 4-digit code from any recent Centrapay-initiated bank transaction can be used to verify a bank account.
Bank Account Model
Attributes
-
id
string -
bankAccountNumber
string -
bankAccountName
string -
preferredBankAccountName
string -
accountId
string -
status
string -
verified
boolean -
type
string -
directDebitAuthority
object -
directDebitAuthorized
boolean -
approvals
array -
createdAt
timestamp -
modifiedAt
timestamp -
createdBy
crn -
modifiedBy
crn -
test
boolean -
enduringPaymentConsentAuthorized
boolean
Bank Account Type experimental
Types of bank accounts to allow access to different Asset Types .
Type | Description |
---|---|
centrapay | Allows topup and withdrawal of the centrapay.nzd asset type. |
quartz | Allows usage of the quartz.nzd asset type. |
Direct Debit Authority Model
A direct-debit authority is required to be able to Top Up a Bank Account. By including directDebitAuthority
, the user accepts our Direct Debit terms and has authority to operate this account.
Attributes
-
phoneNumber
string -
fullName
string -
emailAddress
string
Bank Account Approval Type Summary Model experimental
A summary of the Bank Account Approvals for a Bank Account. There is one object per type of Bank Account Approval, which provides a summary of the approval status.
Attributes
-
type
string -
status
string -
updatedAt
timestamp
Bank Account Balance Model experimental
The Bank Account balance, retrieved using Open Banking flows. The supported Bank Account type is quartz
.
Attributes
-
bankAccountId
string -
balance
bignumber -
currency
string
Create Bank Account
A Bank Account can be created with or without direct debit authorized. By including directDebitAuthority
, the user accepts our Direct Debit terms and has authority to operate this account.
phone
, fullName
and emailAddress
are all required to create a direct-debit authority. This is required to be able to Top Up a Bank Account.
Attributes
-
accountId
string required -
bankAccountNumber
string required -
bankAccountName
string required -
directDebitAuthority
object -
type
string -
test
boolean
Errors
-
BANK_ACCOUNT_LIMIT_EXCEEDED
403 -
BANK_ACCOUNT_HOLDER_LIMIT_EXCEEDED
403 -
DUPLICATE_BANK_ACCOUNT
403
curl -X POST \ https://service.centrapay.com/api/bank-accounts \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "directDebitAuthority": { "phoneNumber": "+64212345678", "fullName": "John Doe", "emailAddress": "john.doe@gmail.com" }}'
{ "id": "WRhAxxWpTKb5U7pXyxQjjY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "directDebitAuthorized": true, "status": "created", "verified": false, "type": "centrapay", "createdAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "modifiedAt": "2020-06-12T01:17:46.499Z", "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "approvals": []}
Add Direct Debit Authority to a Bank Account
By using this endpoint, the user accepts our Direct Debit terms and has authority to operate this account.
Attributes
-
phoneNumber
string required -
fullName
string required -
emailAddress
string required
Errors
-
DIRECT_DEBIT_ALREADY_AUTHORIZED
403 -
DIRECT_DEBIT_LIMIT_EXCEEDED
403
curl -X POST \ https://service.centrapay.com/api/bank-accounts/WRhAxxWpTKb5U7pXyxQjjY/direct-debit-authorities \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "phoneNumber": "+64212345678", "fullName": "John Doe", "emailAddress": "john.doe@gmail.com"}'
{ "id": "WRhAxxWpTKb5U7pXyxQjjY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "directDebitAuthorized": true, "status": "created", "verified": false, "type": "centrapay", "createdAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "modifiedAt": "2020-06-12T01:17:46.499Z", "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "approvals": []}
Get Bank Account
This endpoint allows you to retrieve information about a Bank Account.
curl -X GET \ https://service.centrapay.com/api/bank-accounts/WRhAxxWpTKb5U7pXyxQjjY \ -H 'x-api-key: <TOKEN>'
{ "id": "WRhAxxWpTKb5U7pXyxQjjY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "status": "created", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "directDebitAuthorized": false, "bankRegion": "nz", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "createdAt": "2022-07-18T02:26:39.477Z", "verified": false, "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "modifiedAt": "2022-07-18T02:26:39.477Z", "approvals": [ { "type": "account-information-consent", "status": "approved", "updatedAt": "2021-11-08T21:52:39.915Z" } ], "type": "quartz", "test": true}
Get Bank Account Balance experimental
This endpoint allows you to retrieve the balance of a Bank Account.
curl -X GET \ https://service.centrapay.com/api/accounts/Jaim1Cu1Q55uooxSens6yk/bank-account-balances \ -H 'x-api-key: <TOKEN>'
{ "items": [ { "bankAccountId": "b3f9ba1abff64775877d4a2fb073b123", "bankAccountNumber": "12-1234-1234567-123", "balance": "101.00", "availableBalance": "101.00", "test": true } ], "nextPageKey": "48a16140-24d2-4aec-b52f-a9d4f8f23876"}
Verify Bank Account
Verification codes show up on statements when a user makes withdrawals and deposits. To verify an account, you need to direct the user to make a Top Up or Withdrawal and then check their statement.
Attributes
-
verificationCode
string required
Errors
-
BANK_ACCOUNT_ALREADY_VERIFIED
403 -
VERIFICATION_CODE_INVALID
403 -
BANK_ACCOUNT_VERIFICATION_ATTEMPTS_EXCEEDED
403 -
ACCOUNT_MISMATCH
403
curl -X POST \ https://service.centrapay.com/api/bank-accounts/WRhAxxWpTKb5U7pXyxQjjY/verify \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "verificationCode": "1111"}'
{ "verificationCode": "1111"}
List Bank Accounts
This endpoint allows you to list the Bank Accounts for an account.
curl -X GET \ https://service.centrapay.com/api/accounts/Jaim1Cu1Q55uooxSens6yk/bank-accounts \ -H 'x-api-key: <TOKEN>'
[ { "id": "XZbPLViMzekVBbF7QMqgaY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "status": "created", "bankAccountNumber": "02-0500-0568903-097", "bankAccountName": "Pocket Money", "directDebitAuthorized": false, "bankRegion": "nz", "createdBy": "crn::user:57142ecc-e5e4-456a-8312-1fad4fdef3c7", "createdAt": "2022-04-19T05:43:40.425Z", "verified": false, "modifiedBy": "crn::user:57142ecc-e5e4-456a-8312-1fad4fdef3c7", "modifiedAt": "2022-04-19T05:43:40.425Z", "approvals": [], "type": "quartz", "test": true }, { "id": "3Kfdm8cuW1W6f8AoWJREs4", "accountId": "Jaim1Cu1Q55uooxSens6yk", "status": "created", "bankAccountNumber": "00-1213-1231299-999", "bankAccountName": "Jean", "directDebitAuthorized": false, "bankRegion": "nz", "createdBy": "crn::user:57142ecc-e5e4-456a-8312-1fad4fdef3c7", "createdAt": "2022-02-22T03:27:57.138Z", "verified": false, "modifiedBy": "crn::user:57142ecc-e5e4-456a-8312-1fad4fdef3c7", "modifiedAt": "2022-02-22T03:27:57.138Z", "approvals": [ { "type": "settlement", "status": "pending", "updatedAt": "2021-11-08T21:52:39.915Z" } ], "type": "centrapay" }]
Set Preferred Bank Account Name
Errors
-
INVALID_BANK_ACCOUNT_TYPE
403
curl -X POST \ https://service.centrapay.com/api/bank-accounts/WRhAxxWpTKb5U7pXyxQjjY/set-preferred-name \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "preferredBankAccountName": "Everyday Account"}'
{ "activityNumber": 1, "createdAt": "2020-06-12T01:17:46.499Z", "bankAccountId": "WRhAxxWpTKb5U7pXyxQjjY", "type": "set-preferred-bank-account-name", "preferredBankAccountName": "Everyday Account", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey"}
Archive Bank Account
Archives the supplied bank account. This endpoint is currently only supported for quartz
bank accounts.
curl -X POST \ https://service.centrapay.com/api/bank-accounts/b5URhAxxWpTKyxQjjY7pXW/archive \ -H 'x-api-key: <TOKEN>'
{ "id": "b5URhAxxWpTKyxQjjY7pXW", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "Jane Doe", "preferredBankAccountName": "Everyday Account", "balance": "123", "availableBalance": "100", "status": "archived", "verified": true, "directDebitAuthorized": true, "createdAt": "2020-06-12T01:17:46.499Z", "test": true}
Verify Bank Authority deprecated
If you're creating new interfaces, please work with Verify Bank Account .
Attributes
-
verificationCode
string required
Errors
-
BANK_ACCOUNT_ALREADY_VERIFIED
403 -
VERIFICATION_CODE_INVALID
403 -
BANK_ACCOUNT_VERIFICATION_ATTEMPTS_EXCEEDED
403 -
ACCOUNT_MISMATCH
403
curl -X POST \ https://service.centrapay.com/api/bank-authorities/WRhAxxWpTKb5U7pXyxQjjY/verify \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "verificationCode": "1111"}'
{ "verificationCode": "1111"}
List Bank Authorities deprecated
If you're creating new interfaces, please work with List Bank Accounts .
curl -X GET \ https://service.centrapay.com/api/bank-authorities \ -H 'x-api-key: <TOKEN>'
[ { "id": "WRhAxxWpTKb5U7pXyxQjjY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "status": "created", "verified": false, "directDebitAuthorized": true, "createdAt": "2020-06-12T01:17:46.499Z", "approvals": [] }, { "id": "b5URhAxxWpTKyxQjjY7pXW", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "Jane Doe", "status": "active", "verified": true, "directDebitAuthorized": true, "createdAt": "2020-06-12T01:17:46.499Z", "approvals": [ { "type": "settlement", "status": "pending", "updatedAt": "2021-11-08T21:52:39.915Z" } ] }]
Create Bank Authority deprecated
If you're creating new interfaces, please work with Create Bank Account .
Creating a Bank Authority both creates a new Bank Account and a direct debit authority. By using this endpoint, the user accepts our Direct Debit terms and has authority to operate this account.
Attributes
-
accountId
string required -
fullName
string required -
phoneNumber
string required -
emailAddress
string required -
bankAccountNumber
string required -
bankAccountName
string required
Errors
-
BANK_AUTHORITY_LIMIT_EXCEEDED
403 -
BANK_AUTHORITIES_FOR_BANK_ACCOUNT_EXCEEDED
403
curl -X POST \ https://service.centrapay.com/api/bank-authorities \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "fullName": "John Doe", "accountId": "Jaim1Cu1Q55uooxSens6yk", "phoneNumber": "+64212345", "emailAddress": "John.doe@email.com", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe"}'
{ "id": "WRhAxxWpTKb5U7pXyxQjjY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "status": "created", "verified": false, "directDebitAuthorized": true, "createdAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "modifiedAt": "2020-06-12T01:17:46.499Z", "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "approvals": []}
Get Bank Authority deprecated
If you're creating new interfaces, please work with Get Bank Account .
Errors
-
BANK_AUTHORITY_LIMIT_EXCEEDED
403 -
BANK_AUTHORITIES_FOR_BANK_ACCOUNT_EXCEEDED
403
curl -X GET \ https://service.centrapay.com/api/bank-authorities/WRhAxxWpTKb5U7pXyxQjjY \ -H 'x-api-key: <TOKEN>'
{ "id": "WRhAxxWpTKb5U7pXyxQjjY", "accountId": "Jaim1Cu1Q55uooxSens6yk", "bankAccountNumber": "12-1234-1234567-123", "bankAccountName": "John Doe", "status": "created", "directDebitAuthorized": true, "verified": false, "createdAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "modifiedAt": "2020-06-12T01:17:46.499Z", "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "approvals": []}