A market stall has a little card machine on the counter. An online shop needs one too. It just can't sit on a counter.
At a market stall you tap your card on the little machine by the till. It talks to your bank, waits a second and shows a green tick. The stall owner never sees your card number. They just get paid.
A payment gateway is that card machine for a shop that lives online. When you press “Pay”, it collects your card details, checks them with the bank and tells the shop yes or no.
What happens when you press Pay
- you type your card: into a box run by the gateway, not the shop
- the gateway asks your bank: is the card real and is there enough money?
- the bank answers: yes, no, or "check with the customer" (like a code by text)
- the shop is told: the order goes through or you see "payment declined"
Why shops use one
Handling card numbers safely is hard and comes with strict rules. A gateway does that job so the shop doesn’t have to. Most also take wallets like Apple Pay and Google Pay and many local ways to pay.
The catch
The gateway keeps a small fee from every payment. And if it goes down, the shop can’t take money until it’s back.
Where the comparison breaks down
A card machine sits on one counter. A gateway serves thousands of shops at once and talks to them through an API. It often sends a webhook later to say “that payment really did arrive”, because money can take time to settle.
How the words fit together
The shop’s site talks to the gateway through its API, over HTTPS with the card details encrypted. A webhook tells the shop when a payment succeeds, fails or is refunded.
Never build your own card handling. Use a well-known gateway so card numbers never touch your own servers. That's safer and saves a lot of rules and paperwork.

When you'll hear it
“We use Stripe for payments.” Stripe is our payment gateway. It takes the cards and sends us the money.
“The payment was declined.” The gateway asked the bank and the bank said no.
“What's the transaction fee?” How much does the gateway keep from each payment?
“Which payment methods do our customers actually use, and does our gateway take all of them?”


