Stripe
The most common payment platform, with hosted checkout and subscriptions.
Pick it when You want the best docs and tools for one-off payments or subscriptions.
Skip it if You do not want to deal with sales tax yourself. Stripe has tax tools, but you stay the seller.
- Hosted checkout page, no card form to build
- Excellent docs and test mode
- Subscriptions and invoices built in
- You are the seller, so tax rules are your job
- Not available in every country
- Quick to set up
- Cheap while small
- Easy to leave
- Room to grow
PricePay a percentage and a fixed fee per payment
How to connect it
- Create an account and copy your test keys.
- Create a checkout session on the server with the price and your return URLs.
- Redirect the user to the session URL.
- Receive the webhook, verify its signature, and mark the order as paid.
STRIPE_SECRET_KEYNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYSTRIPE_WEBHOOK_SECRET
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
const session = await stripe.checkout.sessions.create({
mode: "payment",
line_items: [{ price: "price_123", quantity: 1 }],
success_url: "https://yourapp.com/thanks",
cancel_url: "https://yourapp.com/cart",
});
// send the user to session.url