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

How payment sessions work

Prev Next

Our new Payment Session endpoints are crafted to simplify the process of collecting and managing payment method information for your business. This feature leverages our Xendit-hosted page to securely store end-user payment details, enabling future transactions with ease.

How it works:

  1. When your customer agrees to save their payment method for future charges, create a Payment Session API

  2. Redirect the customer to the payment link url provided in the session response

  3. The customer enters their payment method details on the Xendit-hosted page

  4. Xendit sends a webhook to your system when the payment method is successfully linked

  5. Save the Payment Token from the webhook. This token will be used for future transactions

  6. When it's time to charge the customer, trigger a Payment Request using the stored Payment Token (see this guideline)