Initiate the process of binding your customer's payment information as a reusable token.
The XenPlatform subaccount user id that will perform this transaction.
{
"reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
"customer_id": "cust-90392f42-d98a-49ef-a7f3-abcezas123",
"country": "ID",
"currency": "IDR",
"channel_code": "OVO",
"channel_properties": {
"failure_return_url": "https://xendit.co/failure",
"success_return_url": "https://xendit.co/success"
},
"description": "Description examples",
"metadata": {
"metametadata": "metametametadata"
}
}
{
"reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
"customer_id": "cust-b98d6f63-d240-44ec-9bd5-aa42954c4f48",
"country": "ID",
"currency": "IDR",
"channel_code": "OVO",
"channel_properties": {
"mid_label": "mid_label_acquirer_1",
"card_details": {
"masked_card_number": "2222444466668888",
"expiry_year": "2027",
"expiry_month": "12",
"cardholder_first_name": "First",
"cardholder_last_name": "Last",
"cardholder_email": "example@xendit.co",
"cardholder_phone_number": "+628000000000008"
},
"skip_three_ds": false,
"card_on_file_type": "CUSTOMER_UNSCHEDULED",
"failure_return_url": "https://xendit.co/failure",
"success_return_url": "https://xendit.co/success",
"billing_information": {
"first_name": "John",
"last_name": "Doe",
"email": "example@xendit.co",
"phone_number": "+628000000000008",
"city": "Singapore",
"country": "SG",
"postal_code": "644228",
"street_line1": "Merlion Bay Sands Suites",
"street_line2": "21-37",
"province_state": "Singapore"
},
"statement_descriptor": "Goods & Services",
"recurring_configuration": {
"recurring_expiry": "YYYY-MM-DD",
"recurring_frequency": 30
}
},
"description": "Description examples",
"metadata": {
"metametadata": "metametametadata"
}
}
Create payment token API request body
Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.
ISO 3166-1 alpha-2 two-letter country code for the country of transaction.
Xendit unique Capture ID generated as reference for the end user
Type of customer
Merchant provided identifier for the customer. Must be unique. Alphanumeric no special characters allowed
E-mail address of customer. Maximum length 50 characters
Mobile number of customer in E.164 format +(country code)(subscriber number)
Primary or first name/s of customer. Alphanumeric. No special characters is allowed.
Last or family name of customer. Alphanumeric. No special characters is allowed.
Country code for customer nationality. ISO 3166-1 alpha-2 Country Code
City or other relevant location for the customer birth place. Alphanumeric. No special characters is allowed.
Date of birth of the customer. Format: YYYY-MM-DD
Gender of customer
A Reference ID from merchants to identify their request.
ISO 4217 three-letter currency code for the payment.
Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.
Key-value entries for your custom data. You can specify up to 50 keys, with key names up to 40 characters and values up to 500 characters. This is for your convenience. Xendit will not use this data for any processing.
A custom description for the Payment Request.
Payment Token Initiated
{
"business_id": "5f27a14a9bf05c73dd040bc8",
"reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
"payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
"customer_id": "cust-90392f42-d98a-49ef-a7f3-abcezas123",
"country": "ID",
"currency": "IDR",
"channel_code": "OVO",
"channel_properties": {
"failure_return_url": "https://xendit.co/failure",
"success_return_url": "https://xendit.co/success"
},
"actions": [
{
"type": "REDIRECT_CUSTOMER",
"descriptor": "WEB_URL",
"value": "https://ewallet-mock-connector.xendit.co/v1/ewallet_connector/checkouts?token=ciqv4nkabidq0em86ofg"
}
],
"status": "REQUIRES_ACTION",
"token_details": {
"account_name": "John Doe",
"account_balance": "1000001",
"account_point_balance": "50000"
},
"description": "Description examples",
"metadata": {
"metametadata": "metametametadata"
},
"created": "2021-12-31T23:59:59Z",
"updated": "2021-12-31T23:59:59Z"
}
{
"payment_token_id": "pt-1402feb0-bb79-47ae-9d1e-e69394d3949c",
"business_id": "5f27a14a9bf05c73dd040bc8",
"reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
"customer_id": "cust-b98d6f63-d240-44ec-9bd5-aa42954c4f48",
"country": "ID",
"currency": "IDR",
"channel_code": "OVO",
"channel_properties": {
"mid_label": "mid_label_acquirer_1",
"card_details": {
"type": "CREDIT",
"issuer": "BRI",
"country": "ID",
"network": "VISA",
"fingerprint": "61f632879e9e27001a8165b9",
"masked_card_number": "2222XXXXXXXX8888",
"expiry_year": "2027",
"expiry_month": "12",
"cardholder_first_name": "First",
"cardholder_last_name": "Last",
"cardholder_email": "example@xendit.co",
"cardholder_phone_number": "+628000000000008"
},
"skip_three_ds": false,
"card_on_file_type": "CUSTOMER_UNSCHEDULED",
"failure_return_url": "https://xendit.co/failure",
"success_return_url": "https://xendit.co/success",
"billing_information": {
"first_name": "John",
"last_name": "Doe",
"email": "example@xendit.co",
"phone_number": "+628000000000008",
"city": "Singapore",
"country": "SG",
"postal_code": "644228",
"street_line1": "Merlion Bay Sands Suites",
"street_line2": "21-37",
"province_state": "Singapore"
},
"statement_descriptor": "Goods & Services",
"recurring_configuration": {
"recurring_expiry": "YYYY-MM-DD",
"recurring_frequency": 30
}
},
"actions": [
{
"type": "REDIRECT_CUSTOMER",
"descriptor": "WEB_URL",
"value": "https://xendit.co/"
}
],
"status": "ACTIVE",
"token_details": {
"authentication_data": {
"flow": "FULL_AUTH",
"a_res": {
"eci": "05",
"message_version": "02",
"authentication_value": "AUTHVAR",
"ds_trans_id": "sample_trans_id"
}
},
"authorization_data": {
"authorization_code": "A1B2C3",
"cvn_verification_result": "M",
"address_verification_result": "M",
"retrieval_reference_number": "akjsdiuh132127y9sacsdjn",
"network_response_code": "00",
"network_response_code_descriptor": "testing",
"network_transaction_id": "dahskjdhiquh341",
"acquirer_merchant_id": "alskdnuoqh341",
"reconciliation_id": "oiajsdo1823938yrh2"
}
},
"metadata": {
"metametadata": "metametametadata"
},
"created": "2029-12-31T23:59:59Z",
"updated": "2029-12-31T23:59:59Z"
}
Payment Token object
Xendit unique Payment Token ID generated as reference for reusable payment details of the end user.
Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.
ISO 3166-1 alpha-2 two-letter country code for the country of transaction.
Xendit-generated identifier for the business that owns the transaction
Xendit unique Capture ID generated as reference for the end user
A Reference ID from merchants to identify their request.
ISO 4217 three-letter currency code for the payment.
Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.
Actions object contains possible next steps merchants can take to proceed with payment collection from end user
The type of action that merchant system will need to handle to complete payment.
The type of action that merchant system will need to handle to complete payment.
The specific value that will be used by merchant to complete the action
Status of the payment token.
Account information provided by the payment method provider. Fields returned are dependent on what is made available by the provider.
Specific to cards transaction only. Details about the card authorization processing.
Authorization approval code from the scheme. 6 alphanumeric characters.
Whether CVN input matches with the issuer's data.
Whether the end user's address input matches with the issuer's data.
Receipt reference number communicated to the end user by their card issuer for this specific payment. This a commonly used reference number for the end users to raise tickets.
The response code returned by the scheme (Visa, Mastercard, JCB, China Unionpay or Amex).
Description of the response code.
Transaction ID received from the card scheme. Only available for merchants on switcher model.
Acquirer's record of the MID that was used to process this transaction. Only available for merchants on switcher model.
Acquirer's transaction record of the payment on their settlement statement. Only available for merchants on switcher model.
Specific to cards transaction only. Details about the card authentication.
Indicates the flow that was used for the 3DS authentication.
Details about the card authentication response from the 3DS server.
Payment system-specific value provided by the ACS or DS to indicate the results of the attempt to authenticate the Cardholder.
The 3DS protocol version which has been used to perform 3DS.
The result value from the 3DS transaction received from the ACS. This value is no longer present on responses after 45 days have passed after the authentication. Note that Mastercard and Visa use a different underlying format.
Universally unique transaction identifier assigned by the DS to identify a single transaction.
Name of the owner of the account bound to the token.
Balance of the account bound to the token.
Point balance of the account bound to the token.
Account number bound to the token.
Failure codes for payment tokens.
Key-value entries for your custom data. You can specify up to 50 keys, with key names up to 40 characters and values up to 500 characters. This is for your convenience. Xendit will not use this data for any processing.
A custom description for the Payment Request.
ISO 8601 date-time format.
ISO 8601 date-time format.
Bad request
Values in the payment request is not within expected range or expected configurations. Check the specific error message for debugging.
Fields or values in the payment request does not comply with our API specification. Check the specific error message for debugging.
Card expiry specified in the request should not be earlier than current month.
The payment details entered by the end user is invalid. Check the specific error message for debugging.
Payment token ID specified in the payment request has expired or has been cancelled. Please reinitiate linking before retrying.
Forbidden
Non 3DS payment request for cards is not allowed. Please activate the feature on Xendit dashboard before proceeding.
Merchant credentials met with an error with the provider. Please contact Xendit customer support to resolve this issue.
Payment token ID specified in the request was denied access by the payment method provider.
Conflict
Duplication is not allowed. Check specific error message for debugging.
The end user has already linked their account previously.
Internal server error
An unexpected error occured, our team has been notified and will troubleshoot the issue
Service unavailable
The channel requested is currently experiencing unexpected issues. The provider will be notified to resolve this issue.
The end user's payment method provider is currently experiencing unexpected issues. The provider will be notified to resolve this issue.