Learn how a payment gateway works step by step — from the moment a customer clicks "pay" to the money landing in your account. A practical technical guide.
Table of Contents
- What Is a Payment Gateway, Exactly
- The Parties Involved in Every Transaction
- How a Payment Gateway Works Step by Step
- Key Differences Between Integration Types
- The Role of Encryption and Security
- Real Fees: What Hides Behind the Percentage
- Payment Gateway vs Payment Processor: The Distinction That Confuses Everyone
- What Happens When a Payment Fails
- Frequently Asked Questions About Payment Gateways in WooCommerce
Understanding how a payment gateway works is essential before deciding which one to integrate into your WooCommerce store. Not all payment gateways are built the same — they don’t charge the same fees, and they don’t fit every business model equally well. This article breaks down the full technical process — from the moment a customer clicks “pay” to the moment the money appears in your bank account — and explains which elements are involved, what risks exist, and what you should consider before making a decision.
What Is a Payment Gateway, Exactly
A payment gateway is the technology that connects your online store to the financial system. It acts as an intermediary between three parties: the customer, the store (you), and the banks involved. Without it, there would be no secure way to transmit credit card data from a browser to a financial institution.
The most accurate analogy is a physical card reader in a brick-and-mortar store: the digital gateway does exactly the same thing, but invisibly and in fractions of a second. It captures the buyer’s data, encrypts it, validates it, and returns a response — approved or declined — before the customer has even closed the tab.
One thing many people get wrong: the payment gateway doesn’t actually “move” money. That’s the job of the payment processor, which is a separate service (though both are sometimes offered by the same provider). The gateway is the communication channel; the processor is what executes the real transfer between accounts.
The Parties Involved in Every Transaction
Before walking through the flow step by step, it’s worth identifying the actors involved in every charge:
- Customer: the person buying and providing their payment details.
- Store (merchant): the WooCommerce store receiving the order.
- Payment gateway: the technology that encrypts and transmits the data.
- Payment processor: the company that manages communication between banks.
- Issuing bank: the customer’s bank, which validates whether funds are available and authorizes the transaction.
- Acquiring bank: the merchant’s bank, which receives the funds.
- Card network: Visa, Mastercard, or American Express, acting as arbiters of the system.
In practice, solutions like Stripe or PayPal collapse several of these roles into one, which simplifies technical integration — but doesn’t eliminate any of the underlying steps.
How a Payment Gateway Works Step by Step
This is where most guides fall short. The card payment authorization process isn’t a single event — it’s a chain of events that unfolds in under three seconds:
Step 1: The customer enters their details
The buyer reaches the WooCommerce checkout and enters their card number, expiration date, and CVV. If the payment gateway uses an embedded form (such as Stripe Elements), those details never touch your server: they’re sent directly from the customer’s browser to the gateway’s servers, encrypted with TLS. This matters legally — it dramatically reduces your compliance obligations under the PCI DSS standard.
Step 2: The payment gateway encrypts and transmits the request
The gateway receives the data, tokenizes it (replacing sensitive information with a unique identifier), and sends an authorization request to the payment processor. At this point, no raw card data is in transit — only the token and transaction metadata (amount, currency, merchant ID).

