Welcome to Xendit’s latest documentation. For legacy content, access the previous documentation here or the previous API reference here.

Create a payment request

Prev Next
Post
/v3/payment_requests

Initiate a payment request to collect payment(s) from your customer.

Security
HTTP
Type basic
Header parameters
api-version
string
Valid values[ "2024-11-11" ]
for-user-id
string

The XenPlatform subaccount user id that will perform this transaction.

with-split-rule
string

The XenPlatform split rule id that will be applied to this transaction.

Body parameters
Pay_Cards
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "CARDS",
  "channel_properties": {
    "mid_label": "mid_label_acquirer_1",
    "card_details": {
      "cvn": "246",
      "card_number": "2222444466668888",
      "expiry_year": "2027",
      "expiry_month": "12",
      "cardholder_first_name": "John",
      "cardholder_last_name": "Doe",
      "cardholder_email": "john@xendit.co",
      "cardholder_phone_number": "+661234567890"
    },
    "skip_three_ds": false,
    "card_on_file_type": "MERCHANT_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"
  }
}
Pay_Redirect
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "PH",
  "currency": "PHP",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "GCASH",
  "channel_properties": {
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
Pay_PresentToCustomer
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "QRIS",
  "channel_properties": {
    "expires_at": "2024-12-31T23:59:59Z"
  },
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
ReusablePaymentCode_PresentToCustomer
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "REUSABLE_PAYMENT_CODE",
  "country": "ID",
  "currency": "IDR",
  "capture_method": "AUTOMATIC",
  "channel_code": "QRIS",
  "channel_properties": {
    "expires_at": "2024-12-31T23:59:59Z"
  },
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
PayAndSave_Cards
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "customer": {
    "reference_id": "demo_1475801962607",
    "type": "INDIVIDUAL",
    "individual_detail": {
      "given_names": "John",
      "surname\"": "Doe"
    },
    "email": "example@xendit.co",
    "mobile_number": "+628000000000008"
  },
  "type": "PAY_AND_SAVE",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "CARDS",
  "channel_properties": {
    "mid_label": "mid_label_acquirer_1",
    "card_details": {
      "cvn": "246",
      "card_number": "2222444466668888",
      "expiry_year": "2027",
      "expiry_month": "12",
      "cardholder_first_name": "John",
      "cardholder_last_name": "Doe",
      "cardholder_email": "john@xendit.co",
      "cardholder_phone_number": "+661234567890"
    },
    "skip_three_ds": false,
    "card_on_file_type": "MERCHANT_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"
  }
}
PayAndSave_Redirect
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "customer": {
    "reference_id": "demo_1475801962607",
    "type": "INDIVIDUAL",
    "individual_detail": {
      "given_names": "John",
      "surname\"": "Doe"
    },
    "email": "example@xendit.co",
    "mobile_number": "+628000000000008"
  },
  "type": "PAY_AND_SAVE",
  "country": "PH",
  "currency": "PHP",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "MAYA",
  "channel_properties": {
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
PayWithToken_Cards
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "TH",
  "currency": "THB",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_properties": {
    "mid_label": "mid_label_acquirer_1",
    "skip_three_ds": false,
    "card_on_file_type": "CUSTOMER_UNSCHEDULED",
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success",
    "statement_descriptor": "Goods & Services"
  },
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
PayWithToken_Redirect
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_properties": {
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
PayWithToken_Autodebit
{
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  }
}
Expand All
OneOf
Payments_API_Pay
object (Payments_API_Pay)
reference_id
string Required

A reference ID from merchants to identify their request. For "CARDS" channel code, reference ID must be unique.

Min length1
Max length255
type
string Required

PAY: Create a payment request that is able to receive one payment.

Valid values[ "PAY" ]
country
string Required

ISO 3166-1 alpha-2 two-letter country code for the country of transaction.

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
ExampleID
currency
string Required

