Sandbox Quickstart
Use sandbox to test integration behavior before production. Sandbox access, available products, and test credentials depend on your SenteRail account.
1. Get A Test Credential
Create or receive a sandbox credential through your SenteRail account or onboarding contact. Test keys are for development and should stay separate from live credentials.
2. Create A Test Payment
Use a stable idempotency key and your own durable reference. Store both your reference and the SenteRail response reference.
bash
curl -X POST https://api.senterail.com/api/v1/checkout/sessions \
-H "Authorization: Bearer <sandbox_session_token>" \
-H "Idempotency-Key: sandbox-order-1001" \
-H "Content-Type: application/json" \
-d '{
"order": {"reference":"sandbox-order-1001","amount":50000,"currency":"UGX"},
"customer": {"phone":"256700000000"},
"return_urls": {"success":"https://merchant.example/success","cancel":"https://merchant.example/cancel"}
}'3. Exercise Failure Paths
Use Magic numbers where your sandbox account supports deterministic mobile-number outcomes. Test success, decline, timeout, duplicate webhook, and delayed webhook scenarios.
4. Verify Webhooks
Your webhook receiver should verify the SenteRail signature, persist the event ID, and dedupe repeat deliveries. Do not update production-like state until the event passes verification.
5. Reconcile The Result
Compare your order, invoice, member, or accounting record with the SenteRail reference and webhook event. Keep the evidence needed for support escalation.
Sandbox Exit Criteria
- test credential stays separate from live credentials
- mutating requests use idempotency keys
- webhook signatures are verified
- duplicate events do not duplicate fulfilment
- reconciliation can explain success, failure, timeout, and retry cases
- go-live owner has reviewed Go-live checklist