Request info

What is Payment Gateway Testing? Definition and Test Cases

Some of the most popular payment gateways are PayPal, Stripe, and Amazon Pay. So, what is payment gateway testing, and does it REALLY impact the end-user experience so critically? (Yes… yes, it does.)

What is payment gateway testing?

Failure at any point in the chain can cause frustration and more significant issues. If users can’t remember their 3-digit security code, they may try once or twice and then give up entirely on the sale. If an error comes back that the user can’t understand (e.g., a thrown exception), they’re liable to lose trust. If an order is completed, but payment information can’t validate, companies could find themselves packaging orders without being paid. These are just a few potential impacts to companies and users if payment gateways aren’t thoroughly tested.

Payment gateways vs. payment processors

To help understand payment gateway testing, let’s clarify the difference between payment gateways and payment processors and how they fit into the payment process. Payment gateways allow merchants to accept online payments and send transaction data to acquiring banks. Payment processors forward payment gateway data to credit card providers and issuing banks. These two technologies work together to facilitate transaction flow between customers, merchants, and banks. Payment gateways form the customer-facing front end of transactions, while payment processors support transactions on the back end.

Let’s break this down:

Payment gateways

Payment gateways act as the online equivalent of in-store point-of-sale terminals that accept credit cards. They serve as a virtual bridge between merchants, customers, and banks, facilitating authorization and processing of online transactions.

When the customer initiates a payment, the payment gateway encrypts their payment data and transmits it to the payment processor of the merchant’s acquiring bank. From here, the data gets forwarded to the credit card association and issuing bank so the transaction can be approved or denied. Once the transaction is approved or denied, the response gets transmitted from the processor back through the gateway to the merchant and cardholder. Funds can then be transferred from the issuing bank to the acquiring bank.

Payment processors

Payment processors handle the backend processing of transactions. After the payment gateway sends encrypted payment data to the payment processor, the payment processor coordinates communication with the credit card association and issuing bank.
The processor verifies funds availability and performs fraud detection checks. If a transaction is approved, the payment processor coordinates settlement and reconciliation as funds are transferred from issuing to acquiring banks. When payment disputes arise, payment processors handle chargeback management.

Popular payment processor services include Worldpay, Square, and Adyen.

Types of payment gateways

Payment gateways can be self-hosted or shared. Self-hosted gateways are installed directly on the merchant’s server. This provides a faster checkout experience, greater control, and more customization flexibility. It places full responsibility for security and technical support on the merchant, which can be a drawback for companies without in-house expertise. Examples of self-hosted gateways include Magento and WooCommerce.

Shared payment gateways are hosted by a third-party provider who directs customers off your website for checkout. This requires less technical expertise and places less responsibility for security on the merchant. It can limit flexibility for customizing your checkout experience. Examples of shared payment gateways include PayPal and Stripe.

8 types of payments testing

Creating a holistic software payments testing strategy

Creating a successful payment gateway testing strategy requires a holistic approach to software testing. Testing payment gateways utilize different software tests against a set of predetermined parameters to check performance and where there’s a need to build out or improve capabilities. Testing must mimic each payment process step to verify that connections and paths for communications are working. You need to test cross-functionality, including test cases like:

Image of icons describing software testing types
  • Functional: Confirms that the payment gateway is properly working with the merchant’s system and processing transactions correctly.
  • Integration: Check that each new service, payment, or feature added is compatible with the existing app.
  • Performance: Verifies the app performs equally across all devices and O/S combinations and tests for the maximum number of simultaneous transactions from multiple users.
  • Usability: Tests the experience of using the payment gateway to ensure it is well-designed and fully functioning.
  • Location: Uses region-based testing examples to verify that the payment gateway can handle customer locations and calculate the proper specifications (sales taxes, global shipping fees, import tax).
  • Localization: international customers can make payments in their local currency.
  • Security: Checks security of PII and financial information. All bank accounts and credit card numbers must be securely transmitted using strong encryption across the transaction.
  • Compatibility: Ensures that the payment gateway can manage transactions across different platforms.

Payment gateway testing scenarios and use cases

Every piece of a payment system needs vetting. These use cases illustrate the complexity of ensuring functional financial transactions across many payment platforms.

  • Check card numbers: Ensure credit card numbers can be read, verified, and processed. Create test cases that validate questions like, “Can the payment gateway process credit and debit card information from various financial institutions and countries?”
  • Check exchange rates and currency: Ensure foreign purchasers succeed and are charged the right amount. Does the software correctly calculate exchange rates, shipping rates, and local taxes?
  • Ensure correct processing time: Check the functionality of the payment gateway when multiple customers are checking out at once. Does processing time change? What happens if the customer’s cart times out?
  • Check security measures: Do the card details get masked? Does the customer use 2FA when initiating the transaction? Is your site secure? 
  • Confirm successful payment confirmation: Make sure APIs return proper payment confirmation to the customer, financial institution, and your internal software. On the same thread, does payment confirmation trigger auto-pay or auto-renewal?
  • Payment failures and following steps: Proper steps should be taken in case of a payment failure, including communication with users and backing orders out of fulfillment systems.

How to Test Payment Gateway Performance: Complete checklist

  1. Collect all relevant test data, such as dummy financial information.
  2. Compile payment gateway data from the merchant.
  3. Create a payment processor sandbox to run simulated scenarios.
  4. Develop a list of error codes and document all error events.
  5. Verify that the process for conducting a transaction successfully works.
  6. Check integration with relevant currencies.
  7. Test for pop-ups and error messages blocked by user browsers.
  8. Ascertain that all payment options are valid and functional and that payments trigger the correct follow-up steps.
  9. Verify that successful transaction messages are going to both merchants and customers.
  10. Know the meaning of all terms in your payment gateway’s system.
  11. Verify that all security and fraud protections are working, including customer messages, and that data is transmitted over HTTPS-secured channels.