ISO 4217 three-letter currency code for the payment.

Valid values[ "IDR", "PHP", "VND", "THB", "SGD", "MYR", "USD" ]
ExampleIDR
request_amount
number Required

The intended payment amount to be collected from the end user.

Minimum0.0
Example10000
capture_method
string

AUTOMATIC: payment capture will be processed immediately after payment request is created. MANUAL: payment capture requires merchant's trigger via payment capture endpoint before being processed

Valid values[ "AUTOMATIC", "MANUAL" ]
Default"AUTOMATIC"
ExampleAUTOMATIC
channel_code
string Required

Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.

channel_properties
object (Payments_API_ChannelProperties) Required

Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.

description
string

A custom description for the Payment Request.

Min length1
Max length1000
ExamplePayment for your order #123
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
items
Array of object (Payments_API_XenditStandardItem)

Array of objects describing the item/s attached to the payment.

object
type

Type of item

Valid values[ "DIGITAL_PRODUCTS", "PHYSICAL_PRODUCT", "DIGITAL_SERVICE", "PHYSICAL_SERVICE", "FEES", "DISCOUNT" ]
name
string Required

Name of item

Min length1
Max length255
net_unit_amount
number Required

Net amount to be charged per unit. Must be a negative number when type = DISCOUNT

quantity
integer Required

Number of units of this item in the basket

Minimum1.0
url
string

URL of the item. Must be HTTPS or HTTP

image_url
string

URL of the image of the item. Must be HTTPS or HTTP

category
string

Category for item

Max length255
subcategory
string

Sub-category for item

Max length255
description
string

Description of item

Max length255
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
shipping_information
object (Payments_API_XenditStandardShippingInformation)
country

2-letter ISO 3166-2 country code for the customer’s shipping country

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
street_line1
string

Building name and apartment unit number

Min length1
Max length255
street_line2
string

Building street address

Min length1
Max length255
city
string

City, village or town as appropriate

Min length1
Max length255
province_state
string

Either one of (whichever is applicable): Geographic area, province, or region / Formal state designation within country

Min length1
Max length255
postal_code
string

Postal, zip or rural delivery code, if applicable

Min length1
Max length255
Payments_API_PayWithToken
object (Payments_API_PayWithToken)
reference_id
string Required

A reference ID from merchants to identify their request. For "CARDS" channel code, reference ID must be unique.

Min length1
Max length255
payment_token_id
string Required

Xendit unique Payment Token ID generated as reference for reusable payment details of the end user.

Examplept-cc3938dc-c2a5-43c4-89d7-7570793348c2
type
string Required

PAY: Create a payment request that is able to receive one payment.

Valid values[ "PAY" ]
country
string Required

ISO 3166-1 alpha-2 two-letter country code for the country of transaction.

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
ExampleID
currency
string Required

ISO 4217 three-letter currency code for the payment.

Valid values[ "IDR", "PHP", "VND", "THB", "SGD", "MYR", "USD" ]
ExampleIDR
request_amount
number Required

The intended payment amount to be collected from the end user.

Minimum0.0
Example10000
capture_method
string

AUTOMATIC: payment capture will be processed immediately after payment request is created. MANUAL: payment capture requires merchant's trigger via payment capture endpoint before being processed

Valid values[ "AUTOMATIC", "MANUAL" ]
Default"AUTOMATIC"
ExampleAUTOMATIC
channel_properties
object (Payments_API_ChannelProperties)

Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.

description
string

A custom description for the Payment Request.

Min length1
Max length1000
ExamplePayment for your order #123
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
items
Array of object (Payments_API_XenditStandardItem)

Array of objects describing the item/s attached to the payment.

object
type

Type of item

Valid values[ "DIGITAL_PRODUCTS", "PHYSICAL_PRODUCT", "DIGITAL_SERVICE", "PHYSICAL_SERVICE", "FEES", "DISCOUNT" ]
name
string Required

Name of item

