Everything you need to know about payment gateway testing

Don’t let a technical glitch cost you a sale. Learn how to use a test payment gateway, follow our checklist, and ensure a smooth checkout for your customers.

Don’t let a technical glitch cost you a sale. Learn how to use a test payment gateway, follow our checklist, and ensure a smooth checkout for your customers.

Nick Knuppe

Head of product marketing

When you’re growing an SME, the last thing you want is a ‘payment failed’ message standing between a customer and their purchase.

After all, you’ve done the hard part. You’ve built a brand, optimised your SEO, invested in marketing and website design, and you’ve successfully guided a customer through the funnel.

They’ve browsed your collection, added to their cart, and finally clicked ‘purchase’, and then the entire process is derailed by a ‘payment failed’ error.

It might just be a small technical glitch to you, but to your customer, it’s a failed promise, broken trust, and a direct hit to your bottom line.

This is where payment gateway testing becomes your most valuable insurance policy.

This guide will help ensure your site is secure, your integrations are airtight, and your checkout is ready to help turn every click into a confirmed sale.

What is payment gateway testing?

Payment gateway testing is the process of verifying that your digital cash register works exactly as it should.

It’s a way to test payment gateway functionality, security, and speed to ensure that when a customer clicks pay, the money moves safely from their account to yours without any hiccups.

Platform functionality and online security are critical to the ecommerce sales cycle. Rigorous testing is essential for any business that wants to provide a professional, friction-free payment experience.

Before we dive into the ‘how’ let’s clear up the ‘what.’ Understanding these terms helps you speak the same language as your developers.

What is a payment gateway?

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.

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

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

Types of payment gateway testing

When you’re talking to developers, it helps to have a framework. We break payment gateway testing down into four distinct pillars. This ensures that not only does the pay button work, but that the entire infrastructure behind it is rock-solid.

Functional tests

​​Functional testing makes sure that the application behaves as expected. This could include placing orders, confirming correct calculations for multiple items, applying codes, and estimating taxes.

Functional test cases for payment gateways

  • Testing payment gateway success: Does a valid card number direct the customer to a thank-you or order-confirmed page? Does the system correctly handle different card types (Visa, Mastercard, and American Express)?

  • Calculations & logic: Are the shipping costs and VAT/taxes calculated accurately based on the user’s address? If a customer applies a discount code, does the gateway reflect the new, lower price?

  • Error handling (Also known as ‘negative testing): What happens if a user leaves the CVV field blank or enters an expired date? The system should provide a helpful, human error message rather than a technical code.

  • Successful transaction: Verify that the payment was processed with valid details, that funds were transferred, and that confirmation was received.

  • Failed transactions: Test with invalid card numbers, expired cards, incorrect CVV, or insufficient funds.

  • Declined or blocked cards: Ensure the system properly handles blocked or fraud-flagged cards.

  • Network or connection failure: Simulate interruptions to ensure the system doesn’t double-charge and can handle transaction timeouts.

  • Partial payment or session timeouts: Test behaviour when a user abandons the payment page halfway, or the session expires.

  • Currency conversion: Validate the conversion to the user's location's currency.

  • Refund management: Check that refunds (full and partial) are processed and credited back correctly.

Integration tests

On a basic level, your website is a collection of different apps talking to each other. Integration testing ensures that your website, payment gateway, and backend (e.g., Shopify, Magento, or an ERP) all speak the same language.

If you are using one of our pre-built integrations, much of this logic is already optimised, but testing remains a vital step to ensure your specific configuration works perfectly.

Test cases for payment gateway integration

  • Order creation: Once a payment is authorised, does an order appear in your store’s dashboard with a ‘paid’ status?

  • Webhook handling: Does your site receive the success ping from the gateway to automatically trigger a confirmation email to the customer?

  • Refund & void scenarios: Can you initiate a refund from your website’s admin panel and ensure the transaction status is updated correctly in the payment gateway?

  • Multiple payment methods: Test credit cards, debit cards, net banking, and UPI.

  • Return URL and redirection: Are the customers correctly redirected back to your webshop after successful or failed purchases?

