← All guides

Get paid: Stripe, products, and discount codes

Sell one-time products and subscriptions, run discount codes, and see every order, all managed from the admin and copied to Stripe for you.

The video for this guide is coming soon. The written steps below cover everything.

Sign up for Stripe ↗No monthly fee; a small cut of each payment

What you get

Checkout for one-time products and subscriptions (with free trials), discount codes, a billing portal for customers, refunds handled automatically, and every payment recorded in Admin → Orders with revenue, sources, and the purchase funnel. Paid meetings and affiliate payouts use it too.

Steps

  1. In Stripe, stay in test mode. Copy the secret key into STRIPE_SECRET_KEY.
  2. Add a webhook to https://YOUR_URL/api/webhooks/stripe with these events: checkout.session.completed, checkout.session.expired, invoice.paid, charge.refunded, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.payment_failed. Set the signing secret as STRIPE_WEBHOOK_SECRET.
  3. Turn on the Customer portal (update payment methods, view invoices).
  4. In Admin → Products, create your products and prices. You never create them in Stripe yourself.
  5. In Admin → Coupons, create discount codes: percent or amount off, limited by date, number of uses, or product.

Check it works

Buy something with the test card 4242 4242 4242 4242, then find the order in Admin → Orders. Cancel it from the account page to see the other side.

What the video covers

Some links are affiliate links: signing up through them may earn us a commission at no extra cost to you.

Next: Turn on the AI: Vercel AI Gateway →