Create a Card Token
Creates a single-use token that represents a credit card’s details. This token can be used in place of a credit card information to create a charge. These tokens can be used only once: by creating a new transaction, or by attaching them to a Customer object. In most cases, you should use our recommended payments integrations.
POST
/v1/tokens
The above command returns JSON structured like this:
Arguments
Contain the card information to create the token.
card[number]
number
required
Contain the credit card number.
card[cvc]
number
required
Card security code. Highly recommended to always include this value, but it’s required only for accounts based in European countries.
card[exp_month]
number
required
Two-digit number representing the card’s expiration month.
card[exp_year]
int
required
Four-digit number representing the card’s expiration year.
card[name]
string
optional
Cardholder’s full name.
card[address_line1]
string
optional
Address line 1 (Street address / PO Box / Company name).
card[address_line2]
string
optional
Address line 2 (Apartment / Suite / Unit / Building).
card[address_city]
string
optional
City / District / Suburb / Town / Village.
card[address_state]
string
optional
State / County / Province / Region.
card[address_zip]
string
optional
ZIP or postal code.
card[address_country]
string
optional
Billing address country, if provided.
client_ip
string
optional
Client IP address
Returns
Returns the created card token if successful. Otherwise, this call raises an error.
Last updated