Mobile device screen showing the ecommerce checkout process, with shipping and payment options on screen.

What Is a Payment Gateway and How Do They Work?

Payment gateways capture and transfer payment data from the customer to a merchant's bank.

Payment Gateway Types Compared

Feature Redirect (Hosted) Self-Hosted Integrated (API) Hybrid (Direct Post)
Setup ease Low: Limited to provider's templates Full: You design the entire UI Full: You design the entire UI
High: Form is on-site and customizable
Security risk Minimal: Handled by provider High: You secure the server Maximum: You secure the data Moderate: Shared liability
Customer experience Disjointed: Redirects Seamless: On-site Seamless: On-site Seamless: On-site
PCI compliance effort Minimal (SAQ-A) Heavy (SAQ A-EP/D) Very heavy (SAQ-D) Moderate (SAQ A-EP)

Flat-Rate vs. Interchange-Plus Pricing

Feature Flat-rate pricing Interchange-plus pricing
How it works You pay one fixed percentage for every transaction, like 2.9% + $0.30. You pay the raw "Interchange" cost from the bank + a small, transparent markup.
Best for Early stage businesses that process less than $5,000/month. Growing businesses that process $10,000+/month or those with a high average transaction value (ATV).
Transparency Low. The provider bundles all costs into one rate. High. You see exactly what the bank charges versus what the processor earns.
Cost-efficiency Expensive for debit. Hides high markups on "cheap" cards like debit (which cost 0.05% to process). Savings on debit. You capture the lower costs of debit and basic credit cards directly.
Predictability High. Fees are the same every month. Variable. Your total rate depends on the mix of cards your customers use.

Payment gateway FAQs

A payment gateway is a service that authorizes and processes online credit card or digital wallet payments for ecommerce transactions. It acts as a secure intermediary between customer and merchant.

When a customer makes an online purchase, the payment gateway securely encrypts their payment details, sends them to the acquiring bank for authorization, and then relays the approval or decline back to the merchant.

A payment gateway is the front-end software that encrypts and routes transaction data, while the payment processor executes the actual transfer of funds between banks.

A secure gateway protects sensitive customer financial data from fraud, builds customer trust, and ensures PCI DSS compliance, which is essential for processing card payments.

Look for strong security (encryption, fraud detection), support for multiple payment methods, global reach, ease of integration, competitive fees, and reliable customer support.

Gateways use tokenization to replace sensitive card data with unique symbols, 3D Secure (3DS) for an extra layer of biometric or SMS verification, and address verification service (AVS) to cross-reference billing addresses. These tools collectively reduce the risk of "Card Not Present" fraud and chargebacks.

A White Label Gateway is a prebuilt platform that a business can rebrand and use as its own without developing the underlying tech. While building a custom solution offers total control, it’s rarely viable for enterprises due to the massive ongoing costs of security maintenance and complex regulatory certifications.