Back to Payment Guides

Shopify Credit Card Test Numbers: A Complete Checkout Guide

Learn how to use Shopify credit card test numbers to simulate successful and failed transactions. Follow our guide to verify your checkout and optimize conversions.

Introduction

Testing your checkout is the most effective way to prevent cart abandonment before you launch a store or a new marketing campaign. Using Shopify credit card test numbers allows you to simulate every possible transaction scenario—from a smooth purchase to a declined payment—without spending a cent of your own money.

We built HidePay to help merchants take control of the checkout experience once those payment methods are live. By using these test numbers, you can ensure that your payment configurations are technically sound and that your customer journey is intuitive. Ready to streamline payments? Get HidePay for your store from the Shopify App Store to start customizing payment visibility and order.

This guide provides the specific card numbers required for testing, explains how to enable test environments, and outlines a strategy for optimizing your checkout for higher conversions. You will learn how to verify your setup so you can sell with total confidence.

Why Testing Your Checkout is Essential

A functioning checkout is the baseline for any e-commerce business. However, "functioning" does not always mean "optimized." Merchants use test numbers to verify several critical components of their business logic.

First, you need to confirm that your tax calculations and shipping rates are applying correctly based on the customer’s address. Second, you should verify that discount codes trigger the expected price drops. Finally, and most importantly, you need to see exactly what a customer sees when a payment fails. If your error messages are confusing, you lose the sale.

Regular testing ensures that any changes you make to your store—such as adding a new app or modifying your theme—haven't accidentally broken the payment flow. If you want a deeper look at how HidePay helps merchants reduce irrelevant options by market or product, see our announcement post explaining HidePay’s benefits and use cases.

How to Enable Test Mode in Shopify

Before you can use test credit card numbers, you must place your store in a testing environment. Shopify offers two primary ways to do this: Shopify Payments Test Mode and the Bogus Gateway.

Enabling Shopify Payments Test Mode

If you use Shopify Payments as your primary processor, this is the most accurate way to test. It uses the actual Shopify Payments infrastructure but prevents any real charges.

  1. Navigate to your Shopify admin and select Settings, then Payments.
  2. In the Shopify Payments section, click Manage.
  3. Scroll to the bottom to find the Test Mode section.
  4. Check the box for Enable test mode.
  5. Click Save.

While this mode is active, you cannot use real credit cards. If you attempt to use a real card, Shopify will return an error. This prevents accidental charges during the development phase.

Using the Shopify Bogus Gateway

If Shopify Payments is not available in your region, or if you want to test a generic environment without affecting your main provider settings, use the Bogus Gateway.

  1. In Settings > Payments, if you have a provider active, you must deactivate it first or choose to "Switch to a third-party provider."
  2. Search the list for (for testing) Bogus Gateway.
  3. Select it and click Activate.

The Bogus Gateway is a simplified simulator. It is useful for quick checks but does not provide the specific card-type simulations (like Visa vs. Amex) that Shopify Payments Test Mode offers.

Action Summary: Preparing Your Environment

  • Choose Shopify Payments Test Mode for the most realistic simulation.
  • Use Bogus Gateway if you are in a region where Shopify Payments isn't supported.
  • Never enable test mode on a live store during peak traffic hours, as real customers will be unable to complete purchases.
Easily Customize Shopify Payments

Hide, sort, and rename Shopify payment methods using powerful conditions. Customize your checkout and control payment options with HidePay.

Successful Shopify Credit Card Test Numbers

To simulate a successful transaction, you must enter specific details at checkout. For the "Name on Card," you should enter at least two words (e.g., "John Doe"). For the "Expiry Date," use any date in the future. For the "Security Code" (CVV), use any three digits (or four digits for American Express).

Use the following numbers for successful simulations in Shopify Payments Test Mode:

Card Type Test Card Number
Visa 4242 4242 4242 4242
Mastercard 5555 5555 5555 4444
American Express 3782 822463 10005
Discover 6011 1111 1111 1117
Diners Club 3056 9309 0259 04
JCB 3566 0020 2036 0505
UnionPay 6200 0000 0000 0005

