# Can users get my AI-built app's paid features for free? Checking Stripe payments

Canonical: https://caelo.sh/guides/stripe-webhook-security-ai-built-app
Published: 2026-11-25 · Updated: 2026-11-27 · Arthi Arumugam, Caelo by Irth Labs

**Short answer:** Often, yes. A common pattern in AI-built apps is that the browser tells the database the payment succeeded, or sends the price to charge. Anyone can fake both. The fix: take prices from your own server or Stripe, never from the browser, and mark an order or subscription as paid only when your server receives a Stripe webhook whose signature it has verified.

## Three ways payment gets bypassed

This is not hypothetical. The CVE-2025-48757 write-up showed how weak database rules let a signed-out visitor insert a record already marked as paid, bypassing Stripe. And in one industry test of 15 AI-built apps, 4 of 5 agents let customers place orders with negative quantities.

- The success page writes paid = true. Anyone can open the success page or send that update directly.
- The browser sends the amount. A user can change it to 1 cent, or to a negative number.
- The database lets users update their own plan, status or credits columns.

## The safe pattern

1. The browser asks your server to start checkout, sending only a product or plan id.
2. Your server looks up the price itself and creates the Stripe Checkout session.
3. Stripe sends a webhook to your server when payment succeeds.
4. Your server verifies the webhook signature with your webhook signing secret, then marks the order paid.
5. Your database rules stop users from changing paid, plan, role or credit fields themselves.

## How do you check your own app?

1. Search your code for the place an order or subscription becomes paid or active. It should be in a webhook handler on the server.
2. In that handler, look for signature verification (`constructEvent` or the equivalent). No verification means anyone can call it.
3. Check that the amount charged is not taken from the request body.
4. Check your database rules on orders, profiles and subscriptions tables for user-editable status columns.

## Check your own app

1. Run the free local check: `npx caelo .` Caelo is a free, open source (MIT) command line tool and MCP server from Irth Labs that checks the files of an AI-built app for exposed API keys, Supabase and Firebase misconfigurations and `.env` files with real values. It runs on your machine, uploads nothing and uses no AI model. Each finding comes with a plain-English fix.
2. Follow the fix in the report and rerun Caelo. For an untracked, unignored file containing secrets, preview the US$19 quick fix. https://caelo.sh/fix
3. For an engineer's assessment, book the US$490 App Health Check. Irth Labs delivers a report and fixed repair quote, with credit toward the repair. https://www.irthlabs.com/start?service=app-health-check

## Questions

### Is the Stripe publishable key safe in my frontend?

Yes, `pk_` keys are public by design. `sk_` (secret) and `rk_` (restricted) keys and the webhook signing secret must stay on the server.

### Do I need webhooks if I use Stripe Checkout?

Yes, to know reliably that payment succeeded. The redirect to your success page is not proof of payment.

### Could people have already used this?

Compare paid orders against Stripe's payment records. Orders marked paid with no matching Stripe payment are the sign.

## Sources

- [Stripe docs: Verify webhook signatures.](https://docs.stripe.com/webhooks#verify-events)
- [Palmer and others, 2025. Statement on CVE-2025-48757.](https://mattpalmer.io/posts/2025/05/statement-on-CVE-2025-48757/)
- [SecurityWeek, Jan 2026. Vibe coding tested: AI agents nail SQLi but fail on security controls.](https://www.securityweek.com/vibe-coding-tested-ai-agents-nail-sqli-but-fail-miserably-on-security-controls/)

## Related guides

- [Security checklist for apps built with Lovable, Bolt, Cursor, Replit or v0](https://caelo.sh/guides/vibe-coded-app-security-checklist)
- [Is my Lovable app secure? A 15-minute self-check](https://caelo.sh/guides/is-my-lovable-app-secure)
- [Is my Bolt.new app secure? A self-check before you launch](https://caelo.sh/guides/is-my-bolt-app-secure)
- [How do you secure a Supabase Edge Function?](https://caelo.sh/guides/supabase-edge-functions-security)
- [How to rotate a leaked Stripe secret key without downtime](https://caelo.sh/guides/rotate-stripe-secret-key)
