How to Accept Payments on a Website

Choose a payment processor, then connect it in one of four ways: share a hosted payment link, embed a buy button, add a PayPal button, or build a checkout with the processor's API. Hosted options need no code and keep card details off your server; an API checkout gives full control in exchange for development work.

The four routes compared
RouteCode neededCard data touches your site?Best for
Hosted payment linkNoneNo, the processor hosts the pageA few products, services, deposits
Embedded buy buttonPaste a snippetNo, checkout opens on the processor's pageProduct pages on an existing site
PayPal buttonPaste a snippetNo, PayPal handles the paymentBuyers who prefer paying with PayPal
API checkoutYes, front end and serverDepends on the components you useCarts, custom flows, platforms

Updated

Most small sites do not need a custom checkout. A hosted page from the processor handles cards, wallets, receipts and fraud checks, and you link to it. This guide compares the routes, shows the snippets, and lets you work out what each processor's standard fee would take from a sale.

Fee calculator, standard US rates as of October 2026

What each option keeps from one domestic sale
OptionRate
Stripe, domestic card pricing page2.9% + $0.30
PayPal Checkout pricing page3.49% + $0.49
PayPal, card payments pricing page2.99% + $0.49

Published domestic online rates only. International cards, currency conversion and negotiated pricing change the result.

Snippets you can paste

A plain link to a hosted payment page

Replace the address with the payment link from your dashboard. It works on any site builder that lets you add a link.

<a href="https://buy.stripe.com/your-link-id" class="pay-button" rel="noopener">
  Pay deposit: $50
</a>

Confirm payments on the server, not in the browser

A minimal Node handler with the stripe package that verifies the signature before trusting the event. Use the raw request body.

import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);

export function handleWebhook(rawBody, signatureHeader) {
  const event = stripe.webhooks.constructEvent(
    rawBody, signatureHeader, process.env.STRIPE_WEBHOOK_SECRET,
  );
  if (event.type === "checkout.session.completed") {
    fulfilOrder(event.data.object.id);
  }
}

Picking a processor

Compare the rate for the cards your customers actually use, payout timing to your bank, which countries the processor supports for your business, and whether it offers the wallets your buyers expect.

Switching later is possible but tedious, especially for subscriptions, because saved payment details do not move between processors without a migration process.

When an API checkout is worth it

Build with the API when you need a shopping cart, pricing that depends on choices made on your page, or payments split between several sellers.

You will also need a server to create payment sessions and to receive webhook events, because the browser alone cannot be trusted to report that a payment succeeded.

How it works

  1. Enter a sale amount in the fee calculator to compare published standard rates for US domestic payments.
  2. Pick a route from the comparison table based on how many products you sell and how much control you need.
  3. Create the product or price in your processor's dashboard and copy the link or button snippet.
  4. Add it to your page, run a test payment, then check that the receipt and payout settings are right.

Tips

Frequently asked questions

What does Stripe charge per payment?

As of October 2026, Stripe's US pricing page lists 2.9% plus 30 cents per successful domestic card charge, with 1.5% added for international cards and 1% when currency conversion is needed. It states there are no setup or monthly fees on standard pricing.

How do I add a PayPal button to my website?

In a PayPal business account, create a button or use the JavaScript SDK, then paste the generated snippet into your page. Buyers can pay with their PayPal balance or a card. As of October 2026 PayPal lists 3.49% plus 49 cents for its standard US checkout rate.

Can I accept payments without a website developer?

Yes. A payment link needs no code at all: create it in the dashboard and link to it from a button or a menu item. Stripe's documentation also offers a QR code and an embeddable buy button built from the same link.

Do I need an SSL certificate to take payments?

Your site should be on HTTPS regardless. With a hosted link or button, the card form itself is served by the processor over its own secure connection.

Can a payment link take subscriptions?

Stripe Payment Links can sell a product, a subscription or accept a donation, and can be reused by many customers or limited to a number of purchases.

Related: Stripe payment link guide, Payment processing fee calculator, How to build an ecommerce website, How to sell digital products, Terms and conditions generator.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap