What Is a Payment API or Payment Gateway? A Plain-English Guide

A payment gateway is the service that securely carries a customer's card details to the bank and brings back "approved" or "declined." A payment API is the set of instructions your software uses to talk to that service: create a charge, issue a refund, start a subscription. Most modern providers, such as Stripe, bundle the gateway, the API and the processor into one account.
People use the two terms as if they were the same thing, and in daily conversation that is mostly fine. This guide explains how they differ, how they work together, what they cost, and how to choose one if you sell online.
Key Takeaways
- The gateway authorizes and routes the payment. It encrypts card details, asks the customer's bank, and returns approved or declined to your checkout in seconds.
- The API is how software controls payments. A request like "refund order 1042" goes through the API, and even non-developers feel its limits in which tools can connect.
- The processor moves the money between banks. Settlement to your bank usually takes a day or more after the card is approved.
- Standard US online card rates are commonly around 2.9% plus 30 cents. Dispute, currency conversion, payout and platform fees come on top, so compare on your average order.
- Leaving a provider is harder than joining one. Saved cards and subscription schedules can be difficult to move, so ask about data portability before you build around one account.
What Is a Payment Gateway?
A payment gateway is the online equivalent of a card terminal at a shop counter. When a customer enters their card at checkout, the gateway:
- Encrypts the card details so your site never handles raw data
- Sends the request to the card network and the customer's bank
- Receives an approval or a decline
- Returns that result to your checkout page in seconds
Without a gateway, an online store has no safe way to accept a card. Providers such as Stripe and PayPal act as gateways, among other roles.
What does a gateway not do?
A gateway does not hold your money, and it does not pick your products. It is a messenger with strict security rules. The actual settlement of funds is the job of the processor and the banks.
What Is a Payment API?
An API, or application programming interface, is a defined way for one piece of software to ask another to do something. A payment API lets your website or app say things like "charge this customer 29 dollars," "refund order 1042," or "start a monthly subscription."
In practice, a developer writes code that sends a request to the provider and reads the response. For example, a request creates a checkout session, and the response says whether the customer paid. Our own guide on ecommerce payment processing covers the wider setup around it.
Why APIs matter to non-developers
Even if you never write code, the API decides what your tools can do. A rich payment API means your store, email platform, and accounting software can connect without manual work. A thin one means you copy data between tabs.
Payment API vs Payment Gateway: The Difference
| Payment gateway | Payment API | |
|---|---|---|
| What it is | A service that authorizes payments | An interface to control that service |
| Who uses it directly | The payment flow itself | Developers and software |
| Main job | Secure transmission and approval | Create charges, refunds, subscriptions |
| Question it answers | "Was this card approved?" | "How do I ask for a payment?" |
| Example | The authorization step at checkout | A request to create a charge |
A helpful comparison: the gateway is the restaurant kitchen, and the API is the order form your waiter uses. You need both to get dinner, and you usually deal with one at a time.
Gateway vs Processor vs Merchant Account
Three more terms trip people up.
- Payment processor: handles the transfer of funds between the customer's bank and yours
- Merchant account: a special bank account that lets you accept card payments
- Payment service provider (PSP): a bundle that includes all of the above under one contract
Older setups required you to arrange a gateway, a processor, and a merchant account separately. Modern PSPs let you sign up once and start accepting payments the same day, which is why most small businesses today never see the separate pieces.
How a Payment Gateway Works, Step by Step
- Checkout: The customer enters card details into a secure form
- API call: Your site or store calls the payment API to create the payment
- Gateway: The details are encrypted and passed on
- Card network: Visa, Mastercard, or another network routes the request to the card issuer
- Authorization: The issuer checks funds and fraud signals, then approves or declines
- Confirmation: The result returns to your checkout in a few seconds
- Settlement: Funds are batched and paid out to your bank, usually after a delay of a day or more depending on the provider and country
If you have ever seen "payment pending," you have seen step 7 in progress.
A Worked Example
Say you sell a $29 template and a customer in the US pays by card. This is an illustration, using the common 2.9% plus 30 cents rate.
Before: you send an invoice by email and ask for a bank transfer. The customer has to copy your account details, half of them never pay, and you match each transfer to an order by hand.
After: your store's checkout calls the payment API, the gateway gets an approval in a few seconds, and the customer gets the download straight away. The processing fee is $0.84 plus $0.30, so $1.14, and you receive $27.86, paid out to your bank a day or more later. If the store builder on top charges a platform fee, that comes out of the same sale.
What Do Payment Gateways and APIs Cost?
Most providers charge per transaction rather than a flat monthly fee. Standard online card rates in the United States are commonly around 2.9% plus 30 cents per charge, but rates differ by provider, country, card type, and plan. Check Stripe's pricing page and the pricing page of any alternative for current numbers, because several comparison blogs quote outdated or conflicting figures.