If you are using the Bogus Gateway, the process is even simpler. Enter "1" as the credit card number to simulate a successful payment.

Testing Failed Transactions and Error Messages

It is often more important to test failures than successes. You need to know if your checkout clearly explains why a payment didn't go through. If a customer's card is declined, do they know it’s because of insufficient funds, or do they think your website is broken?

Use these numbers to trigger specific error states:

Failure Scenario Test Card Number
Generic Decline 4000 0000 0000 0002
Insufficient Funds 4000 0000 0000 9995
Lost Card 4000 0000 0000 9987
Stolen Card 4000 0000 0000 9979
Expired Card 4000 0000 0000 0069
Incorrect CVC 4000 0000 0000 0127
Processing Error 4000 0000 0000 0119
Disputed Transaction 4000 0000 0000 0259

When you use these numbers, Shopify will display the corresponding error message on the checkout page. This allows you to verify that the UI remains clean and that the messaging is helpful.

Testing Manual Input Errors

Beyond using specific test numbers, you should manually enter incorrect data to test Shopify's built-in validation:

  • Enter an expiry month like "13."
  • Enter an expiry year in the past (e.g., "2020").
  • Enter a CVV with only two digits.
  • Enter a zip code that does not match the formatting for the selected country.

Advanced Testing: Shop Pay and Express Buttons

Express checkout options like Shop Pay, Apple Pay, and Google Pay are popular because they reduce friction. However, they can be tricky to test.

When Shopify Payments is in test mode, express checkout buttons usually remain visible. To test Shop Pay specifically, you can add a test card to your Shop Pay account. When prompted for a "Nickname" for the card, enter test_card. This tells the system to process the transaction as a simulation even if you are using the express flow.

If you are testing other express buttons like PayPal or Apple Pay, be aware that these services often use their own internal test environments. If you click a "PayPal Express" button while in Shopify test mode, it may still try to open a real login window. Always check the order in your Shopify admin afterward; it will have a "Test Mode" banner if no real money was moved.

If you need to hide or block Express Checkout buttons during testing or production, HidePay includes options to target and hide dynamic checkout buttons; consult the help article that explains how to hide express checkout buttons with HidePay.

Optimizing the Checkout with HidePay

Once you have used test numbers to verify that your payment methods are working, the next step is to control how and when they appear. A cluttered checkout with too many irrelevant options can confuse customers and lead to abandonment.

Our tool allows you to refine this experience using native Shopify Functions. This means our logic runs inside Shopify’s own infrastructure, ensuring high performance and reliability without the need for theme code edits. For a walkthrough on creating custom payment rules in the app, see the step-by-step guide to creating a payment customization in HidePay.

Strategic Hiding and Sorting

You can use the insights gained from your testing to set up rules in the app. For example:

  • Geography-based rules: If you have tested that a certain payment method has high failure rates or high fees in a specific country, you can hide that option for customers in that region. There’s a dedicated help doc that explains how to organize payment methods by country or Shopify Market.
  • Product-based rules: If you sell high-risk or high-ticket items, you might want to hide express buttons that have lower security verification and instead force customers to use a standard credit card entry.
  • Order Total rules: For very small orders, you might hide payment methods that charge a high flat-rate transaction fee to protect your margins.
  • Sorting: You can reorder your payment methods so that your preferred provider (the one with the lowest fees or highest reliability) appears first. Learn how to sort and rename payment methods in the HidePay documentation.

The goal of testing with credit card numbers is to ensure the pipes are connected. The goal of using our tool is to ensure the right water flows to the right customer. If you’d like to read more about why HidePay was built and the business problems it solves, check the product launch blog post that introduces HidePay and its use cases.

If you’re ready to try the app after verifying your checkout flows, install HidePay — free to install — from the Shopify App Store.

Managing Test Orders in Your Admin

Test orders will appear in your Orders list just like real transactions. They are clearly labeled with a "Test" tag, and they do not affect your financial reports or Shopify Analytics. However, they can clutter your view.

How to Clean Up Test Data

