In the sandbox, the outcome of a card payment is determined by the last 4 digits of the card number.
Any Luhn-valid card not listed in the scenarios below is approved.
The number must be Luhn-valid, otherwise the payment form will reject it
before it even reaches the gateway. E.g.: 4000 0000 0000 0000 is
rejected by the form; 4000 0000 0002 0000 is accepted. Use the generator
below to avoid this entirely.
Test card generator
Choose a brand and a scenario — the generated number is always Luhn-valid and ends with the last-4 for that scenario.
Expiry: any future date (e.g.: 12/30). CVV: any value (e.g.: 123)
— it is ignored by the sandbox. Brand: determined by the first digit (4
Visa, 5 Mastercard, 6 Elo, 3 Hipercard).
Scenarios by last-4
Approved
| Last-4 | Result |
|---|
1111, 0000, or any other not listed | Approved (paid) |
0010 | Stays awaiting payment (waiting_payment) |
Declined (permanent — retrying will not help)
| Last-4 | Decline code | Meaning |
|---|
1001 | INSUFFICIENT_FUNDS | Insufficient funds |
1002 | CARD_DECLINED | Card declined |
1003 | EXPIRED_CARD | Expired card |
1004 | INVALID_CARD_NUMBER | Invalid card number |
1005 | INVALID_CVV | Invalid CVV |
1006 | FRAUD_SUSPECTED | Suspected fraud |
1007 | DO_NOT_HONOR | Not authorized |
1008 | EXCEEDED_LIMIT | Limit exceeded |
1009 | RESTRICTED_CARD | Restricted card |
1010 | LOST_STOLEN_CARD | Lost or stolen card |
1011 | NOT_PERMITTED | Operation not permitted |
1012 | INVALID_AMOUNT | Invalid amount |
1013 | DUPLICATE_TRANSACTION | Duplicate transaction |
Temporary failure (retryable)
| Last-4 | Decline code | Meaning |
|---|
2001 | PROCESSING_ERROR | Processing error |
2002 | GATEWAY_TIMEOUT | Gateway timeout |
2003 | NETWORK_ERROR | Network error |
2004 | ISSUER_UNAVAILABLE | Issuer unavailable |
2005 | NO_ROUTE | No payment route available |
Special
| Last-4 | Behavior |
|---|
3001 | Slow timeout — fails (retryable) after ~5 seconds |
9999 | Unexpected error (exception) |
Ready-to-use cards (copy and paste)
All Luhn-valid:
| Scenario | Number | CVV | Expiry |
|---|
| Approved | 4000 0000 0002 0000 | 123 | 12/30 |
| Insufficient funds | 4111 0009 1111 1001 | 123 | 12/30 |
| Card declined | 4111 0008 1111 1002 | 123 | 12/30 |
| Suspected fraud | 4111 0004 1111 1006 | 123 | 12/30 |
| Processing error (retryable) | 4111 0007 1111 2001 | 123 | 12/30 |
| 5s timeout | 4111 0005 1111 3001 | 123 | 12/30 |
For all other scenarios, use the generator above.
These scenarios apply to the sandbox (FakeProvider). In production, approval
or decline depends on the card’s actual issuing bank.