526 feat referral system for ultracite cloud#541
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This reverts commit 201742c.
# Conflicts: # packages/cli/__tests__/initialize.test.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Note
High Risk
Touches billing/Stripe webhook logic and adds new credit-application side effects, so failures could mis-credit customers or create duplicate credits despite the added idempotency safeguards.
Overview
Introduces an end-to-end referral program across the app: new Prisma models (
ReferralCode,Referral) and server helpers to generate/track codes, record referrals during org sync, and compute referral stats/Stripe balance.Adds referral UX in the org dashboard (sidebar link + new
/settings/referralspage) with a client dashboard to copy the referral URL and view earned/pending history.Hooks referrals into billing by handling
invoice.paidwebhooks to apply $5 Stripe customer balance credits (with idempotent/atomic DB claims and deferred referrer-crediting until the referrer subscribes), and captures referral codes via a new/r/[code]route that sets an HTTP-only cookie consumed during OAuth org sync.Written by Cursor Bugbot for commit 750d614. This will update automatically on new commits. Configure here.