The tokenization endpoint allows you to create tokens representing a Payment Card or Bank Account. These tokens can then be used to associate a Bank Account or Payment Card to an Account Holder.
The Tokenization endpoint should only be used for testing purposes, and instead the Berkeley client JavaScript library can be used to create tokens in order to reduce your PCI scope.
Note: When using the Tokenization endpoint you should use the Token
API Key. As this key can be exposed in client side applications.
Create a Payment Card Token
This endpoint allows you to create a token that is specific for a Financial Account
or a payment card (i.e., credit, debit).
Request
Note that all fields must be present in the request. Some field values are optional.
Field | Type | Value | Description | |
---|---|---|---|---|
card | object | Contains card fields and values for tokenization | ||
name | string, required | John Smith | card holder name | |
brand | string, required | visa | brand of card (visa, mastercard, amex), must be lowercase | |
number | string, required | 4111111111111111 | card number | |
address_line1 | string, required | 123 Main St | billing address line 1 | |
address_line2 | string, optional | Suite 300 | billing address line 2 | |
address_postal_code | string, required | M5H 3G8 | billing address postal code | |
address_country | string, required | CAN | billing address country | |
address_city | string, required | Toronto | billing address city | |
address_state | string, required | ON | billing address state/region/province | |
expiry_month | string, see notes below [1] | 12 | card expiry month, 2 digits | |
expiry_year | string, see notes below [1] | 2022 | card expiry year, 4 digits | |
cvv | string, see notes below [1] | 123 | security code, 3 or 4 digits |
[1]: If you tokenize a card that will be used as a source of funds in a Pull transaction (i.e., Prepaid Load, P2P Transfer), expiry_month
and expiry_year
are required. If you tokenize a card that will be used to receive funds in a Push transaction (i.e., Funds disbursements), expiry_month
, expiry_year
, and cvv
are optional (the only exception is for the U.S., where expiry_month
and expiry_year
are required).
Response
Field name | Type | Value | Description |
---|---|---|---|
type | string | payment_card or bank_account | The type of financial account being tokenized |
token | (alphanumeric) | random key | encrypted card token |
risk_level | string | low; medium; high | Card risk level based on CVV, AVS and Watchlist - Berkeley Use Only (Beta) |
push_funds_enabled | boolean | true; false | If the recipient's card accepts real-time deposits or not. If not, the funds will be deposited in 24-48hr |
name | string | John Smith | The full name of the sender or recipient |
last_four_digits | number | 3647 | The last 4-digits of the card PAN; also used for easily identifying the card |
expiry_year | number | 2022 | The expiry year of the card (YYYY) |
expiry_months | number | month | The expiry month of the card (MM) |
currency | string | CAD, USD | The currency code used for the transaction - 3-char value |
card_holder_type | string | consumer; business | The type of card used by the sender or recipient in the transaction |
brand | string | visa; mastercard | The card brand used in the transaction |
bin | string | 6 digits | Bin number of issuer |
card_product_name | string | Visa Corporate | The name of the card product |
card_subtype_code | string | Reloadable; Non-Reloadable | The type of Prepaid card |
funding_type | string | credit; debit; prepaid | The type of card used for the transaction |
issuer_name | string | BANCO AGROMERCANTIL DE GUATEMALA S.A. | The name of the Bank issuer |
issuer_country_code | string | CAN, USA; ESP | Issuing country code - 3-char value |
fast_funds_enabled | boolean | true; false | Whether or not the Recipient issuer participates in Fast Funds |
cvv_check_status | string | pass; fail; unchecked; unavailable | See Berkeley Client Services wiki for detailed description - Fraud Prevention |
avs_check_status | string | pass; fail; unchecked; unavailable | See Berkeley Client Services wiki for detailed description - Fraud Prevention |
address_state | string | ON, BC, AB | Billing address province associated with the card (2-char) |
address_postal_code | alphanumeric | M5H3G8 | Canadian postal code or US ZIP code |
address_line1 | string | 123 Main St. | Street number and street name |
address_line2 | string | Suite 300 | Apartment number or suite number |
address_country | string | CAN, USA; ESP | Billing address country code |
address_city | string | Toronto | Billing address city |
Create a Bank Account Token
This endpoint allows you to create a token that is specific for a Financial Account
or a bank account (i.e., credit, debit).
Request
Note that all fields must be present in the request. Some field values are optional.
Field | Type | Value | Description |
---|---|---|---|
account_number | string, required | 12341234 | Bank Account Number, between 7 and 12 digits. |
transit_number | string, required | 12345 | Bank Account Transit Number |
institution_number | string, required | 001 | Bank Account Institution |
account_holder_name | string, required | John Smith | Account Holder Name |
currency | string, required | CAN, USD | Bank Account Currency |
country | string, required | CAN, USA | Country of Bank Account |
Response
Field name | Type | Value | Description |
---|---|---|---|
account_number | string, required | 12341234 | Bank Account Number |
transit_number | string, required | 12345 | Bank Account Transit Number |
institution_number | string, required | 001 | Bank Account Institution |
account_holder_name | string, required | John Smith | Account Holder Name |
currency | string, required | CAN, USD | Bank Account Currency |
country | string, required | CAN, USA | Country of Bank Account |
last_four_digits | string, required | 1234 | Last Four Digits of Account Number |
risk_level | string | low; medium; high | Card risk level based on CVV, AVS and Watchlist - Berkeley Use Only (Beta) |
token | (alphanumeric) | random key | encrypted bank account token |
type | string | payment_card or bank_account | The type of financial account being tokenized |
Create a Email or Phone Number Token
This endpoint allows you to create a token that is specific for a email address or phone number.
Request
Note that all fields must be present in the request. Some field values are optional.
Field | Type | Value | Description | |
---|---|---|---|---|
etransfer | object | Contains etransfer fields and values for tokenization | ||
Field | Type | Value | Description | |
name | string, required | John Smith | Account Holder Name | |
string | [email protected] | Account Holder Email | ||
phone_number | string | 5559992255 | Account Holder Phone Number |
Response
Field name | Type | Value | Description |
---|---|---|---|
token | string, required | ettk_BY-HbLvFocbzF8O23EF4E37121688FE9D | Token representing the email or phone number |