Setup guide
Everything PaidCheck needs, and exactly why. (The in-app forms generate a real secret and fill it in for you.)
1. Stripe restricted key
- Open Stripe Dashboard → Developers → API keys (use the same mode — Live or Test — your app charges in).
- Click “Create restricted key”. Choose “Providing this key to another website”, name it PaidCheck.
- Set these to Read: Customers, Subscriptions (under Billing), Charges, Events, Webhook Endpoints. Optional but recommended, also Read: Checkout Sessions, Invoices, Entitlements (one-time purchases, fewer double-charge false positives). Leave EVERYTHING else at None.
- Create the key, copy it (starts with rk_live_ or rk_test_) and paste it here. You can roll/delete it in Stripe at any time.
| Customers | Read | match a subscription to the customer's email, ID and metadata |
| Subscriptions (Billing) | Read | know who is active, trialing, past_due, unpaid or canceled, and seat quantities |
| Charges | Read | detect duplicate charges, refunds and one-time payments |
| Events | Read | find events whose webhook delivery failed (pending_webhooks > 0) |
| Webhook Endpoints | Read | detect disabled endpoints and endpoints missing key events |
| Checkout Sessions | Read (optional) | optional: one-time purchases (mode=payment) and telling separate checkouts apart |
| Invoices | Read (optional) | optional: link charges to subscription periods (fewer double-charge false positives) and invoice emails |
| Entitlements | Read (optional) | optional: count Stripe active entitlements as paid access |
| Everything else | None | PaidCheck never writes to Stripe. |
The optional scopes are still read-only. Without them PaidCheck skips the checks that need them and tells you so in the report.
2a. Supabase (Lovable, Bolt) — paste into your AI builder
Then give PaidCheck your project URL + anon/publishable key + the secret. The anon key alone can't read anything: the function checks the secret and only returns email/plan/active.
2b. HTTPS endpoint (Next.js, Cursor, any stack)
…or as a Supabase Edge Function
2c. No code: upload a CSV
Export your users (Supabase table editor → Export to CSV, or any admin panel) with these columns. On the free report the CSV is processed in memory for that one request and never stored. For monitored apps it's stored encrypted; re-upload it when your users change.
email,plan,active,stripe_customer_id ana@example.com,pro,true,cus_123 bo@example.com,,false,
2d. Or skip it: Stripe-only checks
With no access source, PaidCheck still checks failed and undelivered webhooks, disabled endpoints and endpoints missing key events, double charges and duplicate subscriptions. “Paid but no access” and “cancelled but still active” need one of the sources above.
Expected format
[{"email":"ana@example.com","plan":"pro","active":true,"stripe_customer_id":"cus_123"},
{"email":"bo@example.com","plan":null,"active":false}]email, plan, active are required (the original 3-field format keeps working). Optional: stripe_customer_id (best match), user_id (matched against Stripe customer metadata like user_id / supabase_user_id), and for per-seat team plans team_id + seats_used.
How users are matched
- Stripe customer ID (
stripe_customer_id) - Customer metadata user ID (
user_id,userId,app_user_id,supabase_user_id, …) ↔ youruser_id - Email: trimmed and case-insensitive; optionally ignoring +tags and Gmail dots (labeled)
- Any email seen on the customer's charges or invoices
Every report shows which rule matched each user.