Security tests

This is the most critical pillar for building trust. Security tests make sure that sensitive data (such as card numbers) is never exposed to hackers and that you meet legal requirements. At Mollie, we prioritise this through our fraud and risk management solution, which helps you maintain high security without adding friction to the customer journey.

Payment gateway security test cases

  • Data encryption: Is the connection between your site and the gateway protected by SSL (the little padlock in the URL)?

  • PCI DSS compliance: Ensure customer card data is tokenised, meaning the actual card number is replaced with a secure code so it’s never stored on your servers.

  • Fraud prevention: Test what happens when a transaction is flagged as high risk. Does your system hold the order for review?

3 gateway testing methods at a glance

Below is a comprehensive summary of the 4 testing methods and their test scenarios.

Testing method

What it tests

Test cases

Functional testing

The application behaves exactly as expected during the transaction flow.

  • Valid card details lead to a thank-you page.

  • Helpful messages for expired cards, empty CVVs, or insufficient funds.

  • Accurate VAT, shipping costs, and discount code application.

  • Handling declined/blocked cards and simulated network failures.

  • Convert amounts correctly for international users and process full/partial refunds.

Integration testing 

Ensures your website, shopping cart, and backend (ERP) are speaking the same language


  • The orders appear as paid in your dashboard after authorisation.

  • Checking the success ping triggers automated customer emails.

  • Customers are redirected back to your shop after payment.

  • The flow between shopping carts (Shopify, Magento) and the PSP API responses.

  • Verify that the payment gateway API has been integrated correctly. 

Security testing

Protects sensitive data from vulnerabilities and ensures legal compliance.

  • Validating SSL connections. 

  • Card data is tokenised and never stored on your local servers.

  • High-risk transactions are correctly flagged and held for review.

Payment service provider testing

A payment service provider test covers the full end-to-end flow. This includes not only transaction authorisation but also settlement, ensuring funds are actually moved from the customer’s bank to your business account.

Testing your PSP overlaps with gateway testing, but it’s vital for checking that your financial reporting, payouts, and multi-currency settlements are functioning correctly.

How to test your payment gateway: automated and manual testing

For a growing business, the best strategy is to combine both automated and manual gateway testing. While automation handles the repetitive, technical heavy lifting, manual testing ensures the experience actually feels good for your customers.

How to test a payment gateway manually

Think of manual testing as a dress rehearsal. You are stepping into your customer’s shoes to identify friction points that a computer script might overlook.

Manual testing scenarios:

  1. The mobile walkthrough: Open your checkout on a smartphone. Is the pay button easy to tap? Does the numeric keypad pop up automatically when entering card details?

  2. The stress test: Disrupt the flow. Hit the back button mid-transaction or refresh the page while the payment is processing. A robust gateway should handle this gracefully without double-charging or crashing.

  3. UI messaging check: Enter an incorrect CVV on purpose. Does the error message say something helpful like “Please check your security code,” or does it throw a scary technical code like “Error 402: Payment_Required”?

  4. The abandonment test: Close the browser tab halfway through the payment. Check your backend later to confirm that the system correctly marked the order as pending or abandoned.

How to test a payment gateway automatically

As your business scales, you can’t manually test every button every time you update your website. This is where automation comes in. Your developers will use scripts to run hundreds of tests in seconds.

Automated testing scenarios:

  • Regression testing: Every time you add a new plugin or update your site, automated scripts run through your payment gateway testing checklist to ensure nothing else breaks.

  • Bulk data testing: Automated tools can test hundreds of different test card combinations (different countries, different banks, different currencies) in a fraction of the time it would take a human.

  • API response validation: Scripts verify that the hidden conversation between your site and your payment provider is working correctly, ensuring that digital webhooks are sent and received within milliseconds.

  • Continuous monitoring: You can set up automated alerts that ping your checkout every hour. If the response time slows down, you get an alert before your customers do.

