Testing Shopify Payments

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

Test mode is not supported for merchants in France.

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 activated, you can't 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 activated. For these reasons, you shouldn't activate test mode on a store that's in production.

The test mode feature isn't available to test Shop Pay or Shop Pay Installments.

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

If you're not using Shopify Payments and you want to test the checkout process, then you canplace a test order by using the Shopify Bogus Gateway.

激活测试模式for Shopify Payments

Before you can create test orders, you need to activate the test mode for Shopify Payments.

Steps:

  1. In theShopify Payments部分中,点击Manage.

  2. In theTest modesection, selectEnable test mode.

  3. ClickSave.

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.
  • Security code: Enter any three digits.
  • Card number: Use any of the following numbers:
Simulate a successful transactions with these card numbers
卡类型 Test credit number
Visa 4242424242424242
Mastercard 5555555555554444
American Express 378282246310005
Discover 6011111111111117
Diners Club 30569309025904
JCB 3530111333300000

Simulate failed transactions

If you want to view 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 acard declinedmessage.
  • Use credit card number 4242424242424241 to generate anincorrect numbermessage.
  • Use credit card number 4000000000000259 to simulate adisputed transaction.
  • Use an invalid expiry month, for example 13, to generate aninvalid expiry monthmessage.
  • Use an expiry year in the past to generate aninvalid expiry yearmessage.
  • Use a two-digit security code number to generate aninvalid security codemessage.

Learn more

Ready to start selling with Shopify?

Try it free