Every time a customer clicks “Pay now” on an online store, a payment gateway springs into action behind the scenes. It encrypts the card or UPI details, checks with the bank, and sends back an approval or decline in a matter of seconds. But not all payment gateways work the same way. Some redirect shoppers to a separate page, some keep them on your website the whole time, and some hand over almost total control to your development team. For anyone studying e-commerce or e-payments, understanding these differences is essential to grasping how digital transactions actually move money.
Table of Contents
- What a payment gateway actually does
- The four types of payment gateways
- Hosted payment gateways
- Self-hosted payment gateways
- API-hosted payment gateways
- Local bank integration gateways
- Comparing the four types at a glance
- Why PCI DSS keeps coming up
- The regulatory angle in India
- Choosing the right gateway for a business
What a payment gateway actually does
A payment gateway is the technology layer that sits between a merchant’s website or app and the banking network. It captures payment details, encrypts them, and passes them to the payment processor or acquiring bank for authorisation, then relays the bank’s response back to the checkout page. This entire exchange typically happens within a few seconds, which is what makes online shopping feel instant to the customer, even though several institutions are involved in the background, as explained in this overview of how payment gateways work.
What differs across gateways is where this data capture happens, who is responsible for securing it, and how much control the merchant gets over the checkout experience. That difference is the basis for the four broad categories used in the industry.
The four types of payment gateways
Hosted payment gateways
A hosted gateway redirects the customer away from the merchant’s website to a payment page controlled by the gateway provider. The customer enters card or bank details there, completes the transaction, and is sent back to the merchant’s site once payment succeeds. Because the merchant’s server never touches sensitive card data, this model qualifies for the simplest level of PCI DSS compliance, which significantly lowers the security burden on small businesses.
The trade-off is a break in the shopping experience. The customer leaves the familiar site design, which can feel jarring and sometimes leads to cart abandonment. Even so, hosted gateways remain popular with startups and small online sellers because they are quick to set up, require minimal technical skill, and shift most security responsibility to the provider, as noted in this comparison of payment gateway types.
Self-hosted payment gateways
Also called integrated or on-site gateways, this model lets the merchant build the payment form directly on their own website. The customer never leaves the page, but once they submit their card details, that information passes through the merchant’s own server before it is forwarded to the gateway for processing. This keeps the checkout flow seamless and fully on-brand.
The catch is compliance. Since the merchant’s server briefly handles raw cardholder data, the business itself must meet stricter PCI DSS requirements and maintain proper encryption, firewalls, and monitoring. According to this guide on payment gateway models, self-hosted gateways give merchants full control over the customer’s payment journey, but they generally come without a dedicated support team from the provider, so businesses need in-house technical capability to manage them properly.
API-hosted payment gateways
An API-hosted gateway is a hybrid of the two models above. The merchant designs and builds the entire checkout interface, but instead of collecting card data directly, the payment form is powered by the gateway provider’s application programming interface (API). Card details are captured on the merchant’s page but transmitted securely through the provider’s API rather than sitting on the merchant’s own server.
This gives businesses near-total design freedom while still relying on the gateway’s infrastructure for encryption and bank communication. It is the model favoured by large e-commerce platforms, subscription services, and mobile apps that want a smooth, uninterrupted checkout on every device. As this explainer on API-based gateways points out, the flexibility comes at the cost of higher development effort, since integrating and maintaining an API connection needs skilled developers and ongoing technical upkeep.
Local bank integration gateways
This type connects a merchant’s checkout directly to a partner bank’s payment infrastructure, often bypassing third-party aggregators altogether. The customer may be redirected to the bank’s own payment page, similar to a hosted gateway, but the relationship and settlement happen straight through the bank rather than an intermediary processor.
Local bank integration works well for businesses that deal mainly with domestic customers and want lower transaction costs, since there is no aggregator fee sitting between the merchant and the bank. However, it is far less common for larger or international operations because it does not scale easily across multiple banks, currencies, or regions, as highlighted in this comparison of gateway types and their trade-offs.
Comparing the four types at a glance
| Gateway type | Where data is captured | Checkout experience | Compliance burden | Best suited for |
|---|---|---|---|---|
| Hosted | Provider’s page | Redirect away and back | Low (SAQ A level) | New or small businesses |
| Self-hosted | Merchant’s server | Fully on-site | High | Businesses with in-house tech teams |
| API-hosted | Provider’s API, merchant’s UI | Fully on-site, custom-built | Moderate to high | Large e-commerce, apps, marketplaces |
| Local bank integration | Bank’s system | Redirect to bank page | Handled by bank | Domestic-focused, regional businesses |
Why PCI DSS keeps coming up
Whichever gateway type a business picks, one standard governs how card data must be handled: the Payment Card Industry Data Security Standard (PCI DSS). It was created by the major card networks to make sure any organisation that stores, processes, or transmits cardholder data does so securely. The official PCI Security Standards Council describes it as a baseline of technical and operational requirements built to protect payment account data.
The practical takeaway for students and business owners alike is simple: the more of the payment process a merchant’s own server handles, the greater its PCI DSS obligations. Hosted gateways push most of that responsibility onto the provider. Self-hosted and, to some extent, API-hosted gateways pull more of it back onto the merchant. This is often the deciding factor when a business chooses between convenience and control.
The regulatory angle in India
In India, payment gateways and payment aggregators do not operate in a vacuum. The Reserve Bank of India (RBI) introduced Guidelines on Regulation of Payment Aggregators and Payment Gateways in 2020, distinguishing between the two. Payment aggregators, such as the companies that pool customer payments before settling them with merchants, are directly regulated and must obtain RBI authorisation. Payment gateways, which merely route and process transactions without touching merchant funds, are treated as technology providers and are encouraged, though not legally bound, to follow the same baseline technology recommendations.
The rules also matter for anyone using a self-hosted or API-hosted gateway in India. Merchant websites are barred from storing customer card details on their own servers, pushing the industry toward tokenisation, where sensitive card data is swapped for a randomly generated token. In September 2025, the RBI consolidated its earlier circulars into a single Master Direction covering online, physical, and cross-border payment aggregation, tightening net-worth and governance norms for these entities, according to this summary of the updated framework. Understanding this regulatory backdrop is just as important as understanding the technology itself when studying e-payments in the Indian context.
Choosing the right gateway for a business
There is no single “best” type of payment gateway. The right choice depends on a few practical questions.
Technical capacity: A small business without a dedicated development team is usually better off with a hosted gateway, since it avoids handling sensitive data directly. A company with an engineering team can consider self-hosted or API-hosted models for a smoother experience.
Customer experience priorities: If a seamless, on-brand checkout is critical, such as for a subscription app or a fashion marketplace, API-hosted or self-hosted gateways make more sense despite the added technical work.
Cost structure: Hosted gateways generally have lower setup costs but slightly higher per-transaction fees, while self-hosted and API-hosted models often involve more upfront investment but can reduce long-term transaction costs, as summarised in this comparison of payment gateway fee structures.
Market focus: A business selling only within a specific region might benefit from a local bank integration gateway for its lower costs, while one targeting a national or international customer base will need the flexibility of hosted or API-based options.
What do you think? If you were building an online store from scratch in India today, would you prioritise a faster, redirect-based checkout, or invest in development effort for a fully on-site payment experience? And how much should regulatory requirements like RBI’s tokenisation rules influence that decision?
References
- https://stripe.com/ie/resources/more/payment-gateway-solutions-for-businesses
- https://business.phonepe.com/articles/hosted-vs-self-hosted-payment-gateway-which-integration-fits-your-business
- https://geekflare.com/guide/payment-gateway-types/
- https://gocardless.com/guides/posts/different-types-of-payment-gateway/
- https://razorpay.com/sg/blog/types-of-payment-gateways/
- https://merchantcostconsulting.com/lower-credit-card-processing-fees/types-of-payment-gateways-explained-and-compared/
- https://www.pcisecuritystandards.org/standards/pci-dss/
- https://www.investindia.gov.in/team-india-blogs/regulation-payment-ecosystem-rbi
- https://authbridge.com/blog/rbi-payment-aggregator-master-direction-2025/
- https://www.decta.com/company/media/4-different-types-of-payment-gateways
Leave a Reply