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_here

Test Phone Numbers

Use these test phone numbers for sandbox testing:

Phone NumberResult
+255700000001Payment succeeds
+255700000002Payment fails (insufficient funds)
+255700000003Payment 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
  }'