// the find
stripe-samples/checkout-single-subscription
Learn how to combine Checkout and Billing for fast subscription pages
Official Stripe sample showing how to wire up Checkout Sessions with recurring Billing subscriptions. It's a teaching repo, not a library — the point is to show the minimal server-side code needed to create a CheckoutSession and handle the webhook lifecycle. Eight server implementations (Node, Python, Ruby, Go, Java, PHP, .NET, Next.js) cover the same surface area.
The multi-language coverage is genuinely useful — you can compare the Node and .NET implementations side-by-side and the pattern is identical, which makes porting to your stack straightforward. Webhook handling is included and not an afterthought; the CI matrix tests each server language independently. The Stripe Tax integration is documented with actual tax code IDs and the inclusive/exclusive behavior distinction, which most tutorials skip. Setup via Stripe CLI (`stripe samples create`) is the fastest path to a running demo I've seen in a Stripe sample.
No idempotency keys on the CheckoutSession creation — in production, a retry on a slow network creates a second session and double-bills. The webhook handlers don't show what to do when `payment_intent.payment_failed` fires after a subscription is already active, which is the failure mode that actually bites people. The Next.js server is structured differently from the other eight (App Router vs. plain HTTP handler), so it can mislead developers who pick that path and then hit subtle caching behavior with route handlers. No test coverage for the webhook endpoint in any server except the Ruby spec, so the CI label is misleading for most implementations.