Create Card Token
Create a card token
Create a secure tokenized representation of a card, for processing transactions without directly handling raw card data.
Note: Access to the Create Card API requires prior verification of your PCI Attestation of Compliance (AOC) by Platform. If you haven’t submitted your AOC or need assistance, please contact Platform Support at [email protected]
Endpoint
Sandbox
POST
https://gw.payengine.dev/api/cards
Production
POST
https://gw.payengine.co/api/cards
Request Body
card_number*
string
Card Number (PAN)
card_cvc
string
Card CVC/CVV
card_exp*
string
Card expiry in MM/YYYY
format
merchant_id
string
The Platform merchant ID. When provided, the token can only be used with this merchant.
card_holder
string
Name associated with this card
string
Cardholder's email. For 3DS transactions either email or phone is required.
phone_number.cc
string
Cardholder's phone Country Code (max 1-3 digits)
phone_number.subscriber
string
Cardholder's Phone Number (max 15 digits) For 3DS transactions either email or phone is required.
address_line1
string
Cardholder's billing address' line 1
address_line2
string
Cardholder's billing address' line 2
address_city
string
Cardholder's billing address' city
address_state
string
Cardholder's billing address' state
address_country
string
Cardholder's billing address' country
address_zip
string
Cardholder's billing address' zip
message
string
Result of the card creation
Required
data.env
string
prod | sandbox - Environment in which the card can be used
Required
data.token
string
Created card token
Required
data.card_data.id
string
Card ID
Required
data.card_data.merchant_id
string
Platform Merchant ID. If not provided in the request, it will be null
Required
data.card_data.name
string
Name associated with this card
Required
data.card_data.email
string
Email address associated with this card if provided in the request
Optional
data.card_data.exp_month
integer
Expiration month
Required
data.card_data.exp_year
integer
Expiration year
Required
data.card_data.last_4
integer
Last four digit of the card
Required
data.card_data.brand
string
Card brand
Required
data.card_data.country
string
Country where card issued
Required
data.card_data.type
string
Type of card - Credit | Debit | Gift | Prepaid
Required
data.card_data.surcharge_allowed
boolean
True | False. True if the surcharge is allowed for the card
Required
data.card_data.network_tokenize
boolean
True if the network tokenization is enabled for this card
data.card_data.address_line1
string
Address line 1 associated with Cardholder's billing address
Optional
data.card_data.address_line2
string
Address line 2 associated with Cardholder's billing address
Optional
data.card_data.address_city
string
City associated with Cardholder's billing address
Optional
data.card_data.address_state
string
State associated with Cardholder's billing address
Optional
data.card_data.address_zip
string
Zip code associated with the card
Optional
data.card_data.address_country
string
Country associated with Cardholder's billing address
Optional
data.phone_number.cc
string
Cardholder Phone Country Code
Optional
data.phone_number.subscriber
string
Cardholder Phone Number
Optional
data.card_updater
object
Card updater information details only when card account updater is enabled
Optional
data.card_updater.status
string
Values - enrolled | closed Required if the card_updater object is present
Required
data.card_updater.type
string
Values - updated, expired, closed, no_participating, contact_cardholder_advice, unknown, opt_out, enrolled Required if the card_updater object is present
Required
data.card_updater.enrolled_at
string
Timestamp indicating when the card was enrolled in the Card Account Updater service. Required if the card_updater object is present Note: This date is not the same as the token creation date
Required
data.card_updater.updated_at
string
Timestamp indicating when the last update was received. Required if the card_updater object is present
Required
{
"card_number": "4242424242424242",
"card_cvc": "453",
"card_exp": "10/2027",
"phone_number": {
"cc": "1",
"subscriber": "4155056227"
},
"card_holder": "John Doe",
"address_zip": "98104",
"address_line1": "100 Washington Street",
"address_line2": "Unit 120",
"address_country": "US",
"address_city": "San Mateo",
"address_state": "CA"
}
Last updated