Reference
Testing
Test your CamelPay integration using the sandbox environment, test phone numbers, and webhook triggers.
Sandbox Environment
Use test keys (cp_test_*) in the sandbox environment:
bash
# Sandbox base URL
CAMELPAY_API_URL=https://sandbox.api.camelpay.in
# Test API key
CAMELPAY_API_KEY=cp_test_your_sandbox_key_hereTest Phone Numbers
Use these test phone numbers for sandbox testing:
| Phone Number | Result |
|---|---|
+255700000001 | Payment succeeds |
+255700000002 | Payment fails (insufficient funds) |
+255700000003 | Payment expires |
Test Webhooks
Trigger test webhooks from the sandbox dashboard:
bash
curl -X POST https://sandbox.api.camelpay.in/test/webhooks/trigger \
-H "X-API-Key: cp_test_your_sandbox_key_here" \
-H "Content-Type: application/json" \
-d '{
"event_type": "payment.completed",
"reference": "test_ref_123",
"amount": 5000
}'