Shopify Test Card Numbers
Test Shopify checkouts with the Bogus Gateway and Shopify Payments test-mode cards, including success, decline and error scenarios.
To test a Shopify store without real money, activate the Bogus Gateway and set the name on the card to "Test payment gateway". Then enter 1 as the card number for an approved order, 2 for a decline or 3 for a gateway failure. With Shopify Payments in test mode, use 4242 4242 4242 4242 (Visa) or 5555 5555 5555 4444 (Mastercard) with any future expiry date.
Last verified against Shopify's official documentation on .
Shopify Payments test mode: successful payments
The name on the card needs at least two words, and the order total must exceed the equivalent of USD 1.
| Card number | Brand | Result | Copy |
|---|---|---|---|
4242 4242 4242 4242 | Visa | Payment succeeds | |
5555 5555 5555 4444 | Mastercard | Payment succeeds | |
3782 822463 10005 | American Express | Payment succeeds | |
6011 1111 1111 1117 | Discover | Payment succeeds | |
3056 930902 5904 | Diners Club | Payment succeeds | |
3566 0020 2036 0505 | JCB | Payment succeeds | |
6200 0000 0000 0005 | UnionPay | Payment succeeds | |
6555 9000 0060 4105 | BCcard and DinaCard | Payment succeeds | |
4000 0025 0000 1001 | Cartes Bancaires | Payment succeeds Cartes Bancaires / Visa | |
5555 5525 0000 1001 | Cartes Bancaires | Payment succeeds Cartes Bancaires / Mastercard | |
4000 0503 6000 0001 | Visa | Payment succeeds eftpos Australia / Visa | |
5555 0503 6000 0080 | Mastercard | Payment succeeds eftpos Australia / Mastercard |
Shopify Payments test mode: failed payments
| Card number | Brand | Result | Copy |
|---|---|---|---|
4000 0000 0000 0002 | Visa | Card declined | |
4000 0000 0000 9995 | Visa | Insufficient funds | |
4000 0000 0000 9987 | Visa | Lost card | |
4000 0000 0000 9979 | Visa | Stolen card | |
4000 0000 0000 0069 | Visa | Expired card | |
4000 0000 0000 0127 | Visa | Incorrect CVC | |
4000 0000 0000 0119 | Visa | Processing error | |
4242 4242 4242 4241 | Visa | Incorrect number Fails Luhn | |
4000 0000 0000 0259 | Visa | Disputed transaction Chargeback |
Bogus Gateway values
With the Bogus Gateway active, enter "Test payment gateway" as the name on the card and one of these as the card number.
| Scenario | Value | Effect |
|---|---|---|
| Approved order | 1 | Transaction approved |
| Declined order | 2 | Transaction declined |
| Gateway failure | 3 | Gateway error |
Invalid-data values (Shopify Payments)
| Scenario | Value | Effect |
|---|---|---|
| Expiry month | 13 | Invalid expiry month |
| Expiry year | 2000 | Expired / invalid year |
| Security code | Any 2 digits | Invalid security code |
Before you use these
- Test purchases must exceed the equivalent of USD 1 in any currency.
- Apple Pay and Google Pay can use real cards even in test mode, so check the order for the test mode banner.
- Do not fulfil test orders, and pause auto-fulfilment apps before testing.
- These numbers are published by Shopify for sandbox testing. They are not real cards and cannot be used for a real purchase.
How to use Shopify test cards
- Switch your Shopify integration to its test or sandbox environment and use test credentials. Live credentials reject these numbers.
- Enter a card number from the tables above. Expiry: Any future date. Security code: Any 3 digits (4 for Amex).
- Start with a successful card to confirm the happy path, then work through the decline and error cards so every failure message in your checkout gets exercised.
- Use the trigger values (bogus gateway values, invalid-data values (shopify payments)) to simulate outcomes that are not tied to a card number.
Shopify test card FAQ
What is the Shopify Bogus Gateway?
A built-in test payment provider any store can activate. Instead of real card numbers it takes 1 (approved), 2 (declined) and 3 (gateway failure), with "Test payment gateway" as the name on the card.
Which card numbers work in Shopify Payments test mode?
Shopify Payments test mode accepts 4242 4242 4242 4242 (Visa), 5555 5555 5555 4444 (Mastercard), 3782 822463 10005 (Amex) and test numbers for Discover, Diners, JCB and UnionPay, plus decline cards such as 4000 0000 0000 0002.
What are the Shopify test card numbers?
To test a Shopify store without real money, activate the Bogus Gateway and set the name on the card to "Test payment gateway". Then enter 1 as the card number for an approved order, 2 for a decline or 3 for a gateway failure. With Shopify Payments in test mode, use 4242 4242 4242 4242 (Visa) or 5555 5555 5555 4444 (Mastercard) with any future expiry date.
Do Shopify test cards work in production?
No. These numbers are only recognised by the Shopify test environment and are rejected by the live platform. They are not real cards and cannot be used for a purchase.
How do I test a declined payment with Shopify?
Shopify triggers failures through bogus gateway values as well as dedicated card numbers. Both are listed on this page.