HSRCPAY Documentation

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

AreaRuntime behavior
Card allowlistA card payment method must match one entry in SandboxCards.
PAN matchingNon-digit separators are stripped before matching.
Expiry matchingmonth and year are normalized before matching.
CVV matchingIf cvv or cvc is sent, it must match the allowlist entry.
Saved card flowIf CVV is not present, sandbox validation uses PAN + expiry.
3DS behaviorsecure_mode: true returns requires_action for a valid sandbox card.
Direct paymentsecure_mode: false returns success for a valid sandbox card.
Invalid card dataCard 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:

  1. pan is reduced to digits only.
  2. month is normalized to two digits.
  3. year is normalized to the last two digits.
  4. If cvv or cvc is present, it is reduced to digits only and matched exactly.
  5. 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:

ConditionResult
Valid sandbox card + secure_mode: falsekind: "success"
Valid sandbox card + secure_mode: truekind: "requires_action"
Resume after sandbox 3DS actionkind: "success"
Missing or non-allowlisted cardkind: "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.

100 sandbox cards from the runtime sandbox card allowlist.
SchemePANExpiryCVV/CVCCardholder
Visa499100182345670105/28123James Smith
American Express37910382345670111/291234Robert Johnson
MasterCard599102987654321008/30456Maria Garcia
Discover609104112233445503/27789David Miller
Diners Club3095001234567812/28999Richard Davis
UnionPay629501876543210901/31888Wei Zhang
Visa411111556677889907/29111Mary Wilson
American Express37111455667788909/302222Charles Moore
MasterCard511113443322110006/27333Patricia Taylor
Discover601115998877665502/28444Jennifer Anderson
Visa499200123456789010/31555Ahmet Yılmaz
Troy979204987654321104/29666Mehmet Demir
MasterCard599202112233445501/28777Ayşe Kaya
MasterCard535952556677889905/30888Fatma Çelik
Visa405950998877665509/27999Mustafa Şahin
Visa408080123456789012/28000Zeynep Yıldız
MasterCard508082987654321003/29101Emre Öztürk
Visa409000112233445508/31202Burak Aydın
MasterCard509002556677889906/30303Selin Arslan
Visa499201443322110011/27404Can Doğan
Visa499300123456789002/28505Harry Evans
MasterCard599302987654321007/29606Oliver Brown
American Express37930412345678904/307070Jack Wilson
MasterCard599400556677889910/31808Hans Muller
Visa499402112233445501/27909Klaus Schmidt
MasterCard522220443322110005/28010Lars Jensen
Visa433330998877665509/29121Sophie Thompson
MasterCard533332123456789012/30232Emma White
MasterCard510060987654321003/27343Jan De Vries
Visa410062556677889908/31454Anna Bakker
Visa450070112233445506/28565Li Wei
UnionPay620071443322110011/29676Wang Fang
MasterCard550073998877665502/30787Tan Min
Visa422330123456789005/27898Hiroshi Tanaka
JCB352331987654321009/31909Kenji Sato
MasterCard522332556677889901/28010Yuki Suzuki
Visa443110112233445504/29121Kim Min-jun
MasterCard543112443322110007/30232Park Ji-woo
Visa482000998877665512/27343Lucas Smith
MasterCard582002123456789003/31454Chloe Wilson
Visa461220987654321008/28565Pedro Silva
MasterCard561222556677889911/29676Ana Santos
Visa432440112233445502/30787Jose Hernandez
MasterCard532442443322110006/27898Maria Lopez
Visa453220998877665509/31909Juan Martinez
MasterCard553222123456789001/28010Camila Gonzalez
Visa434990987654321005/29121Carlos Rodriguez
MasterCard534992556677889910/30232Valentina Perez
Visa424880112233445503/27343Diego Sanchez
MasterCard524882443322110007/31454Sofia Ramirez
Visa471990998877665512/28565Mohammed Al-Fayed
MasterCard571992123456789004/29676Fatima Al-Sayed
Visa483550987654321008/30787Ahmed Hassan
MasterCard583552556677889911/27898Amina Ali
Visa433990112233445502/28909Omar Khaled
MasterCard533992443322110006/31010Layla Mahmoud
Visa482660998877665509/29121Thabo Mbeki
MasterCard582662123456789001/30232Nandi Zulu
Visa471991987654321005/27343Yousef Abdullah
MasterCard583553556677889910/28454Zahra Ibrahim
Visa441660112233445503/29565Alessandro Rossi
MasterCard541662443322110007/30676Giulia Bianchi
Visa412880998877665512/27787Antonio Garcia
MasterCard512882123456789004/31898Carmen Martinez
Visa493660987654321008/28909Joao Silva
MasterCard593662556677889911/29010Maria Santos
Visa412220112233445502/30121Pierre Dubois
MasterCard512222443322110006/27232Sophie Martin
Visa441661998877665509/31343Marco Bernardi
MasterCard512883123456789001/28454Isabella Ricci
MasterCard531550987654321005/29565Jakub Kowalski
Visa431552556677889910/30676Julia Wisniewska
Visa422990112233445503/27787Ivan Petrov
MasterCard522992443322110007/28898Elena Sokolova
Visa484550998877665512/31909Andrei Popa
MasterCard584552123456789004/29010Maria Radu
Visa414770987654321008/30121Jan Novak
MasterCard514772556677889911/27232Eva Svoboda
Visa431553112233445502/28343Piotr Zielinski
MasterCard522993443322110006/29454Olga Smirnova
MasterCard551110998877665509/30565Erik Andersson
Visa451112123456789001/31676Anna Johansson
Visa464330987654321005/27787Ole Hansen
MasterCard564332556677889910/28898Ingrid Olsen
Visa454220112233445503/29909Peter Nielsen
MasterCard554222443322110007/30010Karen Jensen
Visa474440998877665512/31121Matti Korhonen
MasterCard574442123456789004/27232Sari Virtanen
Visa451770987654321008/28343Michael Tremblay
MasterCard551772556677889911/29454Nicole Roy
American Express37255012345678902/301234William Brown
Diners Club3050029876543206/31565Elizabeth Taylor
Visa472552112233445509/27676Thomas Moore
MasterCard572553443322110001/28787Sarah Jackson
Discover602554998877665505/29898Christopher Harris
American Express37133312345678910/309090Jessica Martin
Visa400100987654321003/31010Daniel White
MasterCard500103556677889907/27121Nancy King
Visa499101112233445511/28232Matthew Scott
MasterCard599502443322110002/29343Laura 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 success and skipping secure_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.

On this page