Returns the status of the Session and related payment references.
Session Found
{
"payment_session_id": "ps-661f87c614802d6c402cd82d",
"created": "2021-12-31T23:59:59Z",
"updated": "2021-12-31T23:59:59Z",
"reference_id": "Alice",
"customer_id": "cust-e2878b4c-d57e-4a2c-922d-c0313c2800a3",
"session_type": "SAVE",
"currency": "IDR",
"amount": 0,
"country": "ID",
"mode": "PAYMENT_LINK",
"channel_properties": {},
"allowed_payment_channels": [
"OVO",
"DANA"
],
"expires_at": "2021-12-31T23:59:59Z",
"locale": "en",
"description": "Insurance Plan Registration",
"success_return_url": "https://yourcompany.com/success/example_item=my_item",
"cancel_return_url": "https://yourcompany.com/cancel/example_item=my_item",
"items": null,
"metadata": null,
"status": "ACTIVE",
"payment_link_url": "https://xen.to/kGxPCi60",
"payment_token_id": null,
"payment_request_id": null,
"business_id": "661f87c614802d6c402cd82d"
}
A unique identifier for the Payment Session
A reference to uniquely identify the Payment Session.
Xendit-generated Customer ID
The use case for Payment Session. SAVE: save the payment details from a customer for future payments. PAY: collects a one-time payment from a customer. AUTHORIZATION: authorize a card payment for a future capture. Only supported SAVE as session type for now.
The option to save the payment details from a customer for the PAY session_type. Saved payment details can be used for future payments. DISABLED: does not save the payment details. OPTIONAL: allows the customer to opt-in to save the payment details. FORCED: always save the payment details. For CARDS_SESSION_JS mode use case, the value of allow_save_payment_method must be FORCED if the merchant is sending it. This field can be omitted by the merchant, which means the payment method won't be saved.
ISO 4217 three-letter currency code for the payment.
The payment amount to be collected from the customer. For SAVE session_type, the amount must be 0.
ISO 3166-1 alpha-2 two-letter country code for the country of transaction.
The frontend integration mode for Payment Session. PAYMENT_LINK: redirect the customer to the Xendit Hosted Checkout page. COMPONENT: collect the payment details directly from the customer on your own page using Xendit Components. CARDS_SESSION_JS: collect payment details from customer with cards-session Javascript library. Only supported PAYMENT_LINK and CARDS_SESSION_JS as mode for now.
The type of “credential-on-file” / “card-on-file” / COF for future payments.
If you intend to use the card details for future COF transactions, you must be accurately indicate the card_on_file_type to allow Xendit to optimize the payment setup with the processor, which will help all future transactions using the same card details.
CUSTOMER_UNSCHEDULED: for future payments initiated by the customer that do not follow a schedule. For example, a simple “save card for future checkout” eCommerce flow, where the customer can use the saved card for future purchases any time.
MERCHANT_UNSCHEDULED: for future payments initiated without customer interaction and do not follow a schedule. For example, an auto top-up payment flow, where an application automatically collects payment when customer's balance is low.
RECURRING: for future payments initiated at fixed and regular intervals. For example, a subscription payment flow, where the customer is billed automatically every month.
For MERCHANT_UNSCHEDULED and RECURRING payments you are required to fill in the recurring_expiry and recurring_frequency inside the recurring_configuration. To process MERCHANT_UNSCHEDULED and RECURRING payments, there are some additional configuration required. For Aggregator Merchants, you need to be allowed to perform Recurring Payment you can enable this under https://dashboard.xendit.co/settings/payment-methods/cards-configuration. For Switcher Merchants, please check with your acquiring bank whether your MID allows non 3DS transactions and support recurring transactions by the acquirer.
For Switcher Merchants only. Specify the MID label to route the payment.
Specify the list of BINs that are allowed for the payment.
Defaults to false. Specify if 3DS should be skipped for the payment.
Specify the end date of the recurring charges or when the you will stop charging the stored payment token of the end user. It should be provided in a date format. For use cases like a lifetime membership, you can set the expiry date as far into the future as possible.
This parameter defines the interval between each charge date, measured in days. For example, for a monthly recurring charge, it's recommended to set the value to 28 days to cover the shortest month in the year. If a retry mechanism is in place (e.g., retrying the charge the next day), set the frequency to 1. For unscheduled merchant use cases, set the frequency to the nearest interval that matches the expected charge pattern.
Short descriptor that can be used as an identifier on the end user card statement. Subjected to support by issuers.
Specify the list of payment channels for your customer to select from the Xendit Hosted Checkout page. By default all payment channels will be available if you leave this field empty.
ISO 8601 date-time format. By default the Session will expire 30 minutes after creation. We recommend you to keep Sessions short-lived and create a new Session again only when the customer is ready to make payment.
ISO 639-1 two-letter language code for Hosted Checkout page.
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 Session. This text will be displayed on the Xendit Hosted Checkout page.
Specify the URL to redirect the customer after the session is completed or expired, or if the customer decide to stop the payment process. Must be HTTPS. For example: "https://yourcompany.com/example_item=my_example_item"
Specify the URL to redirect the customer after the session is completed or expired, or if the customer decide to stop the payment process. Must be HTTPS. For example: "https://yourcompany.com/example_item=my_example_item"
The status of the Payment Session.
The URL for Xendit Hosted Checkout page. Redirect your customer to this URL to complete the payment.
Xendit Payment Token ID used to reference the saved payment details from the customer.
Xendit Payment Request ID used to reference the payment made during this Session.
Bad Request
Unauthorized
Forbidden
Not Found
Client Side Bad Request Error
Internal Server Error
Server Side Error