Topic 3 Payment gateway integration

What Is a Payment Gateway?

A payment gateway is a service that allows businesses, whether they operate online or in physical stores, to accept credit card payments securely. For online stores, it also ensures that the payment process is safe by encrypting the customer’s financial information before sending it to the business owner’s account.

How Payment Gateways Work

To get a better grasp of how payment gateways work, let’s look at the key players involved:

  1. Merchant: This is the person who runs the online business.
  2. Customer: Also called a cardholder, this is the person who buys something from the merchant.
  3. Card network: These are the companies, like Visa, Mastercard, and American Express, that manage the money transfer between customers and merchants.
  4. Issuing bank: This is the bank that provides customers with payment cards (like credit or debit cards) on behalf of the card networks.
  5. Acquiring bank: This bank offers merchant accounts to business owners and handles the payment processing from the issuing bank on behalf of the merchant.

Here is an overview of how a payment gateway operates when customers make online payments:

  1. Customers shop on an online store and decide to buy something. The store then directs them to a payment gateway page where they enter their payment details, like their debit card info.
  2. The payment gateway takes these details, checks for any potential fraud, and encrypts the information using security measures like Transport Layer Security (TLS).
  3. The encrypted information is then sent to the acquiring bank, which processes it.
  4. The acquiring bank passes the payment details to the card network.
  5. The card network forwards the transaction to the customer’s issuing bank.
  6. The issuing bank checks if the customer has enough money in their account and sends a response back to the card network.
  7. The card network tells the acquiring bank whether the transaction is approved or declined.
  8. The payment gateway gets the response from the acquiring bank.
  9. The payment gateway shares this response with the online store, letting the customer know if the payment went through. If it doesn’t, the customer is asked to try another payment method.
  10. If the payment is successful, the customer is notified, and the acquiring bank transfers the authorized funds to the merchant’s account.

So, in simple terms, a payment gateway makes sure that when you buy something online and enter your payment details, your money is securely transferred from your bank to the seller’s bank. If everything checks out, the purchase is completed. If not, you’re asked to use a different payment method.

There are three types of payment gateways available:

  1. Redirection: Also known as a hosted payment gateway, this type redirects the customer to the payment service provider’s (PSP) page to complete the transaction. It’s great for those who are just starting an online business because it’s easy to set up and doesn’t require a merchant account.
  2. On-site checkout, off-site payment: In this case, the checkout process occurs on the merchant’s website, but the payment is processed by a third-party payment gateway. It offers a faster payment process but doesn’t provide full technical support like a hosted service.
  3. On-site checkout and payment: With this payment gateway, customers input their payment information directly on the merchant’s website. It offers more customization and integration options, but the merchant needs to obtain an SSL certificate.