TechnicalCollectible prompt
Stripe checkout with webhooks and order records
Add Stripe Checkout to my {{tech_stack}} project so customers can pay for {{product_or_service}} from {{page_or_feature}}. Read the existing code and show me a short plan first.
Requirements:
- Create the Checkout Session on the server with price IDs from server config; never trust an amount from the browser
- One-time payments, plus subscriptions if the project has plans
- Fulfill orders only from the webhook, never the success page: verify the signature, handle completed, delayed and failed payments, and ignore duplicate events
- An orders table with status, amount, currency, Stripe IDs and customer, protected by access rules
- A success page that checks the session on the server, and a cancel page that keeps the cart
- Subscriptions get the customer portal, plus handling for failed renewals and cancellations
- Disable the pay button while the session is created, to prevent double charges
- Secret key and webhook secret only in server environment variables; only the publishable key reaches the browser
Work in test mode, and give me steps to forward webhooks locally with the Stripe CLI and test a success, a decline and a card that needs authentication.
When you're done, list the files changed, environment variables to set, your assumptions, and a go-live checklist.
Technicalnvoka.com/library/nvoka-stripe-checkout-with-webhooksScan to open
Technical
Stripe checkout with webhooks and order records
Take payments safely with server-side sessions, verified webhooks and order records you can trust.
Curated by Nvoka
CursorClaude CodeCodexLovable
Make it yours
Fill in the blanks and change any word. Only your copy changes, never the card.
Fill in the blanks
0 of 3 filledYour prompt
Add Stripe Checkout to my {{tech_stack}} project so customers can pay for {{product_or_service}} from {{page_or_feature}}. Read the existing code and show me a short plan first.
Requirements:
- Create the Checkout Session on the server with price IDs from server config; never trust an amount from the browser
- One-time payments, plus subscriptions if the project has plans
- Fulfill orders only from the webhook, never the success page: verify the signature, handle completed, delayed and failed payments, and ignore duplicate events
- An orders table with status, amount, currency, Stripe IDs and customer, protected by access rules
- A success page that checks the session on the server, and a cancel page that keeps the cart
- Subscriptions get the customer portal, plus handling for failed renewals and cancellations
- Disable the pay button while the session is created, to prevent double charges
- Secret key and webhook secret only in server environment variables; only the publishable key reaches the browser
Work in test mode, and give me steps to forward webhooks locally with the Stripe CLI and test a success, a decline and a card that needs authentication.
When you're done, list the files changed, environment variables to set, your assumptions, and a go-live checklist.