Introduction
Testing your checkout process is the only way to ensure customers can complete their purchases without friction. Before a store goes live or after making significant changes to payment settings, merchants must verify that every gateway functions as expected. Using Shopify test credit card details allows you to simulate the entire buying journey without actually charging a card or paying transaction fees.
We designed HidePay to help merchants control the visibility of payment methods, and testing those rules is a critical step in a store's setup. This article provides the specific numbers and configurations required to simulate successful payments, declines, and gateway errors. You will learn how to activate test modes and how to use these dummy credentials to verify your store's logic. If you want to get started quickly, you can install HidePay on the Shopify App Store.
By following this guide, you can identify potential checkout bottlenecks and ensure your payment rules are working perfectly.
Setting Up Your Testing Environment
You cannot simply enter a random number into your checkout and expect a simulated result. Shopify requires you to put your payment provider into a specific test mode or use a dedicated testing gateway. There are two primary ways to do this: using Shopify Payments Test Mode or the Shopify Bogus Gateway.
Activating Shopify Payments Test Mode
If you use Shopify Payments as your primary gateway, you can enable a built-in test mode. This allows you to use specific test card numbers to see how the system handles different scenarios, such as successful authorizations or insufficient funds.
- From your Shopify admin, navigate to Settings > Payments.
- Find the Shopify Payments section and click Manage.
- Scroll to the bottom to find the Test mode section.
- Select Enable test mode and click Save.
While this mode is active, your store will not process real credit card transactions. You should never leave test mode enabled on a live store where real customers are attempting to buy products. If you want to learn how HidePay integrates with native Shopify checkout behavior, see our overview in the Nextools blog.
Using the Shopify Bogus Gateway
The Bogus Gateway is a simplified testing tool that any merchant can use, regardless of their location or eligibility for Shopify Payments. It is particularly useful for testing order processing, email notifications, and shipping calculations.
To activate it, you must first deactivate any existing credit card providers. In your payment settings, choose to "See all other providers" and select "(for testing) Bogus Gateway." Once activated, every order processed through your checkout will be a test order until you switch back to a real provider.
Successful Shopify Test Credit Card Details
To simulate a transaction that completes successfully, you need to use specific card numbers assigned to different card brands. These numbers allow you to verify that your store correctly identifies the card type and processes the "payment" into your order history.
Standard Test Card Numbers
When prompted for credit card information at checkout, use the following numbers to simulate a successful purchase. For all of these, you must enter a name (any two words), a CVV (any three digits, or four for Amex), and an expiry date in the future.
| 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 |
Testing with Shop Pay
If you want to test the Shop Pay experience, you can add these test cards to a Shop Pay account. When adding the card, enter test_card at the beginning of the "Nickname" field. This tells the system to process the card using the Shopify Payments test mode infrastructure rather than attempting a real charge.
Nascondi, ordina e rinomina i metodi di pagamento di Shopify usando potenti condizioni. Personalizza il tuo checkout e controlla le opzioni di pagamento con HidePay.
Simulating Failed Transactions
A robust checkout doesn't just work when things go right; it also provides clear feedback when things go wrong. Testing failed transactions helps you see the error messages your customers will encounter. This allows you to provide better support or adjust your checkout copy to reduce abandonment.
Use these specific card numbers to trigger different types of payment failures:
- Generic Card Declined: 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
- Incorrect Card Number: 4242 4242 4242 4241
To test invalid dates, simply enter an expiry month like "13" or a year in the past. To test an invalid security code, enter only two digits for a standard card.
Testing with the Bogus Gateway Details
The Bogus Gateway uses a much simpler set of inputs than the full Shopify Payments test mode. If you are using this gateway, the "Card Number" field acts as a trigger for the result you want to see.
-
To simulate a success: Enter
1in the card number field. -
To simulate a failure: Enter
2in the card number field. -
To simulate a provider error: Enter
3in the card number field.
For the "Name on card," enter Bogus Gateway. You can use any future date and any three digits for the CVV. This is the fastest way to run through a high volume of tests when you are checking things like order automation, fulfillment workflows, or inventory syncing.
Why Testing Your Checkout Logic Matters
Beyond simply "making sure the button works," testing is essential for stores with complex logic. If you use rules to manage your checkout, you need to verify that those rules trigger correctly under different conditions.
Many merchants use HidePay to customize which options appear for specific customer segments or regions. For example, if you have a rule to hide Cash on Delivery for orders under $50, you must run a test order at $40 to confirm the option is gone, and another at $60 to confirm it reappears. To learn how to create a new customization rule in HidePay, see the help article on creating a payment customization.
High-Ticket Item Scenarios
If you sell expensive products, you might want to hide certain payment methods that carry high chargeback risks. Testing ensures that these methods are successfully blocked when a high-value item is in the cart. You can simulate this by adding a high-price item to your cart and verifying that only your preferred, secure payment methods are available.
Geographical Restrictions
International merchants often need to surface specific local payment methods for certain countries while hiding them for others. By using a VPN or changing your shipping address during a test checkout, you can verify that your geography-based rules are functioning. This ensures that a customer in Germany sees Sofort, while a customer in the US does not. For guidance on organizing payment methods by country or market, check the HidePay help index for the country/market organizer articles.
B2B and Customer Tagging
For stores that serve both retail and wholesale customers, payment preferences often differ. You might offer "Net 30" terms only to customers with a "Wholesale" tag. To test this, you must log in as a test customer with that specific tag and ensure the correct payment option appears. Then, log out or use a guest account to verify that the retail customer cannot see the wholesale-only option.
Using Shopify Functions for Better Performance
Modern Shopify apps use Shopify Functions to handle checkout customizations. This is a significant improvement over the old Script Editor because Functions run natively on Shopify's infrastructure. This means they are faster, more reliable, and compatible with features like Shop Pay and side-by-side extensibility.
The app we built is powered by these Native Shopify Functions. This ensures that your payment rules—whether you are hiding, sorting, or renaming methods—do not slow down the checkout process. Testing with the card details provided in this guide confirms that these native customizations are executing correctly in real-time. If you’re interested in the broader Nextools perspective on functions and migration away from Scripts, see the Nextools blog index.
What to Verify After the Test
Once you have completed a test transaction, your work is not quite finished. You should check several areas in your Shopify admin to ensure the data flow is correct:
- Order Status: Does the order appear in your "Orders" list with a "Test" badge?
- Inventory: Was the inventory for the purchased item correctly deducted (or kept the same, depending on your settings)?
- Notifications: Did you receive the "New Order" email notification? If you used a real email address for the "customer," did they receive the order confirmation?
- Apps and Integrations: If you use a third-party fulfillment app or an ERP, did the test order sync to that system correctly?
Managing and Cleaning Up Test Orders
Test orders can clutter your analytics and order history if not managed properly. While you cannot permanently delete an order that has been processed through the checkout (for audit reasons), you can archive or cancel them to keep your view clean.
Archiving Test Orders
Most test orders are automatically archived, but if they remain in your open orders list, you should archive them manually. This removes them from your active fulfillment queue.
- Go to Orders in your Shopify admin.
- Select the test orders you want to remove from view.
- Click Archive orders.
Impact on Analytics
Shopify generally filters test orders out of your primary sales reports. However, if you use third-party analytics tools or manual spreadsheets, you may need to manually exclude these transactions. Always check for the "Test" tag on the order timeline to distinguish these from real revenue.
Troubleshooting Common Testing Issues
Sometimes, a test doesn't go as planned. Here are the most frequent issues merchants face when using test credit card details:
"Real" Transaction Attempted
If you see a real charge on a card or receive an error saying the card is invalid (rather than a simulated decline), you likely forgot to enable test mode. Double-check your payment settings to ensure the "Test mode" box is checked or that the Bogus Gateway is the active provider.
Local Payment Methods Missing
When Shopify Payments is in test mode, certain local payment methods like iDEAL or Sofort may not appear in the checkout. This is expected behavior. To test these specific methods, you often need to use a dedicated sandbox environment provided by those specific services.
Order Confirmation Emails Not Sending
If you are not receiving emails for test orders, check your "Notifications" settings. Ensure the templates are not disabled. Also, check your spam folder. Shopify's test mode uses the same email infrastructure as live orders, so if test emails aren't arriving, it may indicate a configuration issue with your sender email or domain authentication.
Express Checkout Buttons Not Behaving
Express checkout buttons like Apple Pay or Google Pay can be tricky during testing. They often use real card data from your device. Even in test mode, these may appear to process "real" cards, but Shopify will not capture the funds. Always look for the test mode banner on the resulting order to confirm no money changed hands. If you need to hide dynamic/express checkout buttons during testing, see HidePay’s guide on hiding and renaming payment methods in the checkout for step-by-step instructions: Hide, sort or rename payment methods (video guide).
Key Takeaways for Checkout Testing
Successful checkout optimization requires a balance of user experience and business logic. By using Shopify test credit card details, you can fine-tune this balance without risk.
- Always use exact numbers: Use the 4242... series for Shopify Payments and simple triggers like "1" for the Bogus Gateway.
- Test the "Happy Path" and the failures: Ensure your customers know exactly what to do if their card is declined.
- Verify your rules: If you use the app to hide or sort payment methods, test those conditions specifically (e.g., cart totals, countries, or tags). See the help article on sorting and renaming payment methods for details on ordering and renaming.
- Switch back to live mode: Once testing is complete, remember to deactivate test mode and re-enable your real payment providers.
Conclusion
Testing your store with dummy credit card data is a fundamental part of maintaining a professional Shopify store. It allows you to walk in your customer's shoes, verifying that your shipping rates, taxes, and payment rules all work in harmony. Whether you are launching a new brand or optimizing an established store, these tests provide the data you need to make informed decisions.
We developed HidePay to give you total control over this final, crucial step of the customer journey. By combining our app's rules with the testing methods outlined here, you can create a checkout that maximizes conversions while protecting your margins. If you’d like to bundle payment and shipping controls, read about the benefits of using both apps together in the Nextools article introducing HideSuite (HidePay + HideShip).
If you are ready to take control of your checkout experience, you can get HidePay for your store from the Shopify App Store to start building your own payment rules today.
FAQ
Can I use my own real credit card for testing?
You can, but it is not recommended. Using a real card results in actual charges and transaction fees from your payment processor. Even if you refund the order immediately, you may still lose the non-refundable portion of the processing fee. Using the Shopify test credit card details is free and avoids these costs.
Why doesn't the Bogus Gateway accept my test Visa number?
The Bogus Gateway and Shopify Payments Test Mode are separate systems. The Bogus Gateway only recognizes "1", "2", or "3" as card numbers to trigger results. The long 16-digit test card numbers are specifically for use when Shopify Payments has "Enable test mode" turned on.
Do test orders affect my store's conversion rate analytics?
Shopify's internal reports generally exclude orders marked with the "Test" tag from your conversion rate and total sales data. However, if you are using external tracking pixels like the Meta Pixel or Google Analytics, those systems might track the checkout event unless you have specifically disabled tracking for your own IP address or test sessions.
How do I test payment methods like PayPal or Klarna?
To test third-party providers, you usually need to enable a "Sandbox" or "Test" mode within that provider's own dashboard. You would then link that sandbox account to your Shopify store. Each provider has its own set of test credentials and dummy login info that you must use instead of the standard Shopify test numbers.
Where can I learn more or get help configuring HidePay?
For step-by-step setup and the full list of conditions you can apply (cart value, shipping method, country, customer tags, and more), see the HidePay documentation in our help center: HidePay Help Docs. If you prefer a quick start, you can also install HidePay on the Shopify App Store and use the in-app walkthroughs.