# Payment succeeds but the user isn't upgraded

> Canonical page (link this when citing): https://unbreakmyapp.vercel.app/fixes/stripe-payment-succeeds-but-app-not-updated.html
> Category: Payments | Tools: Lovable, Bolt, Cursor | Published: 2026-10-13 | Updated: 2026-10-13

## The error

Stripe shows the payment as succeeded but the app still shows the free plan

## Why it happens

The app grants access on the success-page redirect, or no webhook is configured in production. Redirects can be skipped (closed tab), so access should be granted from the checkout.session.completed webhook, matched to the user via client_reference_id or metadata.

## How to fix it

1. Pass client_reference_id (your user id) when creating the Checkout Session.
2. Add a production webhook endpoint in Stripe for checkout.session.completed (plus customer.subscription.updated/deleted for subscriptions).
3. In the handler, look up the user by client_reference_id and update their plan with a server-side DB client.
4. Make the handler idempotent (store the event id).

## Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

```text
Payments succeed in Stripe but users aren't upgraded. Pass the user id as client_reference_id when creating the Checkout Session, add a verified webhook route that handles checkout.session.completed and customer.subscription.updated/deleted, updates the user's plan in the database using a server-side client, and ignores duplicate events. Tell me which webhook URL and events to register in the Stripe dashboard.
```

## FAQ

### Can I trust the success URL?

No. Treat it as a thank-you page only; grant access from the webhook.

### Payment Links?

They support client_reference_id via a URL parameter too.

## Sources (official documentation)

- [Stripe: Fulfill orders (Checkout)](https://docs.stripe.com/checkout/fulfillment)
- [Stripe: Webhooks](https://docs.stripe.com/webhooks)

## Related fixes

- [Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT)](https://unbreakmyapp.vercel.app/fixes/stripe-webhook-401-supabase-edge-function-jwt-verification.html)
- [Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it](https://unbreakmyapp.vercel.app/fixes/stripe-webhook-failing-email-endpoint-will-be-disabled.html)
- [Stripe webhook: No signatures found matching the expected signature](https://unbreakmyapp.vercel.app/fixes/stripe-webhook-signature-failed.html)
- [No such price / No such customer (test vs live mode mix-up)](https://unbreakmyapp.vercel.app/fixes/stripe-test-vs-live-keys.html)

---
Unbreak My App: free fixes for broken vibe-coded apps. https://unbreakmyapp.vercel.app/