Shopify does not allow you to permanently delete orders that have gone through a checkout process, as this would interfere with record-keeping integrity. Instead, you should:

  1. Go to the Orders section.
  2. Click on the test order.
  3. Select Archive from the "More actions" menu.
  4. If the order was created via the Bogus Gateway, you may also have the option to Cancel it first.

Archiving removes the order from your "Open" orders list, keeping your workspace organized for real customer activity.

Key Takeaway: The Final Check

Before you switch your store from test mode to live mode, perform one "Final Verification" purchase.

  • Turn off Test Mode.
  • Use a real credit card to buy a low-cost item.
  • Verify that the funds are deducted from your account.
  • Immediately cancel and refund the order in the Shopify admin.
  • Confirm the refund reaches your card.

This final step ensures that your account is fully approved by the payment processor and ready to accept real money from the public.

Common Issues During Payment Testing

Even with the correct test numbers, you might encounter unexpected behavior.

Confirmation Emails Not Sending: Sometimes, Shopify suppresses automated notifications for test orders to prevent spamming your own inbox. If you need to test these, check your Settings > Notifications to ensure the templates are active.

Express Buttons Not Working: As mentioned, Apple Pay and Google Pay require their own "Sandbox" or test setups. If an express button fails while Shopify is in test mode, it is likely because the third-party provider doesn't recognize the test environment.

Local Payment Methods Missing: Methods like iDEAL or Sofort often disappear when test mode is enabled because they require real-time banking redirects that cannot be easily simulated with a static card number.

If you run into issues identifying the exact payment method identifier to target in HidePay, the help article on retrieving the correct payment method explains how to use the app’s logs and troubleshooting tools.

Conclusion

Mastering Shopify credit card test numbers is a fundamental skill for any professional merchant. By simulating both successful and failed transactions, you protect your store from technical errors and provide a better experience for your customers. Testing isn't just a one-time task; it should be part of your routine whenever you add new products, change shipping settings, or update your store’s apps.

Once your payments are verified and your checkout is stable, you can use HidePay to further refine the experience by hiding, sorting, or renaming payment methods based on customer behavior and location. For a broader view of how HidePay and related apps can be bundled to optimize checkout and shipping together, see the Nextools post introducing the HideSuite bundle.

  • Enable test mode in your Shopify admin.
  • Use the Visa, Mastercard, and Amex test numbers to verify successful flows.
  • Trigger a "Declined" error to see your store's messaging.
  • Turn off test mode and perform one real transaction before going live.

Ready to take full control of your checkout? Install HidePay from the Shopify App Store today to start optimizing your payment methods.

FAQ

Can I use real credit cards while Shopify test mode is enabled?

No. While test mode is active, Shopify Payments will block real credit card transactions. This is a safety feature designed to prevent accidental charges while you are configuring your store. To accept real payments again, you must disable test mode in your payment settings.

Do test orders affect my store's analytics or sales reports?

Test orders do not count toward your total sales, order count, or other key performance indicators in Shopify Analytics. They are filtered out of your financial reports to ensure your data remains accurate. However, they will appear in your primary Orders list until they are archived.

Why do some payment methods like PayPal still show up in test mode?

Express gateways and third-party providers often have their own independent settings. If you haven't specifically placed those providers into "Sandbox" or "Test" mode within their own dashboards, they may still attempt to process real transactions. Always look for the "Test Mode" banner on the resulting order in your admin.

Do I need to be on a paid Shopify plan to test credit card numbers?

Yes. Shopify requires you to be on a paid plan (or a development store) to access payment gateway settings. If you are on a free trial, you can still set up your gateway, but you generally need to select a plan level before you can fully simulate the checkout experience.


Helpful resources

  • HidePay on the Shopify App Store
  • How to create a payment customization (HidePay help docs)
  • Sort and Rename payment methods in the Checkout (HidePay help docs)
  • HidePay Help Docs (main index)
  • Hide the Express Checkout with HidePay (HidePay help docs)
  • Introducing HidePay for Shopify (Nextools blog post)
  • Introducing Nextools’ HideSuite: the bundle for smart Shopify merchants (Nextools blog post)

Get Started with HidePay

Hide, sort, and optimize Shopify payment methods instantly—no code required.