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 .

Expiry: Any future date
CVV: Any 3 digits (4 for Amex)
Official documentation

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 numberBrandResultCopy
4242 4242 4242 4242Visa
Payment succeeds
5555 5555 5555 4444Mastercard
Payment succeeds
3782 822463 10005American Express
Payment succeeds
6011 1111 1111 1117Discover
Payment succeeds
3056 930902 5904Diners Club
Payment succeeds
3566 0020 2036 0505JCB
Payment succeeds
6200 0000 0000 0005UnionPay
Payment succeeds
6555 9000 0060 4105BCcard and DinaCard
Payment succeeds
4000 0025 0000 1001Cartes Bancaires
Payment succeeds Cartes Bancaires / Visa
5555 5525 0000 1001Cartes Bancaires
Payment succeeds Cartes Bancaires / Mastercard
4000 0503 6000 0001Visa
Payment succeeds eftpos Australia / Visa
5555 0503 6000 0080Mastercard
Payment succeeds eftpos Australia / Mastercard

Shopify Payments test mode: failed payments

Card numberBrandResultCopy
4000 0000 0000 0002Visa
Card declined
4000 0000 0000 9995Visa
Insufficient funds
4000 0000 0000 9987Visa
Lost card
4000 0000 0000 9979Visa
Stolen card
4000 0000 0000 0069Visa
Expired card
4000 0000 0000 0127Visa
Incorrect CVC
4000 0000 0000 0119Visa
Processing error
4242 4242 4242 4241Visa
Incorrect number Fails Luhn
4000 0000 0000 0259Visa
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.

ScenarioValueEffect
Approved order1Transaction approved
Declined order2Transaction declined
Gateway failure3Gateway error

Invalid-data values (Shopify Payments)

ScenarioValueEffect
Expiry month13Invalid expiry month
Expiry year2000Expired / invalid year
Security codeAny 2 digitsInvalid 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

  1. Switch your Shopify integration to its test or sandbox environment and use test credentials. Live credentials reject these numbers.
  2. Enter a card number from the tables above. Expiry: Any future date. Security code: Any 3 digits (4 for Amex).
  3. 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.
  4. 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.