Documentation Index

Fetch the complete documentation index at: https://docs.xendit.co/llms.txt

Use this file to discover all available pages before exploring further.

Subsequent merchant initiated transaction

Prev Next

Charge a Saved Card (Unscheduled)

Use this endpoint to charge a customer's stored card for off-session, merchant-initiated events where the billing schedule is unpredictable.

Request - POST /v3/payment requests

{
  "reference_id": "unscheduled_payment_123460",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 500000,
  "capture_method": "AUTOMATIC",
  "channel_properties": {
    "card_on_file_type": "MERCHANT_UNSCHEDULED",
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success",
    "transaction_sequence": "SUBSEQUENT"
  },
  "description": "Unscheduled transaction"
}

When to use this

  • Account Top-ups: Automatically adding funds when a user's wallet balance drops below a threshold.

  • Metered/Usage Billing: Charging at the end of a cycle based on consumption (e.g., cloud hosting, utilities).

  • Incidentals & Overages: Charging for post-service fees (e.g., car rental late fees, hotel room service).

Key parameters:

  • card_on_file_type: "MERCHANT_UNSCHEDULED"

    Signals to the card networks that this charge is triggered by your business logic rather than a fixed calendar subscription.

  • transaction_sequence: "SUBSEQUENT"

    Links this payment to the original customer-authenticated transaction. This ensures higher authorization success rates and bypasses interactive 3DS challenges while the customer is offline.

Charge a saved card (recurring)

Use this configuration to charge a customer's stored card for predictable, fixed-interval billing cycles.

Request - POST /v3/payment requests

{
  "reference_id": "subscription_payment_987654",
  "payment_token_id": "pt-90392f42-d98a-49ef-a7f3-abcezas123",
  "type": "PAY",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 500000,
  "capture_method": "AUTOMATIC",
  "channel_properties": {
    "card_on_file_type": "RECURRING",
    "transaction_sequence": "SUBSEQUENT",
    "failure_return_url": "https://xendit.co/failure",
    "success_return_url": "https://xendit.co/success"
  },
  "description": "Monthly subscription renewal"
}