Tokenizing Bank Accounts for Recurring ACH Payments
Introduction
Banking details can be tokenized either at the time of a transaction or via the /v1/tokens endpoint for re-use in a recurring payment or a "card on file" model.
Tokenize when Accepting Bank Details
In this use case, tokenization of bank account information occurs at the time of a successful transaction. This may be useful for collecting bank information during checkout and then storing it for later use.
By setting the the parameter tokenize=true
on the transaction API request, Preczn will return a token representing the bank account information if the transaction is a success.
- Endpoint:
/v1/transactions?tokenize=true
- Method:
POST
- Description: Tokenize a customer's bank details for a merchant for re-use.
- Parameters:
tokenize
: TRUE.
Step 2: Tokenize Bank Details directly without a transaction
In this use case, bank account information is tokenized independent of transaction. This may be useful if your application asks for ACH information to be stored or updated in the users profile independent of individual transactions.
- Endpoint:
https://api.preczn.com/v1/tokens
- Method:
POST
- Description: Securely convert the bank details into a token.
- Parameters:
type
: Must be set tobankAccount
to indicate saving a bank tokenbankAccount
- Bank Account objecttype
: (enumeration) Specifies the type of bank account (e.g.,personalChecking
,personalSavings
,corporateChecking
,corporateSavings
).account
: (string) The bank account number for the transaction.routing
: (string) The routing number of the bank.bankCountry
: (enumeration) currently we only supportUSA
bank accounts. Please reach out to us if you require support for additional countries.
{
"type": "bankAccount",
"bankAccount": {
"type": "personalChecking",
"account" : "123456789",
"routing" : "123456789",
"bankCountry" : "USA"
},
"merchantId": "mid_5ptw6a9dd8brzz5qw2b7xqkt1"
}
{
"token": "tkn_5ptw6a9dd8brzz5qw2b7xqkt1",
"type": "bank",
"createdDate": "2023-02-22T15:35:57Z",
"modifiedOn": "2023-02-22T15:35:57Z",
"merchant": "mid_5ptw6a9dd8brzz5qw2b7xqkt1",
"bank": {
"type": "personalChecking",
"account" : "*****6789",
"routing" : "123456789",
"bankCountry" : "US"
}
}
Updated 7 months ago