Table of Contents
Testing your Shopify store is essential to ensure a seamless checkout experience for your customers. When you need to test payments, Shopify provides various ways to simulate transactions, helping verify that every aspect of your store, especially the payment and checkout processes, works flawlessly. To get started, you’ll want to enable test mode in your Shopify payments settings. This feature allows you to activate test payments in Shopify, ensuring smooth operations before going live.
You want to know how to test shopify payments? In this guide, we’ll walk you through the test mode and use test credit card numbers provided by Shopify to place test orders and test the checkout process. Whether you're testing payments on Shopify using credit card numbers to simulate successful or failed transactions, or setting up your development store, Shopify has you covered with the bogus gateway and test mode for Shopify payments.
Importance of Shopify Testing
Before diving into the specifics, it's important to understand why testing is critical for your Shopify store. By testing, you can simulate different scenarios that your customer might encounter. This helps you identify and fix issues before they affect a real customer during checkout.
Testing also helps you familiarize yourself with the checkout process and settings for order processing, ensuring you provide the best customer experience.
Check also our new feature: Stripe Form Recording.
Enabling Test Mode in Shopify
The first step in testing your Shopify store is to enable test mode. This feature of Shopify allows you to simulate transactions without using real credit cards or conducting real payment processes. To enable test mode, you'll need to access the Shopify admin panel and navigate to the Shopify payments section or the payment providers section, depending on your setup.
Shopify Payments Test Mode
If you're using Shopify Payments, you can enable test mode directly in this section. Once test mode is activated, you can only use test credit cards to simulate payments without any real money being transferred. This feature is especially useful for checking credit card error messages that might be displayed to a customer or for simulating a failed transaction. Remember to test your website when the traffic on the portal is lower - so no real users are affected.
You can find more information on enabling Test Mode below in our Shopify Testing Scenario on E-commerce.
Third-Party Payment Provider
If you're using a third-party payment provider, the process might differ slightly. In most cases, you can go to the payment settings and click 'Switch to a third-party provider' to access test mode options. Each provider may have specific instructions for entering test mode.
Testing Payment and Checkout Processes
Simulating a Successful Transaction
Once test mode is activated, it's time to test the entire checkout process. Create an order as a customer would, and use the following test credit card number provided by Shopify for a successful transaction. This process helps ensure that your payment methods, including local payment methods, are set up correctly and that the transaction flows smoothly from the customer's perspective.
To test a successful transaction, provide the following credit card details at checkout:
- Name on card: Make sure to enter a name consisting of at least two words.
- Expiry date: Choose any future date.
- Security code: Enter any combination of three digits.
- Card number: Select from the list below according to the card type:
- Visa: 4242424242424242
- Mastercard: 5555555555554444
- American Express: 378282246310005
- Discover: 6011111111111117
- Diners Club: 30569309025904
- JCB: 3530111333300000
Error Messages
To thoroughly test your Shopify store, simulate different customer scenarios. This includes testing various payment methods, simulating a customer being asked for credit card details, and checking how your store handles orders using different shipping options.
To display the various error messages a customer might encounter during checkout, you can test with these specific credit card numbers to trigger different types of failed transactions:
- For a "card declined" message, use the credit card number 4000000000000002.
- To prompt an "incorrect number" message, enter the credit card number 4242424242424241.
- To mimic a disputed transaction, use the credit card number 4000000000000259.
- Enter an invalid expiry month, like 13, to see an "invalid expiry month" message.
- Input an expiry year that has already passed to get an "invalid expiry year" message.
- Enter a two-digit security code to trigger an "invalid security code" message.
Testing with a Shopify Bogus Gateway
For a more in-depth test, Shopify allows the use of a 'Bogus Gateway.' This gateway lets you simulate transactions without any external payment provider. You can simulate both successful and failed transactions using specific credit card details provided by Shopify Help Center.
Test Orders and Shopify Admin
Placing test orders is an integral part of the testing process. When you place a test order, you can view it in the Shopify admin to understand how orders will appear when real transactions occur. This can help you familiarize yourself with order management in your Shopify store.
Once you've finished testing, it's important to disable test mode and switch back to accepting real payments. Remember to check all your payment settings and ensure that Shopify Payments or your third-party payment provider is set up correctly for live transactions.
Using Real Transactions for Final Verification
While testing with simulated data is crucial, sometimes using real transactions can give you the final confirmation that everything is set up correctly. Consider making a small purchase yourself to verify the entire process end-to-end.
Shopify Test Credit Card - Test Scenario
Setting Up Shopify for Test Transactions
- Enable Test Mode:
- Go to your Shopify Admin panel.
- Click on 'Settings' and then 'Payments'.
- In the 'Payment providers' section, find your payment gateway (like Shopify Payments, PayPal, etc.).
- Enable the test mode. For Shopify Payments, you can do this by checking 'Enable test mode'. Other gateways might have a similar option.
- Use Shopify's Bogus Gateway (Optional):
- If you're using Shopify Payments, you can also enable the Bogus Gateway for testing.
- In 'Payment providers', click 'Choose third-party provider'.
- Search for and select 'Bogus Gateway'.
- This gateway allows you to enter specific information to simulate different types of transactions.
In this use case we used Yakushi Knives, e-commerce platform specializing in the sale of knives. Here's how you might set up Shopify Payment Tests for your business:
- Visit main page:
- Navigate to the website's main page.
- Check if the cart is empty:
- Click on the cart icon.
- Confirm if a message indicating the cart is empty is displayed.
- If items are present, remove them.
- Verify the cart is now empty.
- Visit 'Knives' subpage and add an item to the cart:
- Navigate to the 'Knives' subpage from the main menu.
- Select a knife product.
- Click on the 'Add to Cart' button.
- If prompted, choose any necessary product options.
- Confirm the item is added to the cart.
- Provide an invalid discount code to display the error:
- Proceed to the checkout page.
- Locate the discount code input box.
- Enter an invalid discount code.
- Click the 'Apply' button.
- Add an assertion to the text of the error message displayed.
- Verify error messages on a blank order form:
- Navigate to the order form.
- Without entering any information, attempt to proceed with the order.
- Test each error message that corresponds to a blank required field.
- Repeat the process for all required fields to ensure all error messages are tested.
- Fill out the order form - address details:
- Add an email address for order confirmation
- Select the country from the dropdown menu.
- Enter the recipient's name.
- Input the address, including street, city, and zip code.
- Provide a phone number.
- Ensure all mandatory address fields are completed.
- Fill out the order form - card details:
- Enter the test credit card number (according to Shopify documentation).
- Provide the card's expiration date
- Input the CVV code
- Ensure the cardholder's name is correctly entered.
- Verify all payment details are filled accurately.
- Verify if error messages disappear when the form is filled:
- Review each previously tested error message location.
- Confirm that completing the required fields removes the corresponding error messages.
- Proceed to the next field until all error messages have been addressed.
Things to Keep in Mind
- Transactions made in test mode are not real, but they will appear in your orders list as if they were real.
- Remember to switch off test mode when you've finished testing. Real customers won't be able to check out if test mode is still enabled.
- Make sure to thoroughly test all possible scenarios to ensure a smooth customer experience.
By following these steps, you can effectively simulate various order and payment scenarios in your Shopify store, ensuring that your payment gateway and checkout process are functioning correctly before going live.
It's worth considering a scenario where it's beneficial to test payment verification using a real payment card on the production account of the store.
This, of course, requires separate preparation of test data and accounts, for instance, to be able to process a refund of the used funds from the payment operator.
Conclusion
Testing your Shopify store is a non-negotiable part of setting up a successful ecommerce platform. By thoroughly testing using Shopify test mode, test credit cards, and simulating various customer scenarios, you help ensure a seamless and enjoyable shopping experience for your customers.
Remember, a smooth checkout process and error-free payment system are key to winning customer trust and boosting your online store's success.
Happy (automated) testing!
FAQ - Shopify Payments
What Is a Test Card on Shopify?
A test card on Shopify is typically a credit card number provided by payment gateways that merchants can use to ensure their Shopify store's checkout process and payment gateway setup are functioning properly. These test cards do not involve real money transactions but simulate the payment process for testing purposes.
Does Shopify Have a Test Site?
Shopify does have a feature to enable a test mode for your store. When you are in test mode, you can test your checkout process and payment configurations without processing actual transactions.
Can I Test Shopify For Free?
You can test Shopify for free using their trial period offer. Shopify usually provides a 14-day free trial, which allows you to set up your store and test its features without having to pay for a subscription. However, to continue using Shopify after the trial, you must choose a payment plan.
How to Pay Shopify Without Credit Card?
To pay Shopify without a credit card, you can use alternative payment methods if available, such as PayPal, bank transfers, or other payment providers that Shopify supports. The availability of these payment methods can vary by country and Shopify plan.