Sandbox testing

Drive payment outcomes with POST /sandbox/simulate.

Sandbox testing

POST /sandbox/simulate drives a sandbox payment link to a chosen outcome, then delivers the matching webhook exactly as production would.

Available only to sk_test_ keys. Production keys receive 403 (sandbox_only).

Request

curl -X POST https://stggateway-sandbox.momen.co/v1/sandbox/simulate \-H "Authorization: Bearer sk_test_YOUR_KEY" \-H "Content-Type: application/json" \-d '{  "payment_link_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",  "event": "paid",  "payment_method": "VA_BRI"}'
FieldRequiredNotes
payment_link_idyesUUID of a sandbox payment link
eventyespaid, failed, or expired
payment_methodnoDefaults to VA_BRI. One of VA_BRI, VA_BNI, VA_MANDIRI, VA_BSI, VA_BCA, VA_PERMATA, VA_CIMB, VA_DANAMON, VA_MAYBANK, QRIS

What each event does

eventLink statusWebhook
paidSettles to succeededpayment_link.succeeded
failedStays pending (still payable)None — status did not change
expiredMoves to expiredpayment_link.expired

Simulating against a link that is already terminal returns 409 (payment_link_terminal).

Transfers and account validation

Transfers and bank account validation need no simulate call. Use the dummy account numbers in Transfers.

Why not open checkout?

Sandbox checkout pages cannot be opened yet. /sandbox/simulate is the supported API for end-to-end tests without a payment provider.

Prefer a browser UI instead? Use the Sandbox Simulator — paste a payment code (no API key).

On this page