Payment gateway testing checklist

Use this comprehensive checklist to oversee a smooth testing process. 

Payment gateway testing checklist

  • Collect all the details about your payment gateway: That includes major payment methods, security compliance, and localisation

  • Access the sandbox: Ensure you are in Test Mode and NOT using live credentials. Never test with real customer data on a live site.

  • Functional testing: Check that all methods (Credit Card, PayPal, etc.) appear correctly, and whether the currency symbol changes based on the customer’s location.

  • Test mobile checkout: Is the gateway easy to use on a smartphone?

  • Performance testing: Test the form’s functionality, submission, and transitions; email/SMS alerts and errors, or any other message you want to display.

  • Integration testing: Assure complete compatibility with the API and the operating platform.

  • Review the payment gateway security checklist: Confirm SSL certificates are active, and encryption is in place.

  • Automate where possible: Ask your developers to set up automated scripts for routine checks.

  • Update regularly: As payment methods change, update your test payment gateway scenarios accordingly.

Your partner in payments: Why gateway testing is easier with Mollie

We understand that you want to focus on growing and selling, not troubleshooting code. Mollie makes testing incredibly easy by providing a dedicated Test Mode that perfectly mirrors the live environment.

In the Mollie Dashboard, you have access to two distinct API keys: a Test API key and a Live API key. Byusing your Test API key, you can simulate payments without moving a single cent. Mollie provides a full list of test card numbers and payment statuses (Paid, Cancelled, Expired, Failed) so you can see exactly how your website responds to every possible customer action.

Once your test transactions look perfect in your Mollie Dashboard and your orders are being marked as Paid in your shop backend, switching to Live Mode is as simple as swapping in your Live API key.

Ready to see how easy payments can be? Create your Mollie account today and start testing in minutes.

FAQs: payment gateway testing

  1. Do I need a real credit card to test? No. Your PSP will provide test cards that simulate different scenarios at no cost.

  2. What is a Payment Service Provider (PSP) test? A PSP test covers the full end-to-end flow, including how funds ultimately reach your bank account.

  3. Is it safe to leave my site in test mode while I’m working on it? Yes. Test Mode is a completely separate environment. As long as you haven’t switched your API keys to live,  no real transactions can take place. It’s the perfect safe space to experiment without risking your bank account or your customer data.

  4. Does testing a payment gateway cost money? No. Testing in a sandbox environment is almost always free. You aren’t processing real money, so there are no transaction fees or bank charges involved. It’s a cost-free, risk-free way to ensure your business is ready for launch.

  5. What happens if I forget to switch from test mode to live mode? This is a common concern! If you stay in test mode, your customers will see an error at checkout or a message stating the site is in a testing environment. No real payments will be processed. At Mollie, we make this switch a simple one-click process in your dashboard to help you avoid this.

  6. Do I need to test each payment method (e.g., Apple Pay and PayPal) separately? Ideally, yes. While the gateway itself might be working, different payment methods have different return journeys. For example, PayPal redirects a user to its own site and back again. Testing each one ensures that these redirections work smoothly on both desktop and mobile.

  7. How do I know if my security testing passed? If you are using a provider like Mollie, much of the heavy lifting for security (like PCI compliance) is handled for you. You can verify your setup by checking for the SSL padlock in your browser’s address bar and ensuring that no raw credit card data is stored in your website’s database.

  8. How do I test what happens when a payment fails? When you make a test payment with Mollie, you will see a dialogue box that lets you choose the status. You can select Failed, Cancelled, or Expired to see how your website handles those specific errors.

More updates

Table of contents

Table of contents

MollieGrowthEverything you need to know about payment gateway testing
MollieGrowthEverything you need to know about payment gateway testing
MollieGrowthEverything you need to know about payment gateway testing
MollieGrowthEverything you need to know about payment gateway testing