Test Card Numbers

Use these with a test_ API key. No real card is charged.
BrandNumberOutcome
Visa4111 1111 1111 1111✅ Approved
Visa4000 0000 0000 0002❌ Declined
Mastercard5500 0000 0000 0004✅ Approved
Mastercard5200 8282 8210 0001❌ Declined
For all test cards use:
  • Expiry: any future date in MM/YY format (e.g., 10/26)
  • CVV: any 3 digits (e.g., 123)
  • Name: any value
Test cards only work with test_ keys. Never use test card numbers with a live_ key.

Testing an Approval

curl -X POST https://api.rohopay.com/api/v1/checkout \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "test_YOUR_KEY",
    "amount": 10000,
    "currency": "UGX",
    "customer_name": "Test User",
    "customer_email": "test@example.com",
    "return_url": "https://your-site.com/checkout/return",
    "card_number": "4111111111111111",
    "card_expiry": "10/26",
    "card_cvv": "123"
  }'
You’ll get a payment_url back. In test mode the 3DS step is simulated.

Testing a Decline

-d '{ ..., "card_number": "4000000000000002" }'
The payment_url redirect leads to a declined result, and the webhook fires with withdraw.failed.

Testing Expired Card Validation

RohoPay validates expiry server-side before hitting any provider. Submit a past date to test:
-d '{ ..., "card_expiry": "01/23" }'
# Response: 400 VALIDATION_ERROR — card has expired

Pre-Launch Checklist

1

Test the success path

Use a Visa/MC success card number and confirm your return URL and webhook both fire correctly.
2

Test the decline path

Use a decline card and confirm your error UI handles it gracefully.
3

Test expired card validation

Submit a past expiry date and confirm your frontend shows an appropriate error.
4

Verify webhook signature

Confirm your webhook handler verifies x-rohopay-signature before processing.
5

Switch to live_ key

Replace your test_ key with live_ in production environment variables.