Testing Shopify Payments

To test your Shopify Payments setup, enable the test mode and use test credit cards to simulate payments.

Test mode

Test mode is a feature of Shopify Payments. You can use it to test how your customers pay for their orders, and to test how you and your staff process those orders. While test mode is enabled, you cannot use real credit cards to pay for orders. Some local payment methods, such as Sofort and iDEAL, aren't available in the checkout when test mode is enabled. For these reasons, you shouldn't enable test mode on a store that is in production.

After you are finished testing Shopify Payments, disable test mode so that your customers can pay for their order using their real credit cards.

If you're not using Shopify Payments and you want to test the checkout process, then you can place a test order by using the Shopify bogus gateway.

Enable test mode for Shopify payments

Before you can create test orders, you need to enable the test mode for Shopify payments.

Steps:

  1. In the Shopify Payments section, click Edit:

  2. Check Use test mode:

    The Use test mode checkbox

  3. Click Save.

When you have enabled test mode, the Shopify Payments section shows a black and yellow striped band.

The Shopify Payments section when test mode is enabled

Next steps:

You can create orders and then simulate transactions by using a test credit card number. There are test numbers to create successful transactions, failed transactions, and transactions in different currencies.

Simulate successful transactions

To simulate a successful transaction, use the following information when you are asked for credit card details at checkout:

  • Name on card: Enter at least two words.
  • Expiry date: Enter any date in the future.
  • CVV: Enter any three digits.
  • Card number: Use any of the following numbers:
Visa 4242424242424242
Mastercard 5555555555554444
American Express 378282246310005
Discover 6011111111111117
Diners Club 30569309025904
JCB 3530111333300000

Simulate successful transactions in different currencies

Use the following test credit card numbers to simulate paying for orders with credit cards from the following locations:

Location Test credit number (VISA)
Australia 4000 0003 6000 0006
Canada 4000 0012 4000 0000
Denmark 4000 0020 8000 0001
Germany 4000 0027 6000 0016
Hong Kong SAR China 4000 0034 4000 0004
Ireland 4000 0037 2000 0005
Japan 4000 0039 2000 0003
The Netherlands 4000 0052 8000 0002
New Zealand 4000 0055 4000 0008
Singapore 4000 0070 2000 0003
United Kingdom 4000 0082 6000 0000
United States 4242 4242 4242 4242

Test orders don't appear in your payouts.

Simulate failed transactions

If you want to see the credit card error messages that might be displayed to a customer during checkout, then you can use these test credit card numbers to simulate different failed transactions:

  • Use credit card number 4000000000000002 to generate a card declined message.
  • Use credit card number 4242424242424241 to generate an incorrect number message.
  • Use credit card number 4000000000000259 to simulate a disputed transaction.
  • Use an invalid expiry month, for example 13, to generate an invalid expiry month message.
  • Use an expiry year in the past to generate an invalid expiry year message.
  • Use a two-digit CVV number to generate an invalid CVV message.

Learn more

Ready to start selling with Shopify?

Try it free