crevioCrevio

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

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:

  1. Encrypts the card details so your site never handles raw data
  2. Sends the request to the card network and the customer's bank
  3. Receives an approval or a decline
  4. 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

Flow of a card payment from customer through the payment API and gateway to the card network and your bank

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

  1. Checkout: The customer enters card details into a secure form
  2. API call: Your site or store calls the payment API to create the payment
  3. Gateway: The details are encrypted and passed on
  4. Card network: Visa, Mastercard, or another network routes the request to the card issuer
  5. Authorization: The issuer checks funds and fraud signals, then approves or declines
  6. Confirmation: The result returns to your checkout in a few seconds
  7. 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.

Stripe pricing page showing features available out of the box, such as global access and fraud prevention

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
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

PayPal homepage with sign up and business options

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:

  1. Where are your customers? Make sure the provider supports your buyers' countries, currencies, and local payment methods.
  2. What do you sell? One-time purchases, subscriptions, and marketplaces each need different features.
  3. How technical are you? If you cannot write code, pick a tool that includes checkout, or use a builder that handles the integration.
  4. What are the real fees? Calculate the cost on your average order, including international and dispute fees.
  5. How fast do you get paid? Look at payout schedules and holds on new accounts.
  6. 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.

Crevio homepage: Hire an AI employee that runs your small business

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.

Explore this topic with AI:
ChatGPTPerplexityGoogle

Your business,on autopilot.

An AI employee that handles your website, marketing and operations.

Get started for free

Give Crevio its first job today

Get started for free

30 jobs, one Crevio. Pick any of them below.

Automations

Overnight, while you slept

  1. 1:04 amThanked 6 new customers by email
  2. 2:30 amTagged 3 sign-ups from your form
  3. 6:00 amSent your weekly sales report

Website

rosastacos.com
MenuCateringVisit

Catering for every party

Company formation

Certificate of Formation

Company
Rosa’s Tacos LLC
State
Texas
EIN
Issued

App builder

Members app for Studio North

Members

128

Classes this week

24

Waitlisted

9

Studio

Make a holiday version, a story and a 6 second clip

Holiday

Story

6s clip

Developers

agent.ts

await crevio.chats.create({

message: 'Refund order 1042',

approvalMode: 'supervised',

})

status: 'waiting_for_approval'

approval: 'apr_8Kd2'

Social scheduling

Next week, 7 posts

Mon

9 am

Tue

12 pm
6 pm

Wed

10 am

Thu

8 am
5 pm

Fri

7 pm

Email marketing

Sent

1,240

Opened

58%

Sales

$3,480

Autumn botanicals is open

Four live painting classes, starting October 3. Twenty seats.

Save my seat

Ads

Sponsored

Fresh coffee, two blocks away

Spent

$42

Clicks

318

Orders

17

Blog

#2 on Google1,240 visits

How to keep a sourdough starter alive on vacation

6 min read, published Tuesday

SEO and GEO

best bike repair near me

AI answer

Spoke & Wheel is a highly rated local shop known for same-day tune-ups.

spokeandwheel.com

Spoke & Wheel, bike repair in Austin

DM automation

m

maya.moves

Commented on your post

PLAN

Here’s your free 4-week plan. Reply GO for the full program.

Free 4-week home plan

Get it

Payments

Today’s orders

  • AR

    Ana Ruiz

    Speckled mug set

    $64.00
  • TB

    Tom Becker

    Gift card

    $50.00
  • JP

    Jen Park

    Pour-over kit

    $38.00

Invoicing

Quote Q-000018

Sarah Kim

Website build
$2,500
Hosting, first month
$150
Total
$2,650
PAID

E-signatures

Client agreement

Jordan Lee
Signed 9:41 am
You
Signed 10:02 am
Sealed PDF
Emailed to both

Bookings

Mon

Tue

2 pm

Wed

Thu

Fri

Private yoga, Maya

Tue, 2 pm · Booked and paid, $80

Courses

Sourdough at Home

  • Feeding your starter
  • The first fold
  • Shaping the loaf

Forms

48 sign-ups this week

Join the waitlist

Save my spot

Inbox

Inbox3
JC

Jamie Cole

Chipped mug in order #1042

My order arrived with a chipped mug. Can you help?

Draft by Crevio

So sorry, Jamie. A replacement ships tomorrow, no need to send it back.

SendEdit

AI receptionist

ML

Maria Lopez

Call, 1:42

  • Hi Maria, you asked for a free estimate. Does Thursday work?
  • Thursday at 10 is perfect.

Booked Thursday, 10 am

AI website chatbot

Do you have anything Saturday morning?

Yes, 9:45 is open. Want me to book it for Biscuit?

CRM

Open pipeline

$20,800

New

BS

Bloom Studio

$1,200

L&

Lee & Co

$3,400

Quoted

WD

Whitfield Dental

$8,500

Won

HC

Harbor Cafe

$2,900

SK

Sarah Kim

$4,800

Leads

  • DW

    Dana Whitfield

    Owner, Whitfield Dental

    Verified
  • ML

    Marcus Lee

    Office manager, Lee & Co

    Verified
  • PS

    Priya Shah

    Founder, Bloom Studio

    Verified

Analytics

Sales this month

$12,480

Up 18% on September

Get started for free