You can take a card without a backend. Stripe Checkout and Payment Links are pages Stripe hosts, so the card, the 3D Secure step and the PCI scope are all theirs. The part people mean when they say this is hard is not the card. It is everything that happens after it, and that genuinely cannot run in a browser.
The phrase “without a backend” usually means one of two things. Either no server of my own to deploy and keep alive, which is achievable, or no server anywhere in the transaction, which is not. Below is what the work consists of, so you can decide whose machine runs it.
Collect the card details
Stripe Checkout is a page Stripe hosts. You send the buyer to it and Stripe handles the card, 3D Secure, wallets and PCI scope. No server of yours is involved in the payment itself.
Decide what the buyer is allowed to pay
Anything the browser sends can be edited before it is sent. If the price, the plan or the amount originates in your JavaScript, a buyer can change it. The amount has to be chosen by something the buyer cannot edit.
Find out that the payment actually happened
A redirect back to your success page is not proof. The buyer can navigate straight to that URL, close the tab before it loads, or lose the connection while Stripe is still settling. The authoritative event arrives as a webhook, which is an HTTP request to a URL that has to be listening.
Remember it tomorrow
Subscriptions renew, fail, get refunded and get cancelled long after the buyer has gone. Somewhere has to hold the current answer to "is this person paid", and keep it correct while nobody is looking.
One of four. That ratio is the whole subject: the famous part of a payment integration is the part that was already solved, and the three remaining jobs are the ones that quietly decide whether you can prove, a month later, who paid you.
These are ordered by how long each one stays invisible, which is what makes them expensive. A bug that throws an error gets fixed on the day it ships. A bug that silently takes the wrong amount gets fixed when somebody reconciles the books.
The common shortcut is a Checkout Session created with a line item whose amount is read from the page. The buyer opens devtools, changes the number, and pays what they chose. The variant that looks safer and is not: sending a price id from the client without checking it belongs to you. A price id from your own account for a different, cheaper product is still a valid price id.
How you find out: Nothing. The payment succeeds, Stripe is happy, and the only trace is a figure in your dashboard that nobody reconciles.
The page the buyer lands on after paying runs some JavaScript that grants the thing. It works in testing because in testing the buyer always waits for the redirect. In production some of them close the tab, some of them are on a payment method that settles minutes later, and some of them simply bookmark the success URL.
How you find out: Support messages saying "I paid and nothing happened", usually from the buyers least willing to send a second one.
A webhook endpoint is a public URL that grants things. If it acts on the body of any POST it receives, anyone who finds the URL can grant themselves anything by posting a plausible JSON object. Stripe signs every event with a secret, and the signature has to be checked against the raw request body before the body is parsed.
How you find out: Also nothing, until someone finds it. Frameworks that parse JSON automatically break the check silently, because the signature covers the exact bytes.
Stripe retries. It retries on a timeout, on a 500, and whenever an operator resends an event by hand. Anything your handler does that is not idempotent, such as sending a receipt, crediting a referral, or incrementing a coupon use, happens again each time.
How you find out: Duplicate receipt emails, usually noticed by the customer before you.
Calling the Stripe API on every page load to ask whether the user is subscribed works until it does not. It adds a network round trip to a path that should be instant, it is rate limited, and when Stripe has an incident your app goes down with it even though nobody was trying to pay.
How you find out: A slow app, then an outage whose cause is somebody else.
“Handle the webhook” sounds like one line and is not. If you are building option two below, this is the checklist. If you are choosing between the options, it is the thing you are choosing whether to own.
| It has to | Why |
|---|---|
| Verify the signature against the raw body | Before parsing. On most frameworks this means explicitly opting the route out of automatic body parsing, or the bytes you check will not be the bytes that arrived. |
| Reject an unsigned request with a 400 | A 400 tells Stripe the payload is invalid and not to retry. A 500 asks it to send the same bad request again, repeatedly. |
| Claim the event id before doing any work | Insert the event id into a table with a unique constraint and act only if the insert won. A redelivery then hits the conflict and is acknowledged without the side effects running twice. |
| Handle cancellation and refund, not only purchase | customer.subscription.deleted and charge.refunded are the events that take access away. A receiver that only listens for the happy path grants access that is never revoked. |
| Finish the work before responding | On a serverless platform the instance can freeze the moment you return, so a background call that was not awaited may never complete its outbound request, and with an empty catch it will do so silently. |
| Answer quickly | Stripe expects a response within seconds and treats a timeout as a failure worth retrying. Anything slow belongs behind the acknowledgement, not in front of it. |
Every row describes a mechanism in this project’s own Stripe webhook route, read in November 2026 rather than written from memory.
Correct for low volume, and for anything you fulfil by hand.
Stripe Payment Links need no code at all. You paste a URL, the buyer pays, Stripe emails you. You do the thing. For a one-off sale, a deposit, or the first ten customers of anything, this is genuinely the right answer and the rest of this page is premature.
What it costs you: It does not scale past the point where you notice the emails, and it cannot gate anything automatically. There is no state, so there is nothing to check.
Correct when you already deploy something, and want to own the whole thing.
One function to create the Checkout Session with a server-chosen price, one to receive the webhook with signature verification and a replay guard, and a table to keep the result. This is not a large amount of code, and it is the version you should build if the billing logic is itself part of your product.
What it costs you: It is still a backend, so you are keeping a database, a secret and a public endpoint running, and you will be the one awake when a webhook starts failing. Most of the work is not the happy path, it is the lifecycle: upgrades, proration, refunds, failed renewals.
Correct when the app genuinely has no server, such as a static site, a browser extension, a desktop app or a CLI.
Someone else runs the checkout endpoint, the webhook receiver and the state table, and your app reads one URL to find out where it stands. The pricing page is hosted too, so your client ships no Stripe SDK and holds no Stripe key.
What it costs you: A service in the path, and a pricing page on a domain that is not yours. Stripe still charges its ordinary processing fees either way, because this replaces engineering, not the processor.
A one-off sale ends when the payment clears. A subscription does not. It renews on a schedule, the card fails on some of those renewals, the customer cancels at the end of a period rather than immediately, and some payments come back as refunds weeks later. None of that involves the customer visiting your app, so none of it can be noticed by code that only runs when they do.
This is why the answer is almost always a stored state updated by webhook, rather than a question asked of the Stripe API at the moment you need the answer. Reading live puts a rate-limited network call on your hot path and makes your app unavailable whenever Stripe is, including to users who were not paying for anything. Reading from a table that a webhook keeps current is both faster and independent.
The shape of that read, and the lifecycle states it has to cope with, are a topic of their own: how to check a Stripe subscription’s status.
If you are selling a single thing, to a handful of people, and fulfilling it yourself, use a Payment Link and stop reading. There is no state to keep, so there is nothing to keep it in, and every paragraph above is describing work you do not have. The point at which this changes is the point at which something has to unlock without you.
Partly. Stripe Checkout and Payment Links are hosted by Stripe, so collecting the card needs no server of yours. What needs a server is everything after the card: choosing the amount somewhere the buyer cannot edit, receiving the webhook that confirms the payment, and keeping the answer to "is this person paid" afterwards. A purely frontend integration can take money and then be unable to prove it did.
Because it is a page the buyer visits, not a fact Stripe asserts. They can navigate to the success URL directly, close the tab before it loads, or pay with a method that settles minutes later. Stripe sends the authoritative confirmation as a webhook to a URL you control, and that is the only signal worth granting access on.
Only a server-side check. If the amount, the plan or the price id originates in your JavaScript, it can be changed before it is sent. The fix is that whatever creates the Checkout Session looks the price up itself, from your own stored plans, and refuses a price id that does not belong to that product.
You need somewhere that holds the current state, because subscriptions change long after the buyer has gone: they renew, fail, get refunded and get cancelled. Asking the Stripe API on every page load is the alternative, and it adds a rate-limited network call to your hot path and ties your uptime to theirs. A table updated by webhook is the normal shape.
For a one-off sale or anything you fulfil by hand, yes, and it is the right answer more often than people expect. It stops being enough the moment something in your app has to unlock automatically, because a Payment Link produces an email, not a state your code can read.
The checkout endpoint, the webhook receiver with its signature check and replay guard, the subscription table and its lifecycle handling, and the pricing page. Your app keeps one job, which is reading a status and deciding what to show. What it does not remove is Stripe: the money still settles into your own Stripe account at Stripe’s ordinary fees.
No. It runs on your own Stripe account, your customers and payouts stay yours, and Stripe charges its usual processing fees either way. What it replaces is the layer above: the plans, the hosted pricing page, the webhook receiver and the status read.
SparkPay is option three. It runs the checkout endpoint, which looks the price up from your own stored plans and refuses a price id that does not belong to the app; the webhook receiver, with signature verification and an event-id replay guard; and the subscription table that the lifecycle events write to. The pricing page is hosted too, so your client ships no Stripe SDK and holds no Stripe key, and your app reads one status URL. It runs on your own Stripe account, so the money and the customers are yours and Stripe charges its ordinary fees. It is not a Stripe alternative and it does not reduce processing costs.
It is also the wrong answer for anyone whose billing logic is part of their product, or who would rather own the two functions in option two. Both are reasonable, and this page has tried to describe them well enough that you can tell which one you are.