Sandbox Cards
Runtime sandbox card allowlist, validation rules, 3DS behavior, and production boundaries.
Sandbox cards are not real payment instruments. In HSRC Pay they are a runtime allowlist used by the sandbox provider to verify that the submitted card data is known sandbox test data.
Important boundary: sandbox cards do not simulate specific issuer errors such as insufficient funds, invalid account, stolen card, expired card, issuer unavailable, or risk/fraud responses. A sandbox card is only a sandbox card.
What Sandbox Cards Do
| Area | Runtime behavior |
|---|---|
| Card allowlist | A card payment method must match one entry in SandboxCards. |
| PAN matching | Non-digit separators are stripped before matching. |
| Expiry matching | month and year are normalized before matching. |
| CVV matching | If cvv or cvc is sent, it must match the allowlist entry. |
| Saved card flow | If CVV is not present, sandbox validation uses PAN + expiry. |
| 3DS behavior | secure_mode: true returns requires_action for a valid sandbox card. |
| Direct payment | secure_mode: false returns success for a valid sandbox card. |
| Invalid card data | Card data outside the allowlist returns invalid_payment_method with Invalid sandbox test card. |
What Sandbox Cards Do Not Do
Sandbox card numbers are not scenario switches. Do not map a specific PAN to a specific issuer decline or provider failure.
Use provider/sandbox scenario configuration for explicit error simulation. In the Felix sandbox adapter this is handled through expectedSandboxErr; it is independent from the card number. The card must still be valid sandbox card data when the flow requires card validation.
Card Validation Logic
The sandbox provider validates card data only for card payment methods:
panis reduced to digits only.monthis normalized to two digits.yearis normalized to the last two digits.- If
cvvorcvcis present, it is reduced to digits only and matched exactly. - If the card is not found in the allowlist, the provider returns
invalid_payment_method.
3DS Behavior
3DS is controlled by payment configuration, not by choosing a special card number:
| Condition | Result |
|---|---|
Valid sandbox card + secure_mode: false | kind: "success" |
Valid sandbox card + secure_mode: true | kind: "requires_action" |
| Resume after sandbox 3DS action | kind: "success" |
| Missing or non-allowlisted card | kind: "error" with declined invalid_payment_method |
Sandbox Card List
Use these cards only in sandbox. They are dummy test data and are accepted only by the sandbox provider allowlist.
| Scheme | PAN | Expiry | CVV/CVC | Cardholder |
|---|---|---|---|---|
| Visa | 4991001823456701 | 05/28 | 123 | James Smith |
| American Express | 379103823456701 | 11/29 | 1234 | Robert Johnson |
| MasterCard | 5991029876543210 | 08/30 | 456 | Maria Garcia |
| Discover | 6091041122334455 | 03/27 | 789 | David Miller |
| Diners Club | 30950012345678 | 12/28 | 999 | Richard Davis |
| UnionPay | 6295018765432109 | 01/31 | 888 | Wei Zhang |
| Visa | 4111115566778899 | 07/29 | 111 | Mary Wilson |
| American Express | 371114556677889 | 09/30 | 2222 | Charles Moore |
| MasterCard | 5111134433221100 | 06/27 | 333 | Patricia Taylor |
| Discover | 6011159988776655 | 02/28 | 444 | Jennifer Anderson |
| Visa | 4992001234567890 | 10/31 | 555 | Ahmet Yılmaz |
| Troy | 9792049876543211 | 04/29 | 666 | Mehmet Demir |
| MasterCard | 5992021122334455 | 01/28 | 777 | Ayşe Kaya |
| MasterCard | 5359525566778899 | 05/30 | 888 | Fatma Çelik |
| Visa | 4059509988776655 | 09/27 | 999 | Mustafa Şahin |
| Visa | 4080801234567890 | 12/28 | 000 | Zeynep Yıldız |
| MasterCard | 5080829876543210 | 03/29 | 101 | Emre Öztürk |
| Visa | 4090001122334455 | 08/31 | 202 | Burak Aydın |
| MasterCard | 5090025566778899 | 06/30 | 303 | Selin Arslan |
| Visa | 4992014433221100 | 11/27 | 404 | Can Doğan |
| Visa | 4993001234567890 | 02/28 | 505 | Harry Evans |
| MasterCard | 5993029876543210 | 07/29 | 606 | Oliver Brown |
| American Express | 379304123456789 | 04/30 | 7070 | Jack Wilson |
| MasterCard | 5994005566778899 | 10/31 | 808 | Hans Muller |
| Visa | 4994021122334455 | 01/27 | 909 | Klaus Schmidt |
| MasterCard | 5222204433221100 | 05/28 | 010 | Lars Jensen |
| Visa | 4333309988776655 | 09/29 | 121 | Sophie Thompson |
| MasterCard | 5333321234567890 | 12/30 | 232 | Emma White |
| MasterCard | 5100609876543210 | 03/27 | 343 | Jan De Vries |
| Visa | 4100625566778899 | 08/31 | 454 | Anna Bakker |
| Visa | 4500701122334455 | 06/28 | 565 | Li Wei |
| UnionPay | 6200714433221100 | 11/29 | 676 | Wang Fang |
| MasterCard | 5500739988776655 | 02/30 | 787 | Tan Min |
| Visa | 4223301234567890 | 05/27 | 898 | Hiroshi Tanaka |
| JCB | 3523319876543210 | 09/31 | 909 | Kenji Sato |
| MasterCard | 5223325566778899 | 01/28 | 010 | Yuki Suzuki |
| Visa | 4431101122334455 | 04/29 | 121 | Kim Min-jun |
| MasterCard | 5431124433221100 | 07/30 | 232 | Park Ji-woo |
| Visa | 4820009988776655 | 12/27 | 343 | Lucas Smith |
| MasterCard | 5820021234567890 | 03/31 | 454 | Chloe Wilson |
| Visa | 4612209876543210 | 08/28 | 565 | Pedro Silva |
| MasterCard | 5612225566778899 | 11/29 | 676 | Ana Santos |
| Visa | 4324401122334455 | 02/30 | 787 | Jose Hernandez |
| MasterCard | 5324424433221100 | 06/27 | 898 | Maria Lopez |
| Visa | 4532209988776655 | 09/31 | 909 | Juan Martinez |
| MasterCard | 5532221234567890 | 01/28 | 010 | Camila Gonzalez |
| Visa | 4349909876543210 | 05/29 | 121 | Carlos Rodriguez |
| MasterCard | 5349925566778899 | 10/30 | 232 | Valentina Perez |
| Visa | 4248801122334455 | 03/27 | 343 | Diego Sanchez |
| MasterCard | 5248824433221100 | 07/31 | 454 | Sofia Ramirez |
| Visa | 4719909988776655 | 12/28 | 565 | Mohammed Al-Fayed |
| MasterCard | 5719921234567890 | 04/29 | 676 | Fatima Al-Sayed |
| Visa | 4835509876543210 | 08/30 | 787 | Ahmed Hassan |
| MasterCard | 5835525566778899 | 11/27 | 898 | Amina Ali |
| Visa | 4339901122334455 | 02/28 | 909 | Omar Khaled |
| MasterCard | 5339924433221100 | 06/31 | 010 | Layla Mahmoud |
| Visa | 4826609988776655 | 09/29 | 121 | Thabo Mbeki |
| MasterCard | 5826621234567890 | 01/30 | 232 | Nandi Zulu |
| Visa | 4719919876543210 | 05/27 | 343 | Yousef Abdullah |
| MasterCard | 5835535566778899 | 10/28 | 454 | Zahra Ibrahim |
| Visa | 4416601122334455 | 03/29 | 565 | Alessandro Rossi |
| MasterCard | 5416624433221100 | 07/30 | 676 | Giulia Bianchi |
| Visa | 4128809988776655 | 12/27 | 787 | Antonio Garcia |
| MasterCard | 5128821234567890 | 04/31 | 898 | Carmen Martinez |
| Visa | 4936609876543210 | 08/28 | 909 | Joao Silva |
| MasterCard | 5936625566778899 | 11/29 | 010 | Maria Santos |
| Visa | 4122201122334455 | 02/30 | 121 | Pierre Dubois |
| MasterCard | 5122224433221100 | 06/27 | 232 | Sophie Martin |
| Visa | 4416619988776655 | 09/31 | 343 | Marco Bernardi |
| MasterCard | 5128831234567890 | 01/28 | 454 | Isabella Ricci |
| MasterCard | 5315509876543210 | 05/29 | 565 | Jakub Kowalski |
| Visa | 4315525566778899 | 10/30 | 676 | Julia Wisniewska |
| Visa | 4229901122334455 | 03/27 | 787 | Ivan Petrov |
| MasterCard | 5229924433221100 | 07/28 | 898 | Elena Sokolova |
| Visa | 4845509988776655 | 12/31 | 909 | Andrei Popa |
| MasterCard | 5845521234567890 | 04/29 | 010 | Maria Radu |
| Visa | 4147709876543210 | 08/30 | 121 | Jan Novak |
| MasterCard | 5147725566778899 | 11/27 | 232 | Eva Svoboda |
| Visa | 4315531122334455 | 02/28 | 343 | Piotr Zielinski |
| MasterCard | 5229934433221100 | 06/29 | 454 | Olga Smirnova |
| MasterCard | 5511109988776655 | 09/30 | 565 | Erik Andersson |
| Visa | 4511121234567890 | 01/31 | 676 | Anna Johansson |
| Visa | 4643309876543210 | 05/27 | 787 | Ole Hansen |
| MasterCard | 5643325566778899 | 10/28 | 898 | Ingrid Olsen |
| Visa | 4542201122334455 | 03/29 | 909 | Peter Nielsen |
| MasterCard | 5542224433221100 | 07/30 | 010 | Karen Jensen |
| Visa | 4744409988776655 | 12/31 | 121 | Matti Korhonen |
| MasterCard | 5744421234567890 | 04/27 | 232 | Sari Virtanen |
| Visa | 4517709876543210 | 08/28 | 343 | Michael Tremblay |
| MasterCard | 5517725566778899 | 11/29 | 454 | Nicole Roy |
| American Express | 372550123456789 | 02/30 | 1234 | William Brown |
| Diners Club | 30500298765432 | 06/31 | 565 | Elizabeth Taylor |
| Visa | 4725521122334455 | 09/27 | 676 | Thomas Moore |
| MasterCard | 5725534433221100 | 01/28 | 787 | Sarah Jackson |
| Discover | 6025549988776655 | 05/29 | 898 | Christopher Harris |
| American Express | 371333123456789 | 10/30 | 9090 | Jessica Martin |
| Visa | 4001009876543210 | 03/31 | 010 | Daniel White |
| MasterCard | 5001035566778899 | 07/27 | 121 | Nancy King |
| Visa | 4991011122334455 | 11/28 | 232 | Matthew Scott |
| MasterCard | 5995024433221100 | 02/29 | 343 | Laura Green |
Example Usage
const { data } = await api.post(`/v1/payments/${paymentId}/confirm`, {
payment_method: {
type: "card",
data: {
pan: "4991001823456701",
month: "05",
year: "28",
cvv: "123",
},
},
payer_identity: { ip_address: clientIp, user_agent: ua },
});
if (data.payment.status === "REQUIRES_ACTION") {
redirectUser(data.confirmResult.paymentNextAction?.url);
}Production Boundary
Sandbox cards must not be used with production credentials or production provider routes. Production card behavior comes from the real provider/card network response and is not controlled by this sandbox allowlist.
Common Mistakes
- Treating sandbox card numbers as issuer error triggers.
- Expecting a PAN to simulate insufficient funds, invalid account, stolen card, expired card, or issuer unavailable.
- Testing only
successand skippingsecure_mode: true. - Sending sandbox cards to production.
- Sending production card data to sandbox.
- Designing user-facing UI around raw provider strings instead of normalized errors.