02. Create customer payment token
Create a card token for a customer, you should store the card token in your system and you can pay directly with the card token.
- Credit card as token.
- Alipay auto debit.
Header Parameters
random 16 bytes alphanumerics
Please follow the OpenAPI authentication section
Please follow the OpenAPI authentication section
Request Body
card object required
card details
card number
exp month
exp year
card nickname
holder_name
billing_address object
ISO 3166 Alpha 3
3ds object required
if 3ds verify successful redirect to this url
if 3ds verify fail redirect to this url
Possible values: [partial_split_shipment
, delayed_charges
, no_show
, recurring_payment
, unscheduled_cof
, unscheduled_cof_subsequent
]
alipay object
Possible values: [WEB
, WAP
, official_account
]
Possible values: [partial_split_shipment
, delayed_charges
, no_show
, recurring_payment
, unscheduled_cof
, unscheduled_cof_subsequent
]
wechat_pay object
Possible values: [WEB
, WAP
, official_account
]
微信认证code
微信openid
Possible values: [partial_split_shipment
, delayed_charges
, no_show
, recurring_payment
, unscheduled_cof
, unscheduled_cof_subsequent
]
- 200
Response Headers
Schema
data object required
payment_token object required
Possible values: [CreditCard
, Alipay
, Wechatpay
]
credit_card object
{
"error_code": "string",
"error_message": "string",
"data": {
"payment_token": {
"token_type": "CreditCard",
"token": "string",
"state": "string",
"verify_url": "string",
"verify_uuid": "string",
"credit_card": {
"number": "string",
"exp_month": "string",
"exp_year": "string",
"holder_name": "string",
"brand": "string"
}
}
}
}