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.
| Route | Code needed | Card data touches your site? | Best for |
|---|---|---|---|
| Hosted payment link | None | No, the processor hosts the page | A few products, services, deposits |
| Embedded buy button | Paste a snippet | No, checkout opens on the processor's page | Product pages on an existing site |
| PayPal button | Paste a snippet | No, PayPal handles the payment | Buyers who prefer paying with PayPal |
| API checkout | Yes, front end and server | Depends on the components you use | Carts, 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.
| Option | Rate |
|---|---|
| Stripe, domestic card pricing page | 2.9% + $0.30 |
| PayPal Checkout pricing page | 3.49% + $0.49 |
| PayPal, card payments pricing page | 2.99% + $0.49 |
Published domestic online rates only. International cards, currency conversion and negotiated pricing change the result.
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>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);
}
}
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.
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.
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.
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.
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.
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.
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.
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.