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
JavaScript
Using Test Cards// Example: Create transaction with test card
const response = await fetch('https://gateway.epayse.com/api/v1/transaction/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Key-Id': 'your_api_key',
'X-Signature': 'your_hmac_signature',
'X-Timestamp': '1699564800',
'X-Nonce': 'unique_nonce'
},
body: JSON.stringify({
amount: 10000,
currency: 'USD',
card_number: '4242424242424242', // Success test card
card_cvv: '123',
card_expiry: '12/36',
redirectUrl: 'https://example.com/success',
cancelUrl: 'https://example.com/cancel'
})
});Testing 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