stripe-samples/subscription-use-cases — reverse-engineered prompt
Reverse engineered prompt
Build me a simple Stripe Billing demo app that I can run locally in test mode. I want a user to choose between a Basic and Premium plan, enter payment details securely, create a customer, and start a recurring subscription. Please also include a usage based subscription flow where the customer can be billed based on metered usage, plus a simple way to apply coupons if Stripe supports it.
Use Stripe test keys from an env file, expect prices with lookup keys called sample_basic and sample_premium, and make the app easy to start at localhost:4242. Include webhook handling so subscription and payment events are logged or handled properly. Add clear setup notes for creating the prices, adding the keys, forwarding webhooks with the Stripe CLI, and testing with Stripe test cards like 4242424242424242 and the 3D Secure test card.
Use JavaScript and look up current Stripe docs online if you need to.
Want more depth? Deep Reverse