API ReferenceSign In


Last updated 01/12/2022

Xendit Hosted Checkout (XenInvoice) is a free pre-built payment page that provides a seamless payment experience to you and your customers. XenInvoice holds all of your enabled payment method available, including PayLater.

To create PayLater as a payment method in your XenIvoice, there are two ways we provide:

  1. XenInvoice UI (from the Xendit Dashboard)
  2. XenInvoice API

XenInvoice UI

To create PayLater payments in the XenInvoice UI, follow these steps below:

  1. Ensure your Paylater channel is activated on the Invoice Configuration in the Xendit Dashboard

    Invoice Configuration in the Xendit Dashboard

  2. To make PayLater channel appear on your XenInvoice, when creating an invoice, ensure to select and fill in List Order Items in the Payment Information (even when the item is only one)

    Create Invoice in the Xendit Dashbord

  3. The PayLater channels activated will be there on your XenInvoice!

    PayLater as payment method in the XenInvoice

XenInvoice API

To create PayLater transaction using XenInvoice API, you need to include items parameter in the Create Invoice Request. Include these parameters inside:


  • name
  • quantity
  • price

Optional (required for Kredivo only)

  • category
  • url

Steps to create PayLater charge using XenInvoice API:

  1. Send a POST request to Create Invoice with the required parameters
  2. In the response, Xendit will return the PayLater option available in the XenInvoice

Sample request of creating PayLater using Invoice

    "external_id": "invoice-{{$timestamp}}",
    "amount": 1000000,
    "payer_email": "customer@xendit.co",
    "description": "Invoice Demo #123",
    "items": [
            "name": "Nymbus 2000",
            "quantity": 1,
            "price": 1000000,
            "category": "Sports",
            "url": "www.hogwarts.co/products/sports/nymbus-2000"

Sample Response of creating PayLater using XenInvoice API

  "id": "61c00865a5ed4737a9655593",
  "external_id": "invoice-1639975013",
  "user_id": "603f1c4172bbe840979fd408",
  "status": "PENDING",
  "merchant_name": "Hogwarts Sports Store",
  "merchant_profile_picture_url": "https://dfkinx.cloudfront.net/xendit.png",
  "amount": 1000000,
  "payer_email": "customer@xendit.co",
  "description": "Invoice Demo #123",
  "expiry_date": "2021-12-20T05:36:54.167Z",
  "invoice_url": "https://checkout.xendit.co/web/61c00865a5ed4737a9655593",
  "available_paylaters": [
      "paylater_type": "AKULAKU"
      "paylater_type": "KREDIVO"

Comprehensive API flow, request, and responses are available in our API Reference