Costs to look for beyond the headline rate:
- International card surcharges and currency conversion fees
- Dispute or chargeback fees per case
- Recurring billing fees if you sell subscriptions
- Payout fees for instant transfers
- Platform fees if you use a store builder on top of the gateway
Popular Options Compared
| Provider | Best known for | Typical fit |
|---|---|---|
| Stripe | Developer-friendly API, wide feature set | Custom checkouts, subscriptions, software businesses |
| PayPal | Familiar buyer wallet, quick setup | Stores where shoppers expect PayPal |
| Square | In-person and online sales together | Shops with a physical counter |
| Adyen | Large-scale global payments | Enterprise businesses |
| Regional gateways | Local payment methods | Sellers focused on one country |

There is no universal winner. PayPal tends to suit sellers who want a quick, familiar button, while Stripe tends to suit those who want more control over the checkout. Many stores offer both.
How to Choose a Payment Gateway
Work through these questions in order:
- Where are your customers? Make sure the provider supports your buyers' countries, currencies, and local payment methods.
- What do you sell? One-time purchases, subscriptions, and marketplaces each need different features.
- How technical are you? If you cannot write code, pick a tool that includes checkout, or use a builder that handles the integration.
- What are the real fees? Calculate the cost on your average order, including international and dispute fees.
- How fast do you get paid? Look at payout schedules and holds on new accounts.
- What happens if something goes wrong? Check support options and dispute tools.
Security basics to expect
Any reputable gateway should be PCI compliant, support fraud screening, and use tokenization so your servers never store raw card numbers. If a provider cannot clearly explain these, keep looking.
When a Direct Payment API Is Not the Right Choice
Wiring a payment API into your own site gives you the most control, and it is often more than a small business needs:
- You don't have a developer. A direct integration means code for checkout, webhooks, receipts and failed payments, and someone to fix it when it breaks.
- You sell a handful of products. A hosted payment link or a store builder takes payments the same day with no code.
- You need someone else to handle sales tax. A gateway leaves tax with you. A merchant of record, such as Paddle, sells on your behalf and files tax and VAT for a higher fee.
- You take most payments in person. A provider built around card terminals, such as Square, fits a counter better than an online API.
Where Crevio Fits
If you sell digital products, courses, or memberships, you do not need to choose and wire up a gateway yourself. Many platforms connect payment processing for you.
Crevio is an AI business builder that runs payments through Stripe. You describe your business, and it builds the website and checkout, so you never touch the API directly. It starts free with a 5% transaction fee, and paid plans from $25/month billed yearly charge 2.5%, on top of the standard card processing fees from Stripe. It focuses on digital products and services. It can sell physical goods but doesn't print shipping labels or handle fulfillment, and it is not a merchant of record, so sales tax and VAT stay with you.

For developers, Crevio also offers a REST API covering products, orders, customers, checkouts, and webhooks, so you can connect it to your own tools. If you are weighing whether to sell on a platform or integrate directly, our guide on how to start an online business is a good next read.
Common Mistakes to Avoid
- Comparing only the headline rate. Dispute, currency, and payout fees can change the math.
- Assuming the gateway holds your money. Settlement timing is set by the provider and your bank.
- Skipping webhooks. Without them, your system can miss failed or delayed payments.
- Storing card numbers yourself. Use hosted fields or tokenization instead.
- Locking in too early. Pick a provider that lets you export customer and payment data.
What Nobody Tells You
The choice that hurts most later is not the fee. It is how hard it is to leave. Customer tokens, subscription schedules, and saved cards can be difficult to move between providers, so ask about data portability before you build everything around one account.
Also, new accounts often face payout holds or reserves until the provider trusts your volume. Plan your cash flow for the first month accordingly.
FAQ
It is both, and more. Stripe offers a gateway that authorizes payments, an API that developers use to control it, and processing and payout services bundled together.
Not always. Modern providers act as payment service providers, so you can accept cards without setting up a separate merchant account.
The gateway transmits and authorizes the payment request. The processor moves the funds between the banks. Many providers perform both roles.
Yes. Hosted checkout pages, payment links, and platforms that build your store handle the API work for you.
Usually a percentage plus a fixed fee per transaction, with no monthly fee. Standard US online card rates are commonly around 2.9% plus 30 cents, but rates vary by provider, country and card type, so check each provider's pricing page for current numbers.
The Bottom Line
If you have a developer and need a custom checkout, pick a provider with a strong payment API and compare fees on your average order. If you just want to sell, use a platform that handles the gateway and API for you. For digital products and services, Crevio builds the site and Stripe checkout for you and starts free.
Related Blog Posts
Your business,on autopilot.
An AI employee that handles your website, marketing and operations.
























