Testing
Sandbox Test Cards
Test card numbers for simulating different payment scenarios
Use these test cards in sandbox mode to simulate various payment outcomes, including successes, failures, refunds, and disputes. All cards work with any CVV and future expiration date.
Quick Reference
| Card Number | Brand | Scenario | Status |
|---|
How to Use Test Cards
- 1. Use these card numbers in your sandbox/test environment
- 2. Enter any valid future expiration date (MM/YY format)
- 3. Use any 3-digit CVV code (e.g., 123)
- 4. The card will simulate the described scenario
Code Example
Bash
Using Test Cards# 1. Create a sandbox transaction. The request has NO card fields — it is the same body as
# on the Transaction API page (sign it as shown on the Authentication page; SIGNATURE, TIMESTAMP
# and NONCE are computed as in the cURL example on the Testing page).
curl -X POST "https://sandbox-gateway.epayse.com/api/v1/transaction/create" \
-H "Content-Type: application/json" \
-H "X-Api-Key-Id: $API_KEY_ID" \
-H "X-Signature: $SIGNATURE" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Nonce: $NONCE" \
-H "X-Signature-Version: 3" \
-d '{"ref":"ORDER-1001","amount":100.5,"currency":"USD","websiteUrl":"https://example.com","redirectUrl":"https://example.com/payment/success","cancelUrl":"https://example.com/payment/cancel","description":"Premium subscription - monthly","customerDetails":{"firstName":"John","lastName":"Doe","email":"[email protected]","country":"US","ip":"203.0.113.10","phoneCode":"US","phoneNumber":"5551234567"}}'
# 2. The response contains data.checkoutUrl. Open https://sandbox-gateway.epayse.com + that path in a
# browser and enter a test card on the checkout page:
# Card number 4242 4242 4242 4242 (success test card — see the table above)
# Expiry 12/36
# CVV 123Testing Tips
1
Test both success and failure scenarios
2
Verify webhook handling for all statuses
3
Test multi-stage transitions for async flows
4
Validate error messages and error codes