Back to docs

Docs

Provider setup

Onboard Xendit, Midtrans, DOKU, and iPaymu today, then track Flip Business and Duitku as provider roadmap work.

Rute Bayar keeps provider behavior inside modular adapters. The current stable provider set includes Xendit, Midtrans, DOKU Checkout, and iPaymu.

rutebayar onboard xendit --environment sandbox
rutebayar onboard midtrans --environment sandbox
rutebayar onboard doku --client-id "$DOKU_CLIENT_ID" --secret-key "$DOKU_SECRET_KEY" --environment sandbox
rutebayar onboard ipaymu --va "$IPAYMU_VA" --api-key "$IPAYMU_API_KEY" --environment sandbox
rutebayar provider accounts
rutebayar provider test xendit
rutebayar provider test doku
rutebayar provider test ipaymu

Refund capability

Refunds are provider/channel capability-specific, not a universal feature across every provider.

  • Xendit and Midtrans have initial refund flows.
  • DOKU refunds are not enabled yet because they require Refund API/disbursement setup.
  • iPaymu refunds are not available yet because the public iPaymu API v2 does not expose an official verified refund endpoint. Treat it as unsupported until iPaymu provides an official endpoint and payload.

API mode (experimental)

rutebayar api <provider> lets you call provider official endpoints directly from the CLI.

Use cases:

  • Debug integration when adapter coverage is incomplete.
  • Validate provider response behavior before adding provider-specific adapter features.

Quick mapping:

ProviderAliasMethodPath
Midtransauth-test / auth / pingGET/v2/rute-bayar-auth-test/status
Midtransstatus / check-statusGET/v2/{order_id}/status
Midtranscharge / createPOST/v2/charge
Xenditauth-balance / balanceGET/balance
Xenditsession-create / createPOST/sessions
Xenditsession-status / statusGET/sessions/{session_id}
DOKUcheckoutPOST/checkout/v1/payment
DOKUcheckout-payment / checkout-v1-paymentPOST/checkout/v1/payment
DOKUorder-status / statusGET/orders/v1/status/{invoice_number_or_request_id}
DOKUdirect-debit-v1-token / post-direct-debit-v1-tokenPOST/direct-debit/v1/token
iPaymupayment-channels / channelsGET/api/v2/payment-channels
iPaymutransactionPOST/api/v2/transaction

Examples:

rutebayar api midtrans --operation status --path-param order_id=rb-demo-001
rutebayar api xendit --operation auth-balance
rutebayar api doku --operation checkout-payment --method POST --body '<doku_checkout_payload_json>'
rutebayar api doku --operation order-status --path-param invoice_number_or_request_id=INV-001
rutebayar api ipaymu --operation payment-channels --method GET

View the complete operation list with:

rutebayar api doku --help
rutebayar api xendit --help
rutebayar api midtrans --help

Notes:

  • If --operation has no match, call manually using --path.
  • This mode complements, not replaces, pay create/status.
  • Quick checks: 401/403 usually indicates credential or environment mismatch, 400 usually means invalid payload, and invalid_signature usually indicates DOKU signature/notification setup issues.

Provider roadmap:

  • Flip Business
  • Duitku

Each provider should preserve raw outbound request JSON, raw provider response JSON, inbound webhook JSON, and inbound webhook headers.