Embedded referral widget
How to embed a referral widget in your SaaS
An in-product referral program is four pieces of work: show the widget to the signed-in user, record who referred each visitor, report the payment, and pay the reward. This guide walks through each piece with Refgrow, lists what Cello and GrowSurf offer by their own sites, and says when building it yourself makes sense.
Free trial, cancel anytime
Reviewed November 2026
The short answer
- With Refgrow the embed is two script tags and a container element: one script records referral visits, the other renders the widget for the signed-in user. Payments arrive from your billing provider by webhook.
- Cello lists a JavaScript SDK for web apps and components for iOS, Android, React Native and Flutter. GrowSurf lists a JavaScript SDK, embeddable elements and iOS, Android and React Native SDKs.
- If you use a coding agent, npx refgrow setup registers Refgrow's MCP server in Claude Code, Cursor or Codex and adds an integration skill, so the agent adds the tracking script, passes the referral code at checkout and runs a test sale.
- Building it in-house means building attribution, renewals and refunds, a hold period, payouts, invoices and fraud checks. The widget is the small part.
Embedded referral widgets, side by side
As each vendor's own site describes it, read on 15 November 2026. Not listed means the page we read does not mention it, not that the vendor cannot do it.
| Tool | In your product | Mobile apps | Entry plan |
|---|---|---|---|
| Refgrow | Widget added with a script tag that recognises the signed-in user by email; hosted portal on a subdomain or your own domain; REST API for a custom screen | Referral codes that work without a browser; App Store and Google Play purchases reported through the REST API | $49/moPro: up to $10,000/mo of affiliate revenue |
| Cello | In-app referral widget for web apps through a JavaScript SDK | Referral components for iOS, Android, React Native and Flutter | $0/mo (Partner Free)Partner Free: 1 partner campaign, 5 transacting partners, 5% transaction costs |
| GrowSurf | JavaScript SDK and embeddable elements for your web UI | iOS, Android and React Native SDKs | $179/moReferral programs, Startup: up to 2,500 participants ($125/mo billed yearly) |
| Tolt | Widget dropped into your app that gives every user a link to share; branded affiliate portal on your domain | RevenueCat named for mobile apps | $99/moGrowth: up to $20,000/mo of partner revenue, 5 programs |
| FirstPromoter | White-label partner portal that embeds inside your product or runs standalone | Not listed on the page read | $49/moStarter: up to $5,000/mo of affiliate revenue, 1,000 affiliates, 3 campaigns |
What each tool costs
Prices from each vendor's own pricing page, checked on 23 October 2026, monthly billing. Vendors change plans often: check the source before you decide.
| Tool | Entry plan | Other plans | Billing providers | Free trial | Fees on top |
|---|---|---|---|---|---|
| Refgrow | $49/moPro: up to $10,000/mo of affiliate revenue | Business $99 (up to $25,000/mo), then +$99/mo for every extra $25,000/mo | Stripe, Paddle, Lemon Squeezy, Polar, Dodo Payments, Creem | Free trial; 30 days if you switch from another tool | 0% transaction fees |
| Cello | $0/mo (Partner Free)Partner Free: 1 partner campaign, 5 transacting partners, 5% transaction costs | User referral plans priced by referral ARR, from $65/mo as shown with a 32% discount, Scale $750/mo billed monthly; Partner Plus $80 and Pro $280 (3.5%) | Stripe and Chargebee named as webhook sources | Not stated; Partner Free plan available | Partner plans: 2% to 5% transaction costs; user referral plans: 0% |
| GrowSurf | $179/moReferral programs, Startup: up to 2,500 participants ($125/mo billed yearly) | Business from $449 (10,000 participants), Custom above 150,000; affiliate programs $0/mo plus a 3% success fee | None named on the pricing page | 14 days, no card (referral programs) | Affiliate programs: 3% success fee on referral revenue |
| Tolt | $99/moGrowth: up to $20,000/mo of partner revenue, 5 programs | Pro $199 (up to $50,000/mo), Enterprise custom | Stripe, Paddle, Chargebee (others via webhooks or API) | 14 days, no card | 2% processing fee on auto payouts |
| FirstPromoter | $49/moStarter: up to $5,000/mo of affiliate revenue, 1,000 affiliates, 3 campaigns | Business $99 (up to $15,000/mo), Enterprise $149 (above $15,000/mo; its FAQ says Enterprise tiers go above that) | Stripe, Paddle, Chargebee, Recurly, Braintree | 14 days, no card | None listed on the pricing page |
The four parts of the integration
Whatever tool you choose, the same four things have to happen. A widget that looks finished on day one is only the first of them.
- Show the program to the signed-in user: their link, their referrals, their earnings.
- Record the referral: when a friend arrives through a link or uses a code, remember who sent them until they pay.
- Report the payment: the first charge, and for a subscription every renewal, upgrade and refund.
- Pay the reward: work out what is owed, hold it until refunds are unlikely, pay it out and issue the paperwork.
Embedding the widget with Refgrow
Step 1, record referral visits. Add the tracking script to the head of your pages: a script tag with src https://scripts.refgrowcdn.com/latest.js and your project ID in data-project-id. It reads the referral parameter from the link and remembers it.
Step 2, show the widget. On an account or settings page, add a div with id refgrow, your project ID in data-project-id and the signed-in user's email in data-project-email, followed by the script https://scripts.refgrowcdn.com/page.js. The widget recognises the user by that email, so there is no second sign-up. It takes your colors, its blocks (share link, coupon code, stats, earnings, payout history) can be switched on, off and reordered, and it comes in 9 languages.
Step 3, connect your billing provider. Stripe, Paddle, Lemon Squeezy, Polar, Dodo Payments and Creem report payments by webhook, so the first charge, renewals and refunds reach Refgrow without code of yours. Any other provider can report sales through the REST API.
Step 4, test it. Open a referral link in a fresh browser session, complete a test checkout, and check that the customer, the sale and the commission appear. The tracking script alone does not connect a custom checkout: the referral has to reach checkout through the referral parameter, metadata, a coupon or the customer's email. The tracking guide covers each case.
Optional: call the sign-up function after a successful registration to see referred sign-ups before they pay, and listen for widget events if you want to react in your own UI when a user joins the program.
Letting a coding agent do it
Refgrow ships a CLI and an MCP server. Running npx refgrow setup registers the MCP server in Claude Code, Cursor or Codex and adds an integrate-refgrow skill: the agent adds the tracking script, passes the referral code at checkout and runs a dry-run Stripe test sale. Details are in the CLI docs and the MCP server docs.
What Cello and GrowSurf list
We can describe our own integration step by step. For other vendors we restate what their sites say and point you to their documentation, because we cannot source how long their setup takes in your codebase.
- Cello. In your product: In-app referral widget for web apps through a JavaScript SDK. Mobile apps: Referral components for iOS, Android, React Native and Flutter. Entry plan: $0/mo (Partner Free) (Partner Free: 1 partner campaign, 5 transacting partners, 5% transaction costs).
- GrowSurf. In your product: JavaScript SDK and embeddable elements for your web UI. Mobile apps: iOS, Android and React Native SDKs. Entry plan: $179/mo (Referral programs, Startup: up to 2,500 participants ($125/mo billed yearly)).
- Tolt. In your product: Widget dropped into your app that gives every user a link to share; branded affiliate portal on your domain. Mobile apps: RevenueCat named for mobile apps. Entry plan: $99/mo (Growth: up to $20,000/mo of partner revenue, 5 programs).
- FirstPromoter. In your product: White-label partner portal that embeds inside your product or runs standalone. Mobile apps: Not listed on the page read. Entry plan: $49/mo (Starter: up to $5,000/mo of affiliate revenue, 1,000 affiliates, 3 campaigns).
Build it in-house or buy it?
Engineering teams often start from the widget: a link, a counter and a table look like a week of work. The widget is the small part. The parts that take the time are the ones nobody sees.
- Attribution that survives a sign-up on one day and a payment three weeks later.
- Recurring commissions that follow renewals, upgrades, downgrades and cancellations.
- Refunds and chargebacks that reverse a commission, and a hold period so you do not pay out before they arrive.
- Payouts in several countries, a minimum payout, and invoices with tax details.
- Self-referrals and other fraud, held for review before anyone is paid.
- A place for partners who are not your users.
When building it yourself is right
Build it if the reward is not money: account credit, extra seats or usage limits live in your own billing logic, and a tool adds little. Build it if referral mechanics are your product. Otherwise buy the ledger and the payouts, and spend your engineering time on where the referral prompt appears in your product. Where to put referral invites in onboarding.
When Refgrow is not the right pick
- You want a ready-made native iOS or Android referral screen. Refgrow's widget is for the web; in a native app you build the screen yourself on the REST API. Cello and GrowSurf list native SDKs.
- You want to reward users with account credit or free months only. Refgrow is built around cash commissions and payouts.
- You have no one who can add a script tag to your app. Start with the hosted portal instead of the widget.
Frequently asked questions
How do I embed a referral widget in a SaaS app?
With Refgrow: add the tracking script to your pages, add the widget's container element and script to an account or settings page with the signed-in user's email, connect your billing provider so payments are reported by webhook, and run a test checkout through a referral link.
What does a Cello or GrowSurf integration look like?
By their own sites, read on 15 November 2026: Cello offers an in-app referral widget through a JavaScript SDK and components for iOS, Android, React Native and Flutter. GrowSurf offers a JavaScript SDK, embeddable elements and SDKs for iOS, Android and React Native. Their documentation has the steps.
Do users have to sign up again inside the widget?
Not with Refgrow when you pass the signed-in user's email: the widget shows that user's link and numbers at once. If you prefer users to accept your terms first, turn on explicit joining and they click Join before they get a link.
Can I build my own referral screen instead of using the widget?
Yes. Refgrow's REST API returns the referral link, referrals, conversions and payout status, so you can render your own screen, including in a native mobile app.
Should we build a referral program in-house?
Only if the reward is account credit or usage that lives in your own billing logic, or if referrals are your product. Otherwise the hidden work is attribution across weeks, renewals, refunds, hold periods, payouts, invoices and fraud checks.
What does Refgrow cost?
From $49/mo on Pro (up to $10,000 a month of affiliate revenue) and $99/mo on Business (up to $25,000), then +$99/mo for every extra $25,000. No transaction fees.
Related
Sources (prices checked 23 October 2026; in-product pages read 15 November 2026)
- https://refgrow.com/pricing
- https://cello.so/pricing/
- https://growsurf.com/pricing
- https://growsurf.com/pricing/affiliate-programs/
- https://tolt.com/pricing
- https://firstpromoter.com/pricing
- https://refgrow.com/docs/widget
- https://refgrow.com/referral-program-for-apps
- https://refgrow.com/affiliate-tracking-for-mobile-apps
- https://cello.so/product-overview/web-sdk/
- https://docs.cello.so/sdk/introduction
- https://growsurf.com/
- https://tolt.com/
- https://firstpromoter.com/
Add the widget, connect billing, run a test sale
Two script tags and a webhook connection, or one command for your coding agent. From $49/mo, no transaction fees.
Start free trialFree trial · Cancel anytime