Every time you buy something online in India and see that little “Payment successful” message flash on your screen, a lot has happened in the background in under five seconds. Card details are captured, checked, approved, and money is moved between banks you never see. The invisible layer that makes this happen is the payment gateway. For anyone studying e-commerce, understanding how a payment gateway actually functions is not just theory. It is the backbone of every online transaction, and it explains why some payments fail, why refunds take days, and why your card details are never actually stored by most websites you shop on.
Table of Contents
- What exactly is a payment gateway?
- Meet the players in every transaction
- How a payment gateway works: the complete step-by-step flow
- Step 1: Checkout and data collection
- Step 2: Encryption and tokenisation
- Step 3: Authorisation request
- Step 4: Authentication
- Step 5: Approval or decline
- Step 6: Clearing
- Step 7: Settlement
- The security layers working behind the scenes
- The regulatory backbone in India
- Why this process matters beyond the checkout page
What exactly is a payment gateway?
A payment gateway is the technology that securely captures a customer’s payment details at checkout and passes them along to the banking network for verification and approval. Think of it as the digital equivalent of a card-swipe machine at a store counter, except it works entirely online.
It is worth knowing that a payment gateway is technically different from a payment aggregator, even though the two terms are often used loosely in everyday conversation. As per the Reserve Bank of India, a payment aggregator is an entity that pools funds received from customers and transfers them to merchants after a set period, while a payment gateway is the technology provider that enables the secure transmission of transaction data between the merchant, the bank, and the card network, without necessarily holding the funds itself, as clarified by Invest India’s overview of the RBI’s payment ecosystem regulations. In practice, most platforms you use, such as Razorpay, PayU, or Paytm, function as both, offering the technical gateway along with aggregation services.
Meet the players in every transaction
Before we walk through the steps, it helps to know who is involved. A single online payment typically involves five parties, each with a distinct role.
| Party | Role in the transaction |
|---|---|
| Customer | Initiates the payment by entering card, UPI, or net banking details at checkout |
| Merchant | The online business selling the product or service and receiving the payment |
| Payment gateway | Captures and encrypts the customer’s data, then routes the request to the right bank or network |
| Issuing bank | The customer’s bank, which approves or declines the transaction based on funds and validity |
| Acquiring bank | The merchant’s bank, which receives the funds on the merchant’s behalf after approval |
How a payment gateway works: the complete step-by-step flow
Now that the players are clear, here is what actually happens between the moment you click “Pay Now” and the moment you see a confirmation screen.
Step 1: Checkout and data collection
The process begins the moment a customer selects a product and proceeds to checkout. At this stage, the payment gateway presents a secure form where the customer enters card details, UPI ID, or net banking credentials. This form usually runs on the gateway’s own secure servers rather than the merchant’s website, which reduces the merchant’s exposure to sensitive data.
Step 2: Encryption and tokenisation
The moment payment details are entered, the gateway encrypts this information using protocols such as SSL or TLS so it cannot be read if intercepted during transmission. Many gateways also apply tokenisation, where the actual card number is replaced with a randomly generated token that has no exploitable value on its own, and the real data is stored in a secure vault rather than on the merchant’s system, as explained by SISA’s breakdown of PCI DSS tokenisation. This is why a data breach at a merchant’s website usually cannot expose actual card numbers.
Step 3: Authorisation request
The encrypted transaction details are sent from the payment gateway to the acquiring bank, which forwards the request through the relevant card network, such as Visa, Mastercard, RuPay, or the UPI system, to the customer’s issuing bank. The issuing bank then checks whether the account has sufficient balance or credit limit, verifies that the card or account is genuine, and screens the transaction for potential fraud, a sequence outlined in Zoho’s explanation of the payment settlement process.
Step 4: Authentication
For most transactions in India, an additional authentication step is required before approval. This usually takes the form of an OTP sent to the customer’s registered mobile number, a 3D Secure prompt, or a UPI PIN entry. This step exists specifically to confirm that the person completing the transaction is the actual account holder, not someone who has merely obtained the card details.
Step 5: Approval or decline
Once the issuing bank verifies funds and authenticates the customer, it sends back a response of either approved or declined. This response travels back through the card network to the acquiring bank and then to the payment gateway, which finally displays the result to the customer on the merchant’s checkout page, usually within a few seconds.
Step 6: Clearing
An approval does not mean money has already changed hands. It only places a hold on the funds. The transaction details are then forwarded for clearing, where the acquiring bank verifies the transaction and calculates the net settlement amount after deducting fees such as the merchant discount rate, as detailed by Worldline India’s guide to the settlement process.
Step 7: Settlement
In the final step, the acquiring bank transfers the actual funds into the merchant’s account, completing the transaction cycle. This typically takes anywhere from a few hours to two or three business days depending on the payment gateway and the bank’s settlement cycle, though some providers now offer faster settlement windows. Only at this point has the money genuinely moved from the customer’s account to the merchant’s.
The security layers working behind the scenes
Given how much sensitive information flows through a single transaction, payment gateways rely on multiple overlapping layers of protection rather than a single safeguard.
- SSL/TLS encryption protects data while it travels between the customer’s browser and the gateway’s servers.
- Tokenisation ensures that even if a system is compromised, the stolen data has no value because it cannot be reversed to recover the original card number.
- PCI DSS compliance is a global security standard that any entity handling card data must follow, covering how cardholder information is stored, transmitted, and accessed.
- Fraud detection filters flag unusual patterns, such as a sudden high-value transaction from an unfamiliar location, for additional review before approval.
The regulatory backbone in India
Payment gateways in India do not operate in a legal vacuum. The Reserve Bank of India first issued its Guidelines on Regulation of Payment Aggregators and Payment Gateways in 2020, requiring non-bank payment aggregators to register with the RBI, maintain a minimum net worth, and follow strict data storage and KYC norms, while payment gateways, viewed primarily as technology providers, were encouraged to follow baseline security recommendations. This framework was substantially updated when the RBI issued a consolidated Master Direction on the Regulation of Payment Aggregators in September 2025, which brought online, physical, and cross-border payment aggregation under a single, more comprehensive compliance regime, as reported by DD News’s coverage of the updated RBI guidelines. One notable rule under this framework restricts most entities in the payment chain, apart from card issuers and card networks, from storing a customer’s actual card number, which is precisely why tokenisation has become so widespread across Indian e-commerce platforms.
Why this process matters beyond the checkout page
For a commerce student, this sequence of steps is more than technical trivia. It explains real business decisions. A merchant choosing a payment gateway is not just picking a checkout button; they are choosing transaction fees, settlement speed, fraud protection, and customer trust. A slow or clunky authentication step can cause customers to abandon their cart. A gateway with weak fraud filters can expose a business to chargebacks and losses. Understanding this flow also clarifies common customer confusions, such as why an amount gets deducted and then refunded when a transaction technically fails after authorisation but before settlement, as explained by PayPal’s explainer on how payment gateways work. In many ways, the payment gateway is where trust in e-commerce is either built or broken, one transaction at a time.
What do you think? Next time an online payment takes a few extra seconds to process, can you now picture which of these seven steps is likely happening in the background? And why do you think Indian regulators chose to treat payment aggregators and payment gateways differently under RBI guidelines, rather than regulating them identically?
References
- https://www.investindia.gov.in/team-india-blogs/regulation-payment-ecosystem-rbi
- https://www.sisainfosec.com/blogs/what-is-pci-dss-tokenization-its-guidelines-explained/
- https://www.zoho.com/payments/academy/payment-basics/payment-settlement.html
- https://worldline.com/en-in/home/main-navigation/resources/blogs/2023/how-does-the-settlement-process-work-in-a-payment-gateway
- https://ddnews.gov.in/en/rbi-issues-guidelines-for-payment-aggregators-gateways-to-boost-digital-payment-ecosystem/
- https://www.paypal.com/us/brc/article/what-is-a-payment-gateway
Leave a Reply