Min length1
Max length255
net_unit_amount
number Required

Net amount to be charged per unit. Must be a negative number when type = DISCOUNT

quantity
integer Required

Number of units of this item in the basket

Minimum1.0
url
string

URL of the item. Must be HTTPS or HTTP

image_url
string

URL of the image of the item. Must be HTTPS or HTTP

category
string

Category for item

Max length255
subcategory
string

Sub-category for item

Max length255
description
string

Description of item

Max length255
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
shipping_information
object (Payments_API_XenditStandardShippingInformation)
country

2-letter ISO 3166-2 country code for the customer’s shipping country

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
street_line1
string

Building name and apartment unit number

Min length1
Max length255
street_line2
string

Building street address

Min length1
Max length255
city
string

City, village or town as appropriate

Min length1
Max length255
province_state
string

Either one of (whichever is applicable): Geographic area, province, or region / Formal state designation within country

Min length1
Max length255
postal_code
string

Postal, zip or rural delivery code, if applicable

Min length1
Max length255
Payments_API_ReusablePaymentCode
object (Payments_API_ReusablePaymentCode)
reference_id
string Required

A reference ID from merchants to identify their request. For "CARDS" channel code, reference ID must be unique.

Min length1
Max length255
type
string Required

REUSABLE_PAYMENT_CODE: Create one payment request that is able to receive multiple payments. This is only used for repeat use payment method like static QR, static OTC payment code or a predefined Virtual Account number.

Valid values[ "REUSABLE_PAYMENT_CODE" ]
country
string Required

ISO 3166-1 alpha-2 two-letter country code for the country of transaction.

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
ExampleID
currency
string Required

ISO 4217 three-letter currency code for the payment.

Valid values[ "IDR", "PHP", "VND", "THB", "SGD", "MYR", "USD" ]
ExampleIDR
request_amount
number

The intended payment amount to be collected from the end user.

Minimum0.0
Example10000
capture_method
string

AUTOMATIC: payment capture will be processed immediately after payment request is created. MANUAL: payment capture requires merchant's trigger via payment capture endpoint before being processed

Valid values[ "AUTOMATIC", "MANUAL" ]
Default"AUTOMATIC"
ExampleAUTOMATIC
channel_code
string Required

Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.

channel_properties
object (Payments_API_ChannelProperties) Required

Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.

description
string

A custom description for the Payment Request.

Min length1
Max length1000
ExamplePayment for your order #123
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
items
Array of object (Payments_API_XenditStandardItem)

Array of objects describing the item/s attached to the payment.

object
type

Type of item

Valid values[ "DIGITAL_PRODUCTS", "PHYSICAL_PRODUCT", "DIGITAL_SERVICE", "PHYSICAL_SERVICE", "FEES", "DISCOUNT" ]
name
string Required

Name of item

Min length1
Max length255
net_unit_amount
number Required

Net amount to be charged per unit. Must be a negative number when type = DISCOUNT

quantity
integer Required

Number of units of this item in the basket

Minimum1.0
url
string

URL of the item. Must be HTTPS or HTTP

image_url
string

URL of the image of the item. Must be HTTPS or HTTP

category
string

Category for item

Max length255
subcategory
string

Sub-category for item

Max length255
description
string

Description of item

Max length255
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
shipping_information
object (Payments_API_XenditStandardShippingInformation)
country

2-letter ISO 3166-2 country code for the customer’s shipping country

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
street_line1
string

Building name and apartment unit number

Min length1
Max length255
street_line2
string

Building street address

Min length1
Max length255
city
string

City, village or town as appropriate

Min length1
Max length255
province_state
string

Either one of (whichever is applicable): Geographic area, province, or region / Formal state designation within country

Min length1
Max length255
postal_code
string

Postal, zip or rural delivery code, if applicable

Min length1
Max length255
Payments_API_PayAndSave
object (Payments_API_PayAndSave)
reference_id
string Required

