Test payments in test mode in Shopify
Before you take real money, run a test order through your checkout. Shopify gives you two ways to do it: test mode on Shopify Payments, which uses test card numbers, and the Test payment gateway, formerly called the Bogus Gateway, which simulates a transaction with a one-digit card number. Both let you place an order without charging a real card.
Written · Shopify admin, desktop steps · 5 minutes read
The worked example
| Test order | $57.25, one item |
| Shopify Payments test card | 4242 4242 4242 4242 |
| Test payment gateway, success | Card number 1 |
| Test payment gateway, failure | Card number 2 |
| Test payment gateway, error | Card number 3 |
| Minimum test amount | More than $1.00 USD equivalent |
Download the record: test-order-checklist.csv (185 bytes).
A checklist for the test orders in this tutorial, with the card number used, the expected result, and the cleanup step for each. All three test orders use the same $57.25 total.
1Choose your test method
If you use Shopify Payments, enable its test mode. If you do not use Shopify Payments, or it is not available in your country, use the Test payment gateway instead. The Test payment gateway is a payment provider that any store can use to create test orders, and it was formerly called the Bogus Gateway.
2Enable Shopify Payments test mode
From your Shopify admin, go to Settings > Payments. In the Shopify Payments section, click Manage. In the Test mode section, select Enable test mode. You can test Shopify Payments only if you have chosen a paid plan.
3Or activate the Test payment gateway
From your Shopify admin, go to Settings > Payments. If you have a provider active, you may need to deactivate it first. Click Add payment method or See all other providers, and select (for testing) Bogus Gateway or Test payment gateway from the list.
4Place a test order through checkout
Visit your online store, add a product to your cart, and check out. The test purchase amount must be greater than $1.00 USD equivalent, so this tutorial uses a $57.25 order. Use the test card for your method: 4242 4242 4242 4242 for Shopify Payments test mode, or the name on card Test payment gateway with card number 1 for a successful transaction on the Test payment gateway.
5Test the failure paths too
Run the same order again with card number 2 to simulate a failed transaction, and with card number 3 to simulate an exception that generates a message indicating an error has occurred with the provider. Check that your order confirmation email, inventory count, and tax lines behave the way you expect on each path.
6Cancel the test orders and turn test mode off
Cancel the test orders so they do not sit in your fulfilment queue. Then go back to Settings > Payments and turn test mode off, or deactivate the Test payment gateway and reactivate your real payment provider, before you go live. While test mode is on, real customers cannot pay.
The arithmetic
The test order is the same on all three runs, so the only thing that changes is the card number and the result:
| Test | Card number | Result | Order total |
|---|---|---|---|
| Success | 1 | Approved | $57.25 |
| Decline | 2 | Declined | $57.25 |
| Gateway error | 3 | Error | $57.25 |
All three test orders are $57.25, which is more than the $1.00 USD equivalent minimum, so all three process. Test orders do not affect your payouts or your sales reports, and they do not charge a real card.
Held at the counter
Test mode blocks real customers. While test mode is on, real customers cannot pay. Use it only for short testing windows, and turn it off the moment you are done, or your store will take test orders and no real ones.
You cannot test gift cards or store credit. You cannot test orders using gift cards or store credit, because they are processed as real transactions. You also cannot test orders using manual payment methods, or draft orders you create in your Shopify admin.
The Bogus Gateway is now called the Test payment gateway. Shopify renamed Bogus Gateway to Test payment gateway in the admin. If you are following an older tutorial that says to select Bogus Gateway from the provider list, look for Test payment gateway instead; it is the same feature under a new name.
Sources
- Testing orders in client transfer stores — Shopify's help pages: the Bogus Gateway card numbers, the Shopify Payments test mode steps, and the testing limitations.