r/FlutterDev • u/SaladAny369 • 6h ago
Example My users could pay for a subscription and get nothing, and every dashboard showed green
**Flutter app, RevenueCat, Supabase backend.**
Sandbox purchase went through. RevenueCat showed the entitlement active. The
app showed the pro badge. And the server still refused to let me start a
session.
Turned out I only called Purchases.logIn(userId) inside my sign in handlers.
Never on app launch. So any returning user with a restored session was
anonymous in RevenueCat. Their purchase got attached to a $RCAnonymousID:...
customer, my webhook couldn't match that to a user row, and never granted
anything.
**Worst part:** the webhook returned 200 the whole time. Zero rows updated, no
error thrown, everything green in every dashboard.
**Fixes**:
\- Call logIn on every app start when a session exists, not just on sign in.
\- Reject non UUID app_user_id in the webhook and log it loudly.
\- Return 5xx when the update matches zero rows.
\- Test with a returning user, not a fresh install. That's the only path I'd
never tested.
\#iOSDev #RevenueCat #InAppPurchase #StoreKit
\#FlutterApp