Subscription (Stripe)
The problem
Service businesses, like barbershops and salons, manage staff, products and billing in scattered tools. The idea was to bring it all together, with team invites and a monthly subscription.
Payment happens on the Stripe page and the system only learns the result through the signed webhook. The subscription in the database always mirrors what Stripe says.
Decisions and why
- The webhook is the source of truth
- The checkout redirect in the browser may never happen; the signed event always arrives.
- Event signature verified
- Without it, anyone could "activate" a plan with a POST.
- Cards never touch the API
- Stripe checkout and portal: no card data on my server.
- Price id mapped to plan
- Changing prices in Stripe needs no code change; the map says which plan each price unlocks.
requestresponse
Pick a scenario above to watch the message travel through the architecture.