Test orders with the Test payment gateway (Bogus Gateway)

Place Shopify test orders without real charges: the Test payment gateway (formerly the Bogus Gateway), card numbers 1, 2 and 3, and cleaning up afterwards.

Where
Settings > Payments
Card number
1 approved, 2 declined, 3 failure
Minimum
More than 1 USD equivalent
Needs
A paid plan
Last checked

In short

Shopify’s Test payment gateway, long known as the Bogus Gateway, lets you place test orders without a charge. Deactivate your live card provider, choose Test payment gateway under Settings > Payments, then check out with “Test payment gateway” as the name, card number 1 (approved), 2 (declined) or 3 (gateway failure), any CVV and a future expiry date. Test orders can be deleted and stay out of reports and payouts.

How to use it

  1. Go to Settings > Payments and deactivate the live card provider (for Shopify Payments: Manage > Switch to a third-party provider).
  2. Open the provider list (See all other providers or Choose a provider), select Test payment gateway and activate it.
  3. Check out on the storefront with an @example.com email and the test card details.
  4. Delete the test orders (search test:true on Orders), then deactivate the gateway and turn your live provider back on.

Code

test-cards.txt
# Shopify's Test payment gateway (formerly known as the Bogus Gateway)
Settings > Payments > deactivate the live card provider > Choose a provider / See all other providers > Test payment gateway > Activate > Save

Name on card   Test payment gateway
Card number    1 = approved   2 = declined   3 = gateway failure
CVV            any 3 digits, e.g. 111
Expiry         any future date
Amount         more than the equivalent of 1 USD

Email          use an @example.com address

# Afterwards: find and remove the test orders
Orders search:  test:true
Then deactivate Test payment gateway and turn your live provider back on.

Written by Lintel. MIT license: free to use in your own store and in client work.

Limits and edge cases

  • While the test gateway is active, customers can’t pay by card; do it before launch or at a quiet moment, and switch back right away.
  • It doesn’t work with Shopify POS or subscription products; for subscriptions use Shopify Payments test mode.
  • Manual payment methods such as cash on delivery or bank transfer can’t be tested this way; place and cancel a real order instead.
  • Turn off automatic fulfillment apps while testing so test orders aren’t shipped.

Questions

What is the Bogus Gateway in Shopify?
The old name for Shopify’s Test payment gateway, a provider that simulates card payments so you can place test orders.
What card number do I use for a Shopify test order?
With the Test payment gateway: 1 for approved, 2 for declined, 3 for a gateway failure. Name: Test payment gateway; any CVV; any future date.
Do Shopify test orders show up in reports?
No. Test orders and simulated transactions don’t appear in reports or payouts.
Can I delete test orders?
Yes, orders paid with the Test payment gateway or Shopify Payments in test mode can be deleted.
  • Checked on a Shopify store on the date shown. Shopify changes its admin often; if a step looks different, the idea usually still works.
  • Examples use placeholder IDs and your-store.myshopify.com. Replace them with your own.
  • MIT license for the code snippets.

Need this built, tested and maintained for your store? See Shopify development.

Have something to build? Let’s talk it through.

Taking a limited number of projects at a time. Every brief is read by an engineer, not a salesperson.

Gencer KarakayaShopify Engineer

An engineer reads your brief, and we reply by email.