Think of the payment gateway as a virtual gate. Every transaction on your ecommerce site must pass through this gate for validation. It’s the online service that allows you to accept credit cards, debit cards, and local payment methods like iDEAL or Payconiq (soon to be Wero).
Payment gateways are usually built into the final checkout page on the website. After customers provide their billing and shipping information, they are prompted to enter their payment details and must click to initiate payment.
Read more: Select the right payment gateway for your digital products ecommerce store
The two types of payment gateways
Not every gate looks the same. Depending on your business size and technical comfort, you likely use one of these three setups. Knowing which one you have will determine how to test a payment gateway effectively.
Hosted payment gateways
This is the most common choice for SMEs. When a customer clicks pay, they are temporarily redirected from your site to the payment provider’s secure page (like Mollie’s hosted checkout). Once the payment is complete, they are sent back to your website, usually to see a ‘thank you’ page.
The benefit: The hosted gateway is highly secure because the provider manages all sensitive data.
The testing focus: Test the return journey to ensure the customer successfully returns to your site after payment.
API or non-hosted gateways
This is the custom-built option. You have full control over the checkout design, and the payment processing is handled via an API.
The benefit: Complete flexibility for unique business models (like custom subscriptions).
Testing focus: This requires the most rigorous integration testing, as your developers are responsible for the entire communication chain between your site and the processor.
What is a test payment gateway?
A test payment gateway is your private sandbox or testing environment. It’s a safe space where developers can troubleshoot your payment system without processing real money. In this environment, you can identify bugs and test the customer journey using dummy card numbers, ensuring everything works perfectly before you go live.
Payment gateway vs payment processor
People often use the terms ‘gateways’ and ‘processors’ interchangeably, but they are technically distinct.
The payment gateway is the front-end messenger. It captures the customer’s data and tells your website if the payment was approved or declined.
The payment processor is the back-end engine. It does the heavy lifting of moving the actual money between the banks.
Payment gateway vs payment terminal
If you’ve ever run a physical retail store, you’re already familiar with a payment terminal (often called a PDQ machine or card reader). This is the physical hardware customers use to tap or swipe their cards. The payment gateway is essentially the digital version of that terminal; it reads the digital information entered into your website’s checkout page.
Why do we need to test payment gateways?
The payment gateway is the heart of your business. Testing ensures that all the moving parts: your website, the banks, and the security protocols are working in harmony.
Beyond just taking money, testing allows you to confirm that you can approve transactions and authorise orders correctly. If a payment gateway or processor is unstable during testing, it’s a sign you might need to consider alternative providers.