Testing
Test Credentials
There is no separate public sandbox environment. All credentials work against the production infrastructure.
For integration testing:
- Request test credentials from your account manager or platform administrator
- Use small amounts (e.g., IDR 1,000 =
amount: 1000) - 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 9999to 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:
- Scan the returned QR code with a real payment app
- Confirm the webhook fires at your
notify_urlwithstatus: "PAID" - Query the order to verify status:
GET /v1/orders/:ref_code - Check the admin dashboard to see the order listed with
source_apibadge
Simulating Edge Cases
| Scenario | How to test |
|---|---|
| Duplicate order | Repeat 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 mismatch | Change any character in X-Signature — expect INVALID_SIGNATURE |
| Insufficient balance | Request disbursement larger than wallet balance — expect INSUFFICIENT_BALANCE |
| Expired order | Set expire_minutes: 1 and wait — order transitions to EXPIRED within 30 seconds of TTL |