The tokenization endpoint allows you to create tokens representing a Payment Card. These tokens can then be used to associate a 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 |
---|---|---|---|
name | string, required | John Smith | card holder name |
brand | string, optional | Visa | brand of card (visa, mastercard, amex) |
number | string, required | 4111111111111111 | card number |
address_line1 | string, optional | 123 Main St | billing address line 1 |
address_line2 | string, optional | Suite 300 | billing address line 2 |
address_postal_code | string, optional | M5H 3G8 | billing address postal code |
address_country | string, optional | CAN | billing address country |
address_city | string, optional | Toronto | billing address city |
address_state | string, optional | 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 wll 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 anticipates 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 |