Close announcement
Back to blog

How to Test Shopify Credit Card Payments

how to test shopify credit card payments

Testing orders and payments in a Shopify store is an essential step to ensure that the checkout process works smoothly for your customers. Shopify provides a test mode for this purpose, allowing you to simulate transactions using test credit card numbers without processing actual payments.

Here's a guide on how to do this:

Setting Up Shopify for Test Transactions

  1. 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.

  1. 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.

Shopify Test Credit Card - Test Scenario

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:

  1. Visit main page:
  • Navigate to the website's main page.


  1. 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.


  1. 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.


  1. 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.


  1. 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.



  1. 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.


  1. 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.


  1. 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.

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.

Speed up the entire testing process now

Automate web app testing easier than ever. Without excessive costs. Faster than coding. Free forever.

Dominik Szahidewicz

Software Developer

Application Consultant working as a Tech Writer

Don't miss any updates
Get more tips and product related content. Zero spam.