1. OnDemand
XL DCB API for Partner
  • Getting Started
    • Introduction
    • Authentication
    • Headers
    • Recurring (Subscription)
    • On-Demand (One-Time Charge)
    • Callbacks (Webhooks)
    • Errors & Response Codes
    • Notes (Partner Guidance)
  • Subscriptions
    • Create Subscription (Initiate)
      POST
    • Confirm OTP
      POST
    • Unsubscribe
      POST
  • OnDemand
    • Create one-time charge (OTP flow)
      POST
    • Confirm OTP (execute charge)
      POST
    • Check transaction status
      GET
  1. OnDemand

Create one-time charge (OTP flow)

POST
/partner-dcb/v1/on-demand/charges
Initiates one-time charge. Typical response is OTP required. TYK returns 202 with status OTP_REQUIRED/PENDING/SUCCESS/FAILED.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢202
application/json
Accepted (OTP required or processing)
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/partner-dcb/v1/on-demand/charges' \
--header 'Content-Type: application/json' \
--data '{
  "payment_method": "XL",
  "transaction_details": {
    "partner_ref_id": "e7971ce2-cb85-46b8-b193-1d269eef0a3b",
    "amount": 2220,
    "currency": "IDR"
  },
  "customer_details": {
    "msisdn": "6287000000000"
  },
  "item_details": {
    "id": "IM0001",
    "name": "MIA 2220",
    "description": "On-demand MIA 2000"
  }
}'
Response Response Example
{
    "success": true,
    "correlation_id": "80051975-0802-6e00-b63f-84710c7967bb",
    "code": "CHARGE_CREATED",
    "message": "Charge created successfully",
    "data": {
        "transaction_id": "A8847207-A233-4AC5-BBB2-8649990064BD",
        "partner_ref_id": "e7971ce2-cb85-46b8-b193-1d269eef0a3b"
    }
}
Modified at 2026-05-13 04:15:26
Previous
Unsubscribe
Next
Confirm OTP (execute charge)
Built with