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.
| 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.
Fee calculator, standard US rates as of October 2026
| 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.
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
- Enter a sale amount in the fee calculator to compare published standard rates for US domestic payments.
- Pick a route from the comparison table based on how many products you sell and how much control you need.
- Create the product or price in your processor's dashboard and copy the link or button snippet.
- Add it to your page, run a test payment, then check that the receipt and payout settings are right.
Tips
- Add the processor's fee into your price calculation before launch, not after the first payout surprises you.
- International cards and currency conversion usually cost extra on top of the headline rate. Check the add-on fees on the pricing page.
- Keep your refund and cancellation terms on the page next to the button, and link your terms of service.
- Hosted checkouts keep your PCI scope small because card numbers never pass through your own server.
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 a 7-day free trial or see all free tools. On We.Inc you get a 7-day free trial, not a free plan: card needed, $0 today, cancel before it ends and you pay nothing. AI building is on paid plans from $20 a month.
More in Guides
- An Accessibility Testing Process Web Teams Can Actually Keep Up | How-to Guide
- Accessible PDF Alternatives for Public Websites: When to Turn a PDF Into a Web Page | How-to Guide
- ADA Title II Website Deadline: April 2027 and April 2028 Explained | How-to Guide
- ADA Website Compliance for Small Businesses (2026 Guide) | How-to Guide
- Agency Website Template System: Many Sites, None Alike
- AI Agents for Business: What They Can Handle and Where People Stay in Charge
- AI Agent vs Agentic AI: What Is the Difference?
- Alt Text Examples: What to Write for Each Kind of Image
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App