Skip to main content

Testing

Test Credentials​

There is no separate public sandbox environment. All credentials work against the production infrastructure.

For integration testing:

  1. Request test credentials from your account manager or platform administrator
  2. Use small amounts (e.g., IDR 1,000 = amount: 1000)
  3. Test QRIS payments using any QRIS-compatible payment app (GoPay, OVO, etc.) by scanning the generated QR code

Testing Order Creation​

# Create a QRIS order for IDR 1,000
curl -X POST http://localhost:8080/v1/orders \
-H "X-API-Key: YOUR_TEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_order_id": "TEST-001",
"amount": 1000,
"payment_method": "QRIS",
"notify_url": "http://localhost:9999/callback"
}'

Testing Webhooks Locally​

Use a webhook testing service to inspect incoming payloads:

  • ngrok — ngrok http 9999 to expose a local port
  • webhook.site — no-install, browser-based

Set the public URL as notify_url in your test orders.

Checking Results​

After creating a test order:

  1. Scan the returned QR code with a real payment app
  2. Confirm the webhook fires at your notify_url with status: "PAID"
  3. Query the order to verify status: GET /v1/orders/:ref_code
  4. Check the admin dashboard to see the order listed with source_api badge

Simulating Edge Cases​

ScenarioHow to test
Duplicate orderRepeat the same key and body — expect the cached original response. Use a different key with the same confirmed merchant_order_id — expect the existing order (HTTP 200). Unresolved attempts return ORDER_PENDING_CONFIRMATION
Signature mismatchChange any character in X-Signature — expect INVALID_SIGNATURE
Insufficient balanceRequest disbursement larger than wallet balance — expect INSUFFICIENT_BALANCE
Expired orderSet expire_minutes: 1 and wait — order transitions to EXPIRED within 30 seconds of TTL