How to integrate payments (one-time) with Stripe into your app?
A one-time payment with Stripe means your customer pays you once for a product or service—like buying a book online—without any recurring charges. Stripe handles the secure checkout, accepts credit cards or digital wallets, and then deposits the money into your bank account. You just set it up once, and Stripe takes care of the payment flow safely in the background.
Add a one-time product purchase with Stripe.
Requirements:
– Backend: `/api/checkout` route to create a Checkout Session ($49 product).
– Frontend: "Buy Now" button → calls API → redirects to Stripe.
– Webhook `/api/webhook` to update Supabase `orders (id, user_id, status, amount)`.
– Confirmation page `/success` after payment.
– Error + loading states included.
– Output: end-to-end working Stripe checkout flow.