← All stories · Payments & webhooks

Debug webhooks that fail only in the native app

'Works in preview' wasn't 'works on a phone' · Reddit r/vibecoding · u/Cool_Artist7009 · Jul 2026

Wrapping a Lovable app with Capacitor led to failing RevenueCat webhooks. The cause was Supabase's own auth check running before the code, which none of the AI tools spotted.

The honest numbers

As stated by the source. Not independently verified.

Lesson

When a webhook fails, check the platform layer (auth on the function, secrets per environment) before rewriting the code.

Fix prompt

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I'm a beginner with a Lovable app that takes payments with Stripe (or a similar provider). Please audit the payment flow. 1) Find the webhook endpoint and check that it verifies the provider's signature using the raw request body, and isn't blocked by my own auth (e.g. Supabase verify_jwt on the function). 2) Check that it handles failed payments, refunds, cancellations and the same event arriving twice (idempotency). 3) Make sure only the server/webhook can change a user's plan or credits, never the browser. 4) List problems with file names and fixes, then give me a test checklist using test-mode events and one small real payment. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
LovableSupabaseRevenueCatCapacitor

Source: Reddit r/vibecoding ↗

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime.