Secure Payments API – Creating a Checking Account

This article talks about how to create a new bank account using the Secure Payments API. It's important to note that when you create, update, or delete payment profiles, you must use an OBO token for authorization and not the general API token.

Creating a Checking Account

Creates a new checking account and returns a token that is associated to the account. The token can be safely stored and submitted to all endpoints that work with checking accounts, without requiring re-submission of the account details. As with creating a credit card, a checking account requires an OBO Token.

Checking accounts can be either ACH accounts (based on the USA) or EFT accounts (Canada).

United States

Here's the JSON payload for a U.S. account:

{
"checking-account": {
"accountholder_name": "Artie Yamamoto",
"account_number": "428572978",
"routing_number": "124002971",
"bank_name": "WELLS FARGO BANK",
"eft_branch_number": "",
"eft_institution_number": "",
"address": "123 OAK LANE",
"city": "SCHENECTADY",
"country": "USA",
"zipcode": "12345",
"state": "NY",
"account_type": "checking"
}
}

Here's a breakdown of each field:

  • "checking-account" – This object nests all the other fields in the payload.
  • "accountholder_name" – The name associated with the bank account.
  • "routing_number" – The nine-digit routing number for the bank.
  • "bank_name" – The name of the bank where the account is held.
  • "eft_branch_number" – The five-digit EFT Branch Number for Canadian Accounts.
  • "eft_institution_number" – The three-digit EFT Institution Number for Canadian Accounts.
  • "address" – The accountholder's street address.
  • "city" – The city for the above address.
  • "country" – The address's three-character country code ("USA" for the U.S., "CAN" for Canada).
  • "zipcode" – The address's postal code.
  • "state" – The address's state (or province, if Canadian).
  • "account_type" – Either "savings" or "checking".

And the same request as a cURL request:

curl --request POST \
--url https://pciwallet.simnang.com/api/checking-account \
--header 'Content-Type: application/json' \
--header 'authorization: YOUR-OBO-TOKEN' \
--data '{
"checking-account": {
"accountholder_name": "Artie Yamamoto",
"account_number": "428572978",
"routing_number": "124002971",
"bank_name": "WELLS FARGO BANK",
"eft_branch_number": "",
"eft_institution_number": "",
"address": "123 OAK LANE",
"city": "SCHENECTADY",
"country": "USA",
"zipcode": "12345",
"state": "NY",
"account_type": "checking"
}
}'

Canada

Here's the request for a Canadian account:

{
"checking-account": {
"accountholder_name": "Brent Bump",
"account_number": "428572978",
"routing_number": "124002971",
"bank_name": "WELLS FARGO BANK",
"eft_branch_number": "98765",
"eft_institution_number": "567",
"address": "123 OAK LANE",
"city": "Toronto",
"country": "CAN",
"zipcode": "A1A 1A1",
"state": "ON",
"account_type": "checking"
}
}

And here it is as a cURL request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'authorization: your-token' -d '{
"checking-account": {
"accountholder_name": "Brent Bump",
"account_number": "428572978",
"routing_number": "124002971",
"bank_name": "WELLS FARGO BANK",
"eft_branch_number": "98765",
"eft_institution_number": "567",
"address": "123 OAK LANE",
"city": "Toronto",
"country": "CAN",
"zipcode": "A1A 1A1",
"state": "ON",
"account_type": "checking"
}
}}' 'https://pciwallet.simnang.com/api/checking-account'

Response

Whether the account is from the U.S. or Canada, the response will be a token:

{
"token": "CiCVDqG5QNK+ZhpBI3fNrwHkwiWdtqO5Nb1OQctzK3SzhRKnAQEBAwB4lQ6huUDSvmYaQSN3za8B5MIlnbajuTW9TkHLcyt0s4UAAAB+MHwGCSqGSIb3DQEHBqBvMG0CAQAwaAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyS/K03xVaq8dABBHUCARCAOxq6nsTzujWdDIxrPUMrOvxnFYSAGwdaSypPDezMXVjUzRGd5db77ax4Efki9rRSdTaAy5sENfAmV2Ft.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXUyJ9.eyJhZGRyZXNzIjoiMTIzIE9hayBMYW5lIiwidXBkYXRlZCI6MTQ1OTQ2MzI5MiwiY2l0eSI6IlByb3ZvIiwiYmFua19uYW1lIjoiV2VsbHMgRmFyZ28iLCJjcmVhdGVkIjoxNDU5NDYzMjkyLCJzdGF0ZSI6IlVUIiwiemlwY29kZSI6IjkwMjEwIiwiYWNjb3VudGhvbGRlcl9uYW1lIjoiU2FtcGxlIEFjY291bnQgSG9sZGVyIE5hbWUiLCJpZCI6MjEsImFkZHJlc3NfaWQiOjk3LCJ1c2VyX2lkIjo1LCJjb3VudHJ5IjoiQ0FOIiwiY3VzdG9tZXJfaWQiOm51bGx9.cuUDf2FLnUkqgOC8ViYm3DBBdRQkgNQyr40JEUYvzUs"}

To try it out in our demo API tenant, see our ReadMe page: Create Checking Account


How did we do?


Powered by HelpDocs (opens in a new tab)