spout

Test Cards

Use these cards on Spout checkout after initializing with your test_secret_key. The simulator only inspects amount and the last four digits of the PAN— expiry, CVV, and PIN can be any plausible values (examples below). Live processors are never called. See Test Transactions for the end-to-end flow.

Checkout — enter test cardPlaceholder — replace with real screenshot

On the hosted checkout page, paste a test PAN from the tables below to force approve or decline.

Why a screenshot helps: Shows integrators where card fields map to the simulator rules during QA.

How outcomes are decided

RuleResultWebhooks
Amount is 99, 999, or 99.99Declined (gateway_response: 99)charge.processing → charge.failed
Card PAN ends with 0002Declinedcharge.processing → charge.failed
Any other amount + PANApproved (gateway_response: 00)charge.processing → charge.completed

If both a fail amount and a fail PAN are used, the charge still declines once. Prefer one clear rule per test case.

Cards that approve (success)

Use any PAN that does not end in 0002, with an initialize amount other than 99 / 999 / 99.99.

BrandPANExpiryCVVPINSuggested amount
Visa408408408408408112/30 (3012)40800001000
Mastercard506066666666666666812/301230000500
Verve-style506099058000021749912/301110000250

Expected: payment status success / 00, webhook charge.completed, response flag simulated: true, mode: "test".

Cards that decline (failure)

Any PAN whose last four digits are 0002 forces a simulated decline — even with a normal amount.

ScenarioPANExpiry / CVV / PINAmount
Decline by PAN408408408408000212/30 · 408 · 0000Any (e.g. 1000)
Decline by PAN539983440021000212/30 · 123 · 0000Any (e.g. 500)

Expected: gateway_response: "99", webhook charge.failed (if enableForFailed / subscribed).

Decline by amount (any card)

Initialize with one of these amounts and a success card — the charge still declines.

AmountUse case
99Quick decline in major units
999Larger decline sample
99.99Decimal / intl-style decline

Pair with e.g. 4084084084084081 so the only fail signal is the amount.

Recommended QA scenarios

#GoalSetupAssert
1Happy pathAmount 1000 + PAN …4081charge.completed, status 00
2Card declinedAmount 1000 + PAN …0002charge.failed, status 99
3Amount declinedAmount 99 + success PANcharge.failed
4Idempotent retrySame Idempotency-Key on initializeSame transactionRef / body
5Webhook HMACScenario 1 or 2 + test webhook URLValid X-Spout-Signature with whsec_test_*

Checkout field reference

Field names vary slightly by channel UI; the simulator reads PAN from the charge request. Typical shape:

Example card fields

1{
2  "txn_ref": "SP-a1b2c3d4",
3  "pan": "4084084084084081",
4  "expDate": "3012",
5  "cvv": "408",
6  "pin": "0000"
7}
  • expDate — often YYMM (e.g. 3012 = Dec 2030)
  • cvv / pin — not used by the fail/success rules; send valid-looking values for UI validation
  • Never use these PANs against live secret keys — live mode hits real processors

Checklist

  1. Authorization = test_secret_key
  2. Initialize amount chosen for approve vs decline scenario
  3. Enter matching test card on checkout
  4. Confirm webhooks on testwebhook_url with whsec_test_*
  5. Confirm payment mode: "test" and simulated: true in your DB / logs