Product code understands :free, :pro, and :business. Stripe Price IDs remain centralized provider mappings.
Rails Implementation Guide · Coming soon · $27
Billing in Rails 8
Build subscription billing that survives beyond the first successful Stripe Checkout.
A focused guide to Stripe, Pay, stable application plans, durable Checkout, local subscription state, entitlements, limits, plan changes, recovery, and reconciliation.
One $27 product · PDF, EPUB, HTML, reference implementation, and Agent Companion

The architecture
Stripe and Pay should not become your product model.
Stripe owns money and provider-side billing machinery. Pay owns repetitive Rails integration plumbing. Your application owns stable plan identity, product policy, entitlements, limits, and the customer experience.
Ordinary rendering and access checks stay local. Provider calls happen during explicit Checkout, plan-change, synchronization, and reconciliation operations.
What the guide gets strict about
Clear boundaries for the parts most likely to drift.
Persist local intent before the network call, reject conflicting live operations, and never treat a browser redirect as billing truth.
Separate billing relationship, provider access, paid product access, cancellation state, and configuration errors.
Keep Boolean entitlements, quantitative limits, and user authorization separate, then enforce them at server-side mutation boundaries.
Let Rails choose the intended plan while hosted provider flows present proration and payment consequences.
Reconcile provider and local state deliberately, report unknown mappings, and keep ordinary page reads fast and local.
Inside the guide
Twelve chapters from first principles through operations.
Billing Is More Than Taking a Payment
Understand the Stripe Machinery
Own Your Plan Catalog
Put Pay Behind Your Billing Boundary
Build Checkout, Then Make It Reliable
Keep Subscription State Local
Turn Plans Into Product Access
Build the Billing Experience
Upgrade, Downgrade, and Change Billing Cycles
Trials, Cancellation, and Failed Payments
Reconcile and Debug Billing State
Test the System You Actually Built
Plus: a short appendix explaining when add-ons, metering, multiple items, replacement Prices, grandfathering, and complex account overrides force the model to grow.
Everything included
One product. No artificial editions.
The complete implementation guide
- 111-page PDF, plus EPUB and HTML
- Stripe machinery explained before the abstractions
- Pay-backed Rails architecture and billing UX
- Checkout, lifecycle, changes, recovery, and reconciliation
Adaptable Rails implementation
- Plan catalog, Billing boundary, entitlements, and limits
- Durable Checkout model, migration, controller, and view
- Downgrade validation and reconciliation job
- Focused Rails and PostgreSQL tests
Implementation context for coding agents
- Shared capability and architectural contracts
- Recipes for adding and changing billing behavior
- Concrete examples and billing review checklist
- Thin Codex and Claude Code entrypoints
Coming soon
Billing in Rails 8 will be $27.
The complete book, all three formats, the adaptable reference implementation, and the Agent Companion will ship together.