Testing orders in development stores

By placing a test order, you can make sure that your development store's checkout process and settings for order processing, inventory, shipping, email notifications, and taxes are all correct. Development stores can process unlimited test orders.

Ways to test orders

You can test orders in a development store in the following ways:

You can also create test orders using theREST Admin APIorGraphQL Admin API.

Limitations

There are limitations when you test orders in a development store:

  • You can't test orders using real transactions. Real transactions are transactions that are processed through a payment provider that isn't in test mode, and that use real payment information such as a valid credit card number.
  • You can't test orders usingmanual payment methods.
  • You can't test orders usingdraft ordersthat you create in the Shopify admin.

To test with these transaction types, you need totransfer the development storeto a paid plan. - You can't test using draft orders you create in your Shopify admin. You need to place test orders using the development store's checkout.

Testing using Shopify's Bogus Gateway

To simulate a transaction on your development store's online checkout, you can set up Shopify's Bogus Gateway. Bogus Gateway is a payment provider that any store can use to create test orders.

To create an order, you need to enter test payment information at checkout. You can simulate different types of transactions, depending on what information you enter.

Steps:

  1. 如果你有一个信用卡支付提供商启用, then deactivate it before continuing. ClickManage>Deactivate(this button also shows the name of your payment provider, for exampleDeactivate Shopify Payments), then confirm your deactivation.
  2. Do one of the following:
    1. If you have Shopify Payments enabled:
      • In theShopify paymentssection, clickManage.
      • At the bottom of the page, clickSwitch to a third-party provider, and then clickSwitch to a third-party provideragain to confirm.
    2. If you don't have Shopify Payments enabled, then in theShopify paymentssection, clickSee all other providers.
    3. If Shopify Payments isn't available in your country, then in thePayment providerssection, clickChoose a provider.
  3. Select(for testing) Bogus Gatewayfrom the list.
  4. ClickActivate(for testing) Bogus Gateway.
  5. ClickSave.
  6. Go to your online store and place an order as a customer would. At checkout, enter the following credit card details instead of genuine numbers:
Card details to enter when testing your checkout with the bogus gateway
Field name Details to enter
Name on card EnterBogus Gateway
Credit card number

Enter each of these in turn to simulate different types of transaction:

  • Enter1to simulate a successful transaction
  • Enter2to simulate a failed transaction
  • Enter3to simulate an exception (this generates a message indicating that an error has occurred with the provider)
CVV Enter any 3-digit number (for example,111.)
Expiry Date Enter any date in the future.
  1. After you're done testing, clickManagenext to(for testing) Bogus Gatewayin your Shopify admin.

  2. ClickDeactivate(for testing) Bogus Gatewayto remove this gateway from your checkout.

Testing using Shopify Payments test mode

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

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 theShopify Paymentssection, clickManage.

  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
Card type Test credit number
Visa 4242424242424242
Mastercard 5555555555554444
American Express 378282246310005
Discover 6011111111111117
Diners Club 30569309025904
JCB 3530111333300000

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 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.

Test mode for third-party payment providers

Some third-party payment providers offer a test mode that you can enable in the Shopify admin. Third party payment providers must have anEnable test modeoption enabled in their settings to be tested in a development store. For more information about using test mode with a specific third-party payment provider, refer to the payment provider's documentation.

When a payment gateway is in test mode, requests from Shopify include thetestattribute. Iftestis set totrue, then the payment is processed as a test payment and no actual transaction is made.

If you're a third-party payment provider and want to add theEnable test modeoption to your settings, then you need to add payment sandbox URLs to yourpayments app extensionin the Partner Dashboard.

Testing with real transactions

If you need to test your development store using real transactions, then you need to transfer your store to a paid plan. For more information, refer toTransferring development stores to clients.

If you want to switch a development store to a paid plan but still be the store's owner, thenchoose a planin the Shopify admin.