A reference ID from merchants to identify their request. For "CARDS" channel code, reference ID must be unique.

Min length1
Max length255
payment_token_id
string

Xendit unique Payment Token ID generated as reference for reusable payment details of the end user.

Examplept-cc3938dc-c2a5-43c4-89d7-7570793348c2
customer_id
string

Xendit unique Capture ID generated as reference for the end user

Max length41
Examplecust-b98d6f63-d240-44ec-9bd5-aa42954c4f48
customer
object (Payments_API_XenditStandardCustomer)
type
string Required

Type of customer

Valid values[ "INDIVIDUAL" ]
reference_id
string Required

Merchant provided identifier for the customer. Must be unique. Alphanumeric no special characters allowed

Min length1
Max length255
email
string (email)

E-mail address of customer. Maximum length 50 characters

Min length4
Max length50
mobile_number
string

Mobile number of customer in E.164 format +(country code)(subscriber number)

Min length1
Max length50
individual_detail
object (Payments_API_XenditStandardIndividualDetail) Required
given_names
string Required

Primary or first name/s of customer. Alphanumeric. No special characters is allowed.

Min length1
Max length50
surname
string

Last or family name of customer. Alphanumeric. No special characters is allowed.

Min length1
Max length50
nationality
string

Country code for customer nationality. ISO 3166-1 alpha-2 Country Code

Min length2
Max length2
place_of_birth
string

City or other relevant location for the customer birth place. Alphanumeric. No special characters is allowed.

Min length1
Max length60
date_of_birth
string

Date of birth of the customer. Format: YYYY-MM-DD

Min length10
Max length10
gender

Gender of customer

Valid values[ "MALE", "FEMALE", "OTHER" ]
type
string Required

PAY_AND_SAVE: Create a payment request that is able to receive one payment. If the payment is successful, a reusable payment token will be returned in the callback as saved payment information for subsequent payment requests.

Valid values[ "PAY_AND_SAVE" ]
country
string Required

ISO 3166-1 alpha-2 two-letter country code for the country of transaction.

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
ExampleID
currency
string Required

ISO 4217 three-letter currency code for the payment.

Valid values[ "IDR", "PHP", "VND", "THB", "SGD", "MYR", "USD" ]
ExampleIDR
request_amount
number Required

The intended payment amount to be collected from the end user.

Minimum0.0
Example10000
capture_method
string

AUTOMATIC: payment capture will be processed immediately after payment request is created. MANUAL: payment capture requires merchant's trigger via payment capture endpoint before being processed

Valid values[ "AUTOMATIC", "MANUAL" ]
Default"AUTOMATIC"
ExampleAUTOMATIC
channel_code
string Required

Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.

channel_properties
object (Payments_API_ChannelProperties) Required

Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.

description
string

A custom description for the Payment Request.

Min length1
Max length1000
ExamplePayment for your order #123
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
items
Array of object (Payments_API_XenditStandardItem)

Array of objects describing the item/s attached to the payment.

object
type

Type of item

Valid values[ "DIGITAL_PRODUCTS", "PHYSICAL_PRODUCT", "DIGITAL_SERVICE", "PHYSICAL_SERVICE", "FEES", "DISCOUNT" ]
name
string Required

Name of item

Min length1
Max length255
net_unit_amount
number Required

Net amount to be charged per unit. Must be a negative number when type = DISCOUNT

quantity
integer Required

Number of units of this item in the basket

Minimum1.0
url
string

URL of the item. Must be HTTPS or HTTP

image_url
string

URL of the image of the item. Must be HTTPS or HTTP

category
string

Category for item

Max length255
subcategory
string

Sub-category for item

Max length255
description
string

Description of item

Max length255
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
shipping_information
object (Payments_API_XenditStandardShippingInformation)
country

2-letter ISO 3166-2 country code for the customer’s shipping country

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
street_line1
string

Building name and apartment unit number