Step 3: The processor queries the card network
The processor identifies which card network is involved (Visa, Mastercard, etc.) and forwards the request. The network locates the customer’s issuing bank and asks: “Do you authorize this charge?”
Step 4: The issuing bank decides
The customer’s bank checks several things: whether sufficient funds or credit are available, whether the card is blocked, and whether the transaction triggers any fraud thresholds. Based on all of that, it issues a response: approved, declined, or pending additional authentication (3D Secure).
Step 5: The response travels back
The response retraces the path in reverse: issuing bank → card network → processor → payment gateway → your WooCommerce store. WooCommerce receives an authorization or rejection code and updates the order status accordingly. This entire cycle typically takes between 1 and 3 seconds.
Step 6: Settlement (the actual money movement)
Here’s the detail many store owners miss: authorization is not the same as capture. Money doesn’t move at the moment of authorization. Settlement happens hours or days later, when the processor batches all the day’s authorized transactions and executes the real transfers between banks. That’s why your customers may see “pending” charges on their bank statements.
Key Differences Between Integration Types
Not all payment gateways integrate with WooCommerce in the same way, and the integration method affects both user experience and your security obligations:
| Integration Type | How It Works | Advantages | Disadvantages |
|---|---|---|---|
| Redirect | Customer leaves your site to pay (e.g. standard PayPal) | Minimal PCI liability; easy to implement | Breaks the flow; higher cart abandonment |
| Embedded iFrame | Payment form appears on your site inside an iFrame | Better UX than redirect; lower PCI liability | Limited visual customization; potential style conflicts |
| Direct API / Embedded JavaScript | Native form with client-side tokenization (e.g. Stripe Elements) | Maximum customization; best conversion; seamless UX | Higher technical complexity to implement |
The direct API integration converts best, but it’s also the one most likely to go wrong if implemented without experience. A broken form or a token that fails to submit means immediate lost sales.
The Role of Encryption and Security
Encryption isn’t a nice-to-have — it’s the entire reason a payment gateway exists. Without it, transmitting card data over the internet would be the equivalent of writing it on a postcard. Modern gateways layer several forms of protection:
- TLS (Transport Layer Security): encrypts the connection between the browser and the server. This is what you see as “https” in the URL.
- Tokenization: replaces real card data with a unique token that only has value for that specific merchant or transaction.
- 3D Secure 2.0: an additional authentication protocol (the SMS or push notification your bank sometimes requests). It reduces fraud and shifts chargeback liability to the issuing bank.
- PCI DSS compliance: the industry security standard governing how card data must be handled. If you use a payment gateway that tokenizes data before it reaches your server, your required compliance level is far lower (SAQ A instead of SAQ D).
Real Fees: What Hides Behind the Percentage
When a payment gateway advertises “1.4% + €0.25 per transaction,” that figure bundles several distinct costs into a single line item:
- Interchange fee: what the issuing bank charges for taking on the transaction risk. It varies by card type (debit, credit, corporate) and country of issue.
- Network fee: what Visa or Mastercard charge for the use of their infrastructure.
- Processor markup: what the payment gateway adds on top of the above costs.
Gateways with an “interchange plus” pricing model (such as certain Stripe or Adyen plans) show you exactly how much goes to each party. Flat-rate (“blended”) gateways simplify the invoice but sometimes hide surcharges on corporate or international card transactions, which carry higher interchange rates.
For stores with a low average order value and high volume, every tenth of a percent matters. For stores with high-value orders, customer support quality and dispute resolution timelines may be more relevant than the fee itself.
Payment Gateway vs Payment Processor: The Distinction That Confuses Everyone
The confusion between these two terms is common — even in technical documentation. The practical difference is this:
- Payment gateway: the front door. It captures, encrypts, and transmits payment data. Its interface is the checkout form.
- Payment processor: the engine. It manages the communication between the customer’s bank and the merchant’s bank, and handles the actual settlement of funds.
Stripe, for example, acts as both simultaneously — it’s a payment gateway and a processor in a single product. So does PayPal. But in more complex setups — like those used by large retailers — the gateway (e.g. Cybersource) may be separate from the processor (e.g. a local acquiring bank). For most WooCommerce stores, this distinction isn’t operationally relevant, but it becomes critical when you’re trying to figure out which part of the chain is causing a payment to fail.
What Happens When a Payment Fails
Payment errors have very different root causes, and not all of them are the payment gateway’s fault. Identifying the source of the failure is the first step — before switching providers or blaming the plugin:
- Issuing bank decline: insufficient funds, a blocked card, or triggered fraud thresholds. The gateway can’t do anything about this.
- 3DS authentication error: the customer doesn’t complete the additional verification step. Fix: improve the UX of the authentication flow, or enable frictionless authentication where the issuing bank supports it.
- Gateway configuration error: incorrect API keys, misconfigured webhooks, or an expired SSL certificate on the server. This is the type of error that surfaces in production after a plugin update and can take hours to diagnose.
- Connection timeout: your WooCommerce server takes too long to respond to the gateway. An undersized server or a conflicting plugin can cause this — even when the payment gateway itself is working perfectly.
Keeping transaction logs active in WooCommerce (available in most payment gateway plugins) is essential for diagnosing these issues without having to reproduce the error manually.
Frequently Asked Questions About Payment Gateways in WooCommerce
Do I need an SSL certificate to accept payments?
Yes, always. Without active HTTPS, modern payment gateways simply block the integration. On top of that, Google Chrome flags HTTP pages as “Not Secure,” which drives abandonment before the customer even reaches checkout.
When does the money reach my account?
It depends on the payment gateway and the country. Stripe, for example, settles every 2 business days by default, though this is configurable. PayPal may hold funds longer if the account is new or if disputes are open. Settlement timelines are an important criterion that’s often overlooked when choosing a provider.
What is a chargeback and how does it affect my store?
A chargeback is a dispute initiated by the customer directly with their bank, which provisionally reverses the charge. The payment gateway charges a handling fee (typically between €15 and €25) and you have a set window to submit evidence. If your chargeback rate exceeds 1% of transactions, some gateways may suspend your account. That’s why fraud controls and thorough purchase documentation are critical.
Can I use multiple payment gateways at once in WooCommerce?
Yes. WooCommerce allows you to activate multiple payment gateways simultaneously, and the customer chooses at checkout. A common strategy is to offer Stripe for cards alongside Bizum or PayPal as alternatives, since each method captures a different buyer profile.
Does the payment gateway affect store performance?
The integration plugin can. Payment gateway plugins that load external JavaScript on every page — not just checkout — add unnecessary requests and slow down load times. A properly configured integration should load gateway scripts only on checkout and cart pages.
If you’re evaluating how to integrate or improve the payment system in your WooCommerce store, you can see how I approach these technical implementations on my WordPress development services page.
My take as a WordPress developer
What strikes me most when auditing WooCommerce stores with conversion problems is that the issue is almost never the payment gateway itself — it’s how it’s been integrated. A plugin installed without reviewing webhooks, a JavaScript file loading on every page, or a 3D Secure flow that breaks on mobile can make a perfectly valid gateway look broken. Before switching providers, it’s always worth auditing the current technical implementation. In many cases, the problem is fixed in a matter of hours without touching the gateway at all.
Need help with your project? I work with businesses and agencies on WordPress, WooCommerce, AI and integrations. Get in touch and we can discuss it.