Sandbox Test Cards
Test card numbers for simulating different payment scenarios
Quick Reference
| Card Number | Brand | Scenario | Status |
|---|---|---|---|
| 3782 8224 6310 005 | amex | ✅ American Express - Immediate success | SUCCESS |
| 4000 0000 0000 0002 | visa | ⏳ Visa - Multi-stage: ATTEMPT → PENDING → SUCCESS (simulates async processing) | SUCCESS |
| 4000 0000 0000 3220 | visa | 🔐 Visa - 3DS authentication required (simulates 3D Secure flow) | SUCCESS |
| 4242 4242 4242 4242 | visa | ✅ Visa - Immediate success (most common scenario) | SUCCESS |
| 5200 8282 8282 8210 | mastercard | 🔐 Mastercard - 3DS authentication required | SUCCESS |
| 5555 5555 5555 4444 | mastercard | ✅ Mastercard - Immediate success | SUCCESS |
| 4000 0000 0000 0010 | visa | ⏳ Visa - Multi-stage: ATTEMPT → PENDING → FAIL (simulates delayed failure) | FAIL |
| 4000 0000 0000 0051 | visa | ❌ Visa - Generic card decline | FAIL |
| 4000 0000 0000 0069 | visa | ❌ Visa - Expired card | FAIL |
| 4000 0000 0000 0101 | visa | ❌ Visa - Insufficient funds | FAIL |
| 4000 0000 0000 0127 | visa | 🔍 Visa - Transaction requires manual review (high-risk indicators) | REVIEW |
| 4000 0000 0000 0135 | visa | 📄 Visa - Requires document verification (KYC/AML compliance) | REQUIRE_DOCUMENT |
| 4000 0000 0000 0143 | visa | 🚫 Visa - Transaction cancelled by user | CANCEL |
| 4000 0000 0000 0150 | visa | ⏰ Visa - Transaction expired (no payment within time limit) | EXPIRE |
| 4000 0000 0000 0168 | visa | ⚠️ Visa - Incomplete transaction (user abandoned checkout) | INCOMPLETE |
| 4000 0000 0000 0176 | visa | 💥 Visa - Processing error (system/network failure) | ERROR |
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
// Example: Create transaction with test card
const response = await fetch('https://api.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'
})
});Successful Payments
These cards simulate immediate successful transactions.
3782 8224 6310 005
✅ American Express - Immediate success
- Processing Delay:
- 2s
4242 4242 4242 4242
✅ Visa - Immediate success (most common scenario)
- Processing Delay:
- 2s
5555 5555 5555 4444
✅ Mastercard - Immediate success
- Processing Delay:
- 2s
Multi-Stage Transitions
These cards simulate asynchronous payment processing with multiple state changes.
4000 0000 0000 0002
⏳ Visa - Multi-stage: ATTEMPT → PENDING → SUCCESS (simulates async processing)
- State Flow:
- ATTEMPT(1s delay)PENDING(3s delay)SUCCESS(2s delay)
4000 0000 0000 0010
⏳ Visa - Multi-stage: ATTEMPT → PENDING → FAIL (simulates delayed failure)
- State Flow:
- ATTEMPT(1s delay)PENDING(3s delay)FAIL(2s delay)
- Error Code:
- card_declined
Failed Payments
These cards simulate various payment failure scenarios.
4000 0000 0000 0051
❌ Visa - Generic card decline
- Error Code:
- card_declined
- Error Message:
- Your card was declined
4000 0000 0000 0069
❌ Visa - Expired card
- Error Code:
- expired_card
- Error Message:
- Your card has expired
4000 0000 0000 0101
❌ Visa - Insufficient funds
- Error Code:
- insufficient_funds
- Error Message:
- Your card has insufficient funds
Manual Review & Document Requirements
These cards trigger manual review or document verification flows.
4000 0000 0000 0127
🔍 Visa - Transaction requires manual review (high-risk indicators)
- Additional Information:
- review reason:high_risk_indicatorsexpected review time:24-48 hours
4000 0000 0000 0135
📄 Visa - Requires document verification (KYC/AML compliance)
- Additional Information:
- required documents:government_id, proof_of_addressdocument deadline:7 days
Cancellations & Expirations
These cards simulate user cancellations, expirations, and incomplete transactions.
4000 0000 0000 0143
🚫 Visa - Transaction cancelled by user
4000 0000 0000 0150
⏰ Visa - Transaction expired (no payment within time limit)
4000 0000 0000 0168
⚠️ Visa - Incomplete transaction (user abandoned checkout)
System Errors
This card simulates processing errors and system failures.
4000 0000 0000 0176
💥 Visa - Processing error (system/network failure)
- Error Code:
- processing_error
- Error Message:
- An error occurred while processing your payment
3D Secure Authentication
These cards require 3D Secure authentication.
4000 0000 0000 3220
🔐 Visa - 3DS authentication required (simulates 3D Secure flow)
5200 8282 8282 8210
🔐 Mastercard - 3DS authentication required
Testing Tips
Test both success and failure scenarios
Verify webhook handling for all statuses
Test multi-stage transitions for async flows
Validate error messages and error codes