Min length1
Max length255
street_line2
string

Building street address

Min length1
Max length255
city
string

City, village or town as appropriate

Min length1
Max length255
province_state
string

Either one of (whichever is applicable): Geographic area, province, or region / Formal state designation within country

Min length1
Max length255
postal_code
string

Postal, zip or rural delivery code, if applicable

Min length1
Max length255
Responses
201

Payment Request Created

Pay_Cards
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "CARDS",
  "channel_properties": {
    "mid_label": "mid_label_acquirer_1",
    "card_details": {
      "masked_card_number": "222244XXXXXX8888",
      "cardholder_first_name": "John",
      "cardholder_last_name": "Doe",
      "cardholder_email": "john@xendit.co",
      "cardholder_phone_number": "+661234567890",
      "expiry_month": "12",
      "expiry_year": "2027",
      "fingerprint": "62397498595752001b9fdeba",
      "type": "CREDIT",
      "network": "VISA",
      "country": "ID",
      "issuer": "PT BANK CARDS"
    },
    "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",
      "value": "xendit.co/example",
      "descriptor": "WEB_URL"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
Pay_Redirect
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "DANA",
  "channel_properties": {
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "actions": [
    {
      "type": "REDIRECT_CUSTOMER",
      "value": "xendit.co/example",
      "descriptor": "WEB_URL"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
Pay_PresentToCustomer
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "BRI_VIRTUAL_ACCOUNT",
  "channel_properties": {
    "expires_at": "2024-12-31T23:59:59Z"
  },
  "actions": [
    {
      "type": "PRESENT_TO_CUSTOMER",
      "descriptor": "VIRTUAL_ACCOUNT_NUMBER",
      "value": "1251255"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
ReusablePaymentCode_PresentToCustomer
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "REUSABLE_PAYMENT_CODE",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "BRI_VIRTUAL_ACCOUNT",
  "channel_properties": {
    "expires_at": "2024-12-31T23:59:59Z"
  },
  "actions": [
    {
      "type": "PRESENT_TO_CUSTOMER",
      "descriptor": "VIRTUAL_ACCOUNT_NUMBER",
      "value": "1251255"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
PayAndSave_Cards
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "customer_id": "cust-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY_AND_SAVE",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "CARDS",
  "channel_properties": {
    "mid_label": "mid_label_acquirer_1",
    "card_details": {
      "masked_card_number": "222244XXXXXX8888",
      "cardholder_first_name": "John",
      "cardholder_last_name": "Doe",
      "cardholder_email": "john@xendit.co",
      "cardholder_phone_number": "+661234567890",
      "expiry_month": "12",
      "expiry_year": "2027",
      "fingerprint": "62397498595752001b9fdeba",
      "type": "CREDIT",
      "network": "VISA",
      "country": "ID",
      "issuer": "PT BANK CARDS"
    },
    "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",
      "value": "xendit.co/example",
      "descriptor": "WEB_URL"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
PayAndSave_Redirect
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "customer_id": "cust-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "DANA",
  "channel_properties": {
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "actions": [
    {
      "type": "REDIRECT_CUSTOMER",
      "value": "xendit.co/example",
      "descriptor": "WEB_URL"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
PayWithToken_Cards
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "CARDS",
  "channel_properties": {
    "mid_label": "mid_label_acquirer_1",
    "skip_three_ds": false,
    "card_on_file_type": "CUSTOMER_UNSCHEDULED",
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success",
    "statement_descriptor": "Goods & Services"
  },
  "actions": [
    {
      "type": "REDIRECT_CUSTOMER",
      "value": "xendit.co/example",
      "descriptor": "WEB_URL"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "shipping_information": {
    "city": "Singapore",
    "country": "SG",
    "postal_code": "644228",
    "street_line1": "Merlion Bay Sands Suites",
    "street_line2": "21-37",
    "province_state": "Singapore"
  },
  "items": [
    {
      "type": "PHYSICAL_PRODUCT",
      "name": "Vyson Dacuum Cleaner",
      "net_unit_amount": 10000.01,
      "quantity": 1
    }
  ],
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
PayWithToken_Redirect
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "DANA",
  "channel_properties": {
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "actions": [
    {
      "type": "REDIRECT_CUSTOMER",
      "value": "xendit.co/example",
      "descriptor": "WEB_URL"
    }
  ],
  "status": "REQUIRES_ACTION",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
PayWithToken_Autodebit
{
  "business_id": "5f27a14a9bf05c73dd040bc8",
  "reference_id": "90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "payment_request_id": "pr-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 10000.01,
  "capture_method": "AUTOMATIC",
  "channel_code": "CARDS",
  "channel_properties": {},
  "actions": [],
  "status": "SUCCEEDED",
  "description": "Description examples",
  "metadata": {
    "metametadata": "metametametadata"
  },
  "created": "2021-12-31T23:59:59Z",
  "updated": "2021-12-31T23:59:59Z"
}
Expand All
object

Payment request object

business_id
string

Xendit-generated identifier for the business that owns the transaction

Example5f27a14a9bf05c73dd040bc8
reference_id
string

A reference ID from merchants to identify their request. For "CARDS" channel code, reference ID must be unique.

Min length1
Max length255
payment_request_id
string

Xendit unique Payment Request ID generated as reference after creation of payment request.

Examplepr-1102feb0-bb79-47ae-9d1e-e69394d3949c
payment_token_id
string

Xendit unique Payment Token ID generated as reference for reusable payment details of the end user.

Examplept-cc3938dc-c2a5-43c4-89d7-7570793348c2
customer_id
string

Xendit unique Capture ID generated as reference for the end user

Max length41
Examplecust-b98d6f63-d240-44ec-9bd5-aa42954c4f48
latest_payment_id
string

Latest Payment ID linked to the payment request.

Examplepy-1402feb0-bb79-47ae-9d1e-e69394d3949c
type
string

The payment collection intent type for the payment request.

PAY: Create a payment request that is able to receive one payment.

PAY_AND_SAVE: Create a payment request that is able to receive one payment. If the payment is successful, a reusable payment token will be returned for subsequent payment requests.

REUSABLE_PAYMENT_CODE: Create a payment request that is able to receive multiple payments. This is only used for repeat use payment method like a static QR, a predefined OTC payment code or a predefined Virtual Account number.

Valid values[ "PAY", "PAY_AND_SAVE", "REUSABLE_PAYMENT_CODE" ]
country
string

ISO 3166-1 alpha-2 two-letter country code for the country of transaction.

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
ExampleID
currency
string

ISO 4217 three-letter currency code for the payment.

Valid values[ "IDR", "PHP", "VND", "THB", "SGD", "MYR", "USD" ]
ExampleIDR
request_amount
number

The intended payment amount to be collected from the end user.

Minimum0.0
Example10000
capture_method
string

AUTOMATIC: payment capture will be processed immediately after payment request is created. MANUAL: payment capture requires merchant's trigger via payment capture endpoint before being processed

Valid values[ "AUTOMATIC", "MANUAL" ]
Default"AUTOMATIC"
ExampleAUTOMATIC
channel_code
string

Channel code used to select the payment method provider. Use routing payment channels mapping for full list of channel codes.

channel_properties
object (Payments_API_ChannelProperties)

Data required to initiate transaction with payment method provider. Use routing payment channels mapping for full list of data required.

actions
Array of object (Payments_API_Actions)
object

Actions object contains possible next steps merchants can take to proceed with payment collection from end user

type

The type of action that merchant system will need to handle to complete payment.

Valid values[ "PRESENT_TO_CUSTOMER", "REDIRECT_CUSTOMER", "API_POST_REQUEST" ]
descriptor

The type of action that merchant system will need to handle to complete payment.

Valid values[ "CAPTURE_PAYMENT", "PAYMENT_CODE", "QR_STRING", "VIRTUAL_ACCOUNT_NUMBER", "WEB_URL", "DEEPLINK_URL", "VALIDATE_OTP", "RESEND_OTP" ]
value
string

The specific value that will be used by merchant to complete the action

status
string

Status of the payment request.

Valid values[ "ACCEPTING_PAYMENTS", "REQUIRES_ACTION", "AUTHORIZED", "CANCELED", "EXPIRED", "SUCCEEDED", "FAILED" ]
ExampleSUCCEEDED
failure_code
string

Failure codes for payments.

Valid values[ "ACCOUNT_ACCESS_BLOCKED", "INVALID_MERCHANT_SETTINGS", "INVALID_ACCOUNT_DETAILS", "PAYMENT_ATTEMPT_COUNTS_EXCEEDED", "USER_DEVICE_UNREACHABLE", "CHANNEL_UNAVAILABLE", "INSUFFICIENT_BALANCE", "ACCOUNT_NOT_ACTIVATED", "INVALID_TOKEN", "SERVER_ERROR", "PARTNER_TIMEOUT_ERROR", "TIMEOUT_ERROR", "USER_DECLINED_PAYMENT", "USER_DID_NOT_AUTHORIZE", "PAYMENT_REQUEST_EXPIRED", "FAILURE_DETAILS_UNAVAILABLE", "EXPIRED_OTP", "INVALID_OTP", "PAYMENT_AMOUNT_LIMITS_EXCEEDED", "OTP_ATTEMPT_COUNTS_EXCEEDED", "CARD_DECLINED", "DECLINED_BY_ISSUER", "ISSUER_UNAVAILABLE", "INVALID_CVV", "DECLINED_BY_PROCESSOR", "CAPTURE_AMOUNT_EXCEEDED ", "AUTHENTICATION_FAILED" ]
ExampleCARD_DECLINED
description
string

A custom description for the Payment Request.

Min length1
Max length1000
ExamplePayment for your order #123
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
items
Array of object (Payments_API_XenditStandardItem)

Array of objects describing the item/s attached to the payment.

object
type

Type of item

Valid values[ "DIGITAL_PRODUCTS", "PHYSICAL_PRODUCT", "DIGITAL_SERVICE", "PHYSICAL_SERVICE", "FEES", "DISCOUNT" ]
name
string

Name of item

Min length1
Max length255
net_unit_amount
number

Net amount to be charged per unit. Must be a negative number when type = DISCOUNT

quantity
integer

Number of units of this item in the basket

Minimum1.0
url
string

URL of the item. Must be HTTPS or HTTP

image_url
string

URL of the image of the item. Must be HTTPS or HTTP

category
string

Category for item

Max length255
subcategory
string

Sub-category for item

Max length255
description
string

Description of item

Max length255
metadata
object (Payments_API_MerchantMetadata)

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.

Example{ "my_custom_id": "merchant-123", "my_custom_order_id": "order-123" }
shipping_information
object (Payments_API_XenditStandardShippingInformation)
country

2-letter ISO 3166-2 country code for the customer’s shipping country

Valid values[ "ID", "PH", "VN", "TH", "SG", "MY" ]
street_line1
string

Building name and apartment unit number

Min length1
Max length255
street_line2
string

Building street address

Min length1
Max length255
city
string

City, village or town as appropriate

Min length1
Max length255
province_state
string

Either one of (whichever is applicable): Geographic area, province, or region / Formal state designation within country

Min length1
Max length255
postal_code
string

Postal, zip or rural delivery code, if applicable

Min length1
Max length255
created
string (date-time)

ISO 8601 date-time format.

Example2021-12-31T23:59:59Z
updated
string (date-time)

ISO 8601 date-time format.

Example2021-12-31T23:59:59Z
400

Bad request

OneOf
Payments_API_Http400InvalidValueError
object (Payments_API_Http400InvalidValueError)
error_code
string
Valid values[ "INVALID_VALUE_ERROR" ]
message
string

Values in the payment request is not within expected range or expected configurations. Check the specific error message for debugging.

Payments_API_Http400ApiValidationError
object (Payments_API_Http400ApiValidationError)
error_code
string
Valid values[ "API_VALIDATION_ERROR" ]
message
string

Fields or values in the payment request does not comply with our API specification. Check the specific error message for debugging.

Payments_API_Http400CardExpired
object (Payments_API_Http400CardExpired)
error_code
string
Valid values[ "CARD_EXPIRED" ]
message
string

Card expiry specified in the request should not be earlier than current month.

Payments_API_Http400InvalidPaymentDetails
object (Payments_API_Http400InvalidPaymentDetails)
error_code
string
Valid values[ "INVALID_PAYMENT_DETAILS" ]
message
string

The payment details entered by the end user is invalid. Check the specific error message for debugging.

Payments_API_Http400PaymentRequestRateLimited
object (Payments_API_Http400PaymentRequestRateLimited)
error_code
string
Valid values[ "PAYMENT_REQUEST_RATE_LIMITED" ]
message
string

Maximum number of requests to this payment channel has been exceeded in a given time frame.

Payments_API_Http400InvalidToken
object (Payments_API_Http400InvalidToken)
error_code
string
Valid values[ "INVALID_TOKEN" ]
message
string

Payment token ID specified in the payment request has expired or has been cancelled. Please reinitiate linking before retrying.

403

Forbidden

OneOf
Payments_API_Http403Skip3dsForbidden
object (Payments_API_Http403Skip3dsForbidden)
error_code
string
Valid values[ "SKIP_3DS_FORBIDDEN" ]
message
string

Non 3DS payment request for cards is not allowed. Please activate the feature on Xendit dashboard before proceeding.

Payments_API_Http403InvalidMerchantSettings
object (Payments_API_Http403InvalidMerchantSettings)
error_code
string
Valid values[ "INVALID_MERCHANT_SETTINGS" ]
message
string

Merchant credentials met with an error with the provider. Please contact Xendit customer support to resolve this issue.

Payments_API_Http403AccountAccessBlocked
object (Payments_API_Http403AccountAccessBlocked)
error_code
string
Valid values[ "ACCOUNT_ACCESS_BLOCKED" ]
message
string

Payment token ID specified in the request was denied access by the payment method provider.

409

Conflict

OneOf
Payments_API_Http409DuplicateError
object (Payments_API_Http409DuplicateError)
error_code
string
Valid values[ "DATA_NOT_FOUND" ]
message
string

Duplication is not allowed. Check specific error message for debugging.

Payments_API_Http409AccountAlreadyLinked
object (Payments_API_Http409AccountAlreadyLinked)
error_code
string
Valid values[ "ACCOUNT_ALREADY_LINKED" ]
message
string

The end user has already linked their account previously.

500

Internal server error

OneOf
Payments_API_Http500ServerError
object (Payments_API_Http500ServerError)
error_code
string
Valid values[ "SERVER_ERROR" ]
message
string

An unexpected error occured, our team has been notified and will troubleshoot the issue

503

Service unavailable

OneOf
Payments_API_Http503ChannelUnavailable
object (Payments_API_Http503ChannelUnavailable)
error_code
string
Valid values[ "CHANNEL_UNAVAILABLE" ]
message
string

The channel requested is currently experiencing unexpected issues. The provider will be notified to resolve this issue.

Payments_API_Http503IssuerUnavailable
object (Payments_API_Http503IssuerUnavailable)
error_code
string
Valid values[ "ISSUER_UNAVAILABLE" ]
message
string

The end user's payment method provider is currently experiencing unexpected issues. The provider will be notified to resolve this issue.