One subscriptions row, two stores: Stripe and Google Play in Next.js + Supabase
MotionLab sells one Pro plan through two checkouts. On the web it's Stripe Checkout. On Android it's Google Play Billing. Two stores with two lifecycles and two kinds of IDs, plus two ways of telling you something changed. The web app doesn't care about any of that. It wants one answer: is this user Pro right now? We're building MotionLab , personalized stretching and mobility sessions. Earlier…
MotionLab offers personalized stretching and mobility sessions through a single subscriptions row in Supabase. The row is keyed by the user ID and contains status, interval, Stripe customer ID, Stripe subscription ID, Stripe price ID, current period end, start date, cancel at period end, and updated date. The status column uses Stripe's vocabulary such as active, trialing, past_due, and canceled.
The interval column is either month or year. The user ID appears twice in the metadata: once in the Checkout Session and once in the Subscription itself. This allows later events to identify the user and track changes like renewals, plan changes, cancellations, and failed payments. The webhook receives the raw body and signs the exact bytes sent by Stripe to verify the signature.
The Checkout route creates the session with the user ID in the metadata, and the webhook reads the raw body to ensure signature verification.
Rewritten by urgent.news; may contain errors — check the original.
Sources: dev.to · 9to5google.com · blog.google · techcrunch.com · theverge.com · androidauthority.com · arstechnica.com · androidpolice.com
Also reported by 7 other outlets
- A redesigned Play Store is coming to cars with Google built-in theverge.com
- Google Play now supports private, vibe-coded apps built just for you techcrunch.com
- Hey Google, where is the next Nest Hub? 9to5google.com
- Google wants to host your personal vibe-coded apps in the Play Store arstechnica.com
- Yikes: Google let a fake Chrome app on the Play Store, and it got over 100,000 downloads androidauthority.com
- New on Google Play: More ways to create, discover, and play blog.google
- Your vibe-coded Android apps now have a home on Google Play androidpolice.com