How to write test cases for Payment gateway process?

Payment Gateway Testing performs to verify the Payment Gateway process for online purchases and transactions by the users. To ensure the security, reliability, and performance of a payment gateway, it is important to test it by encrypting and securing the payment details between the user and the merchant.

A payment gateway system is a service that approves credit card/ debit card payments / electronic bank transfer payments. Payment gateways protect card details by encrypting sensitive information.

Types of Payment Gateway System

It is essential to have knowledge of payment gateways.

  • Hosted Payment Gateway Solutions:

    The hosted payment gateway system(PayPal or Worldpay) redirected customers from the e-commerce site during the payment process. The customer will return to the e-commerce site once the payment is made.

  • Shared Payment Gateway Solutions:

    While processing payment, a customer is directed to the payment page and stays on the e-commerce site.  eWay, Stripe is an example of a shared payment gateway, since it does not leave the e-commerce site while processing payment.

Related When planning tests, what considerations should be made?

Testing Types for Payment Domain

Payment gateway testing should include the following types of testing:

Functional Testing

It is a test of the payment gateway’s base functionality. The purpose of the test was to check whether the application behaved as expected when handling orders, calculating orders, and applying VAT, depending on the country.


You can test integration with your credit card.


Determine performance metrics such as the highest number of users coming through gateways during a specific day and convert them to concurrent users.


You should conduct a thorough security assessment for Payment Gateway.

A complete checklist is used to test Payment Gateway.

Before you begin testing –

  • Collect the proper test data for the dummy credit card number for Maestro, Visa, Master, etc.
  • Collect information about payment gateways, such as Google Wallet, PayPal, or other methods.
  • Check the payment gateway document for error codes
  • Familiarize yourself with the session and parameters passed through the application and payment gateway.
  • Evaluate the amount of related information passed through the query string, variable, or session.
  • The various settings of the payment gateway, such as currency format, affect what subscriber data is collected.

Examples of test cases for payment gateway testing.

The following are important test scenarios/cases to check the payment gateway:

  • After successful payment, make sure that all the parameters have been retrieved.
  • Determine what would happen if the payment gateway became unavailable during payment.
  • What happens if the payment session ends?
  • During the payment process, please verify the backend data.
  • Please investigate what happens if the payment process fails.
  • Check the security and error pages during the process.
  • Check that a confirmation page is shown to the user once a successful payment is done.
  • Please ensure that the transaction is processed immediately or that it is handed to your gateway account.
  • After a successful transaction, check the return value from the payment gateway if you choose a shared hosting payment gateway.
  • Check the status of the order is changed to completed once the payment is successful.
  • Please check to notify the mail process is sent to the user, once the payment is completed. Encrypt the content of the mail.
  • You can check the amount with the currency format.
  • Please check if each of the payment options is selectable.
  • Check if each listed payment option works as expected.
  • Check if the payment gateway will accept the desired credit/debit option.

Instructor-led Training

Software Testing Online Training

Online Software testing training includes the following modules:
  1. Manual Testing
  2. Database/SQL/Database Testing
  3. JIRA defect management tool
  4. Java Programming
  5. Selenium Framework
  6. TestNG
  7. Cucumber with Maven
  8. Basic of Jenkins

To get more details, please visit the following URL:


Software Testing Classroom Training

Software testing classroom training includes the following modules:

  1. Manual Testing
  2. Database/SQL/Database Testing
  3. JIRA defect management tool
  4. Java Programming
  5. Selenium Framework
  6. TestNG
  7. Cucumber with Maven
  8. Basic of Jenkins
  9. API Testing with SoapUI or Postman
  10. Performance Testing with Jmeter

To get more details, please visit the following URL:


Note: In classroom training, Business Analyst Training is totally free.  And ISTQB Certification training is totally up to you

Final Words

We hope the test cases are explained in more detail. You are welcome to add your test cases to the list as you see fit.

Similar Posts