# Launch your affiliate program in an afternoon > An affiliate program lets partners share a tracked link and earn payouts for bringing in new customers or sales. See how GrowSurf helps teams launch quickly. - URL: https://growsurf.com/how-it-works/affiliate-programs/ --- An affiliate/partner program lets you empower affiliates, partners, and creators to bring you new customers or sales. Setup is quick. Here's a simple overview of how it works. ## Program Setup ### Step 1 Create your program Create your affiliate program in under 15 minutes with the help of our quickstart guide. Then invite your dev team to complete installation. ### Step 2 Launch and promote Follow your program checklist to test, launch, and promote your affiliate program. With GrowSurf, you'll get guided every step of the way to ensure you find success with your affiliate marketing efforts. ### Step 3 Analyze and optimize Real-time analytics and admin dashboard give you powerful insights like who your top affiliates are and the engagement funnel for your affiliate program, while weekly and monthly email reports keep you in the loop. ## Do it yourself ### Step 1 Give affiliates a link to share Once an affiliate applies to your program and you approve them, they'll be granted access to their affiliate portal where they can get their link, share it, and see their signups, commissions, and payouts. Here are four simple options. #### Popup If your users are your affiliates, you can embed a popup into your user portal to show each affiliate their link, referrals, commissions, and payouts. Open it from any button in your UI and pass the logged-in user's email so GrowSurf knows whose details to show. Example button code: ``` Refer and Earn $100 ``` #### Embedded If your users are your affiliates and if you want this inside your own app, embed the pieces you need on your affiliate page. When the user is logged in, their link and stats can load automatically. [Referral Link](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-form) - Show each affiliate's referral link Example embed code: ```
``` [Invite Form](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-invite) - Let affiliates send email invites from this page Example embed code: ``` ``` [Referral Status](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-referral-status) - Show each affiliate's progress Example embed code: ``` ``` You can style these embedded blocks to match your product. See our [docs](https://docs.growsurf.com/developer-tools/embeddable-elements) for setup details. #### Hosted page Your program comes with a dedicated hosted page you can send affiliates to. You can also put it on your own custom domain, such as *https://affiliates.yoursite.com*. ### Step 2 Track referred signups Next, tell GrowSurf when a new customer signs up through an affiliate link. Choose one of the options below based on how your signup flow works. #### No Code Add one GrowSurf script to your signup page and GrowSurf can connect each signup back to the affiliate who shared the link. It attaches affiliate tracking to the signup flow and landing pages you already use, so you do not need to change how new users or leads sign up today. ``` ``` #### JavaScript If you use a custom form or single-page app, send the signup to GrowSurf with [`growsurf.addReferredParticipant()`](https://docs.growsurf.com/developer-tools/javascript-sdk/api-reference#add-referred-participant). Pass the new customer's `email` and GrowSurf can match them to the affiliate from the browser cookie. ``` // Only creates a referred participant if the referral code is valid const result = await growsurf.addReferredParticipant({ email: 'gavin@hooli.com', firstName: 'Gavin', lastName: 'Belson', // Optional: Save any custom data as participant metadata country: 'UK', subscriptionPlan: 'Pro', }); if (result.added) { const participant = result.participant; } ``` You can also send extra fields as [metadata](https://docs.growsurf.com/developer-tools/metadata) if you want to use them later in reports or automations. #### REST API If your signups happen on your server, send the signup through [`/POST Add Participant`](https://docs.growsurf.com/developer-tools/rest-api/api-reference#post-campaign-id-participant). Pass the new customer's `email` plus `referredBy`, which can be the affiliate ID or email address, or retrieve it with [`growsurf.getReferrerId()`](https://docs.growsurf.com/developer-tools/javascript-sdk/api-reference#get-referrer-id) on the web, [`pendingAttribution()`](https://docs.growsurf.com/developer-tools/ios-sdk/api-reference#get-pending-attribution) on iOS, or [`getPendingAttribution()`](https://docs.growsurf.com/developer-tools/android-sdk/api-reference#get-pending-attribution) on Android. ``` curl -X POST 'https://api.growsurf.com/v2/campaign/45hxmj/participant' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d $'{ "email": "gavin@hooli.com", "firstName": "Gavin", "lastName": "Belson", "referredBy": "richard-h8kp6l", # Optional: Save custom fields as participant metadata "metadata": { "country": "UK", "subscriptionPlan": "Pro" } }' ``` You can also send extra fields as [metadata](https://docs.growsurf.com/developer-tools/metadata) if you want to use them later in reports or automations. ### Step 3 Track purchases Then tell GrowSurf when a referred customer pays. Choose one of the options below based on how you track purchases. GrowSurf keeps commissions up to date even on refunds or chargebacks. #### No Code Connecting to an integration takes less than one minute. Connect [Stripe](https://docs.growsurf.com/integrations/stripe#for-affiliate-programs), [Chargebee](https://docs.growsurf.com/integrations/chargebee#for-affiliate-programs), or [Recurly](https://docs.growsurf.com/integrations/recurly#for-affiliate-programs) to track purchases and calculate commissions #### REST API If you are not using Stripe, Chargebee, or Recurly as your billing system, use [`/POST Record Affiliate Transaction`](https://docs.growsurf.com/developer-tools/rest-api/api-reference#post-campaign-id-participant-participantidoremail-transaction) to send each purchase to GrowSurf so it can calculate the commission. Just provide the email address of the referred customer and the transaction details. ``` curl -X POST 'https://api.growsurf.com/v2/campaign/45hxmj/participant/gavin@hooli.com/transaction' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d $'{ "currency": "USD", "grossAmount": 9900, "amountCashNet": 7900, "invoiceId": "invoice_54", "paidAt": 1733702400000, "description": "Renewal for Pro subscription" }' ``` To handle refunds/chargebacks, call [`/POST Refund or Amend Affiliate Transaction`](https://docs.growsurf.com/developer-tools/rest-api/api-reference#post-campaign-id-participant-participantidoremail-transaction-refund). ### Step 4 Pay affiliates Finally, pay affiliates. GrowSurf emails affiliates when they earn a payout, and once they qualify, you can send payouts in bulk from the dashboard. #### No Code Connect to PayPal in less than one minute. Send bulk payouts with [PayPal](https://docs.growsurf.com/integrations/paypal#for-affiliate-programs), or create and fund payout batches with [Wise](https://docs.growsurf.com/integrations/wise#for-affiliate-programs) By setting a minimum payout amount, such as $50, you can reduce PayPal/Wise transaction fees by only sending payouts when they have reached the threshold (GrowSurf does not charge any payout processing fees on top of this). #### Webhooks If you want full control, use [webhooks](https://docs.growsurf.com/automate-rewards/webhooks) and handle payouts or rewards in your own system. You can also pass reward metadata so your team can change payout rules without changing code each time. ``` // Node.js webhook example app.post('/your/webhook/payload-url', function(req, res) { const body = req.body; try { if (body.event === 'PARTICIPANT_REACHED_A_GOAL') { // Write code here to do something when a participant wins a reward console.log(`${body.data.participant.email} just won this reward: ${body.data.reward.description}`); // If the reward is approved if (body.data && body.data.reward && body.data.reward.approved) { // Do something // Optional: If there is any reward metadata, use it: if (body.data.reward.metadata && body.data.reward.metadata["proRewardValue"]) { console.log(`${body.data.participant.email} earned an amount of ${body.data.reward.metadata["proRewardValue"]}.`); } } // If this is a double-sided reward, use body.data.reward.isReferrer to determine if this is for the referrer or referred person if (body.data && body.data.reward && body.data.reward.isReferrer) { // Do something } } } catch (err) { res.status(400).end(); } res.json({received: true}); }); ``` ## Do it with AI ### Step 1 Copy the prompt Start without a GrowSurf account or credit card. Copy the prompt below and paste it into an AI assistant that can browse the web and send requests. Your assistant creates the account, asks you what you want, and prepares a draft affiliate program for you to review. ChatGPT Claude Gemini Perplexity and other assistants that can browse the web and call APIs ``` Help me create a GrowSurf referral or affiliate program. Start by reading https://growsurf.com/agent-start.md and follow it as the source of truth. Use your action-capable tools and the GrowSurf REST API to create and configure the program; do not require MCP, a dashboard visit, or an existing GrowSurf account or API key. Consult https://growsurf.com/openapi.json, https://growsurf.com/arazzo.yaml, https://growsurf.com/auth.md, https://growsurf.com/llms.txt, and the linked GrowSurf docs when useful. Before taking action, interview me one question at a time for the missing business, program type, rewards or commissions, conversion trigger, branding, emails, and integration requirements. Show me and ask for explicit approval of the current GrowSurf Terms of Service and Privacy Policy before accepting them or creating an account. Pause for me to verify my email before protected API requests. Treat the returned API key as a secret and keep it out of chat, logs, screenshots, source files, and shell history. Create and configure the program as DRAFT. Read back the saved resources and summarize what is ready for review. Do not launch or resume the program, add payment details, accept charges, enable or fulfill rewards or commissions, initiate payouts, rotate keys, delete data, or edit or deploy my website or app without separate explicit approval. If you cannot access the linked resources or send HTTPS requests, say so clearly, explain what you can do, and do not claim that you executed the workflow. ``` [See how AI builds your program](/build-with-ai/) ### Step 2 Answer its questions Your assistant asks one question at a time — your commission, what counts as a conversion, your branding, your emails. It creates your account once you approve GrowSurf's terms, then waits while you verify your email. AI agent workspace Create an affiliate program that pays affiliates a 20% commission when a referred customer subscribes. I’ll create your GrowSurf account first. **GrowSurf API**Create GrowSurf account Complete GrowSurf account createdVerification email sent First, I just need you to verify your GrowSurf account. Click the link in your inbox, then come back here. [Open Gmail](https://mail.google.com/) Done Thanks — I’ll finish your program now. **GrowSurf API**Build affiliate program Complete GrowSurf account verifiedDraft program created20% commission configured Your draft affiliate program is ready for review. - Built an **affiliate program** from a program template - Set a **20% commission** for each referred subscription - Saved the program as a draft for approval Here's what your affiliates will see: yourbrand.com/affiliate Earn 20% commission Share your link. When a referred customer subscribes, you earn commission. `yourbrand.com/r/jordan-t`**Copy** ### Step 3 Review and launch Your program is saved as a draft — nothing reaches your affiliates until you approve it. Installation can go to AI too: open the Installation step in your dashboard, hit Copy for AI, and paste it into your assistant or send it to your dev team. #### Last step: connect GrowSurf to your product. Three things. Install the code, connect the payment processor that bills your customers, and pick how affiliates get paid. Copy for AI - *1***Install the GrowSurf Universal Code***One script on your site* - *2***Connect your payment processor***Payments, refunds, and chargebacks* - *3***Pay your affiliates***Pick how payouts get sent* - *4***Give affiliates somewhere to grab their link***The Partner Portal* Prefer to write the code yourself? See the four installation steps under Do it yourself → ## From affiliate conversion to payout You recruit your own affiliates and set the commission terms before you invite them: what counts as a sale, the rate, the hold period, and the payout minimum. Once your program is live, here is what happens from the moment an affiliate brings in a sale to the moment they are paid. 1. Step 1 ### An affiliate brings in a sale When someone clicks an affiliate's link and becomes a paying customer, GrowSurf credits that sale to the affiliate as it lands, not on a schedule you run. 2. Step 2 ### The affiliate earns a commission Your terms decide the amount: a flat fee or a percentage, plus renewals and repeat payments if you set it up that way. The commission lands in the affiliate's balance straight away. Nothing is paid out yet. 3. Step 3 ### Refunds settle during the hold A new commission is not ready to pay. It sits through the hold period you set, the window where refunds and chargebacks can still land. A refund inside that window takes it back off the balance. When the hold ends, whatever survived is approved. 4. Step 4 ### You pay everyone who is due An affiliate becomes due once their approved balance clears the minimum you set. Your dashboard lists everyone who qualifies, and one action pays them all through [PayPal](/integrations/paypal/) or Wise, with a record of every payout. 5. Step 5 ### Affiliates watch their earnings Affiliates see every commission, whether it has cleared its hold, and every payout you have sent. They enter their own payment details, so you never chase anyone for a PayPal address before you can pay them. Notes and related links - **Customer referrals and affiliate programs are different program types.** A referral program rewards existing customers with one-off rewards when a referral qualifies. An affiliate program pays recruited partners recurring commissions on the sales they bring in. Each is configured as its own program with its own pricing: [referral programs](/pricing/referral-programs/) are priced by participants, and [affiliate programs](/pricing/affiliate-programs/) charge a percentage of referral revenue. - **Decide who gets credit.** If more than one channel can claim a sale, decide which program gets credit and check that rule with your integration. Read the full guide, [Affiliate Program Workflow](https://docs.growsurf.com/getting-started/affiliate-program-workflow), for setup instructions, the [commission and payout webhooks](https://docs.growsurf.com/developer-tools/webhooks/events-reference), and checks before launch. Or start with the [affiliate software overview](/affiliate-software/). "GrowSurf manages everything to do with our referral program from A to Z — **our tech team had to merely paste a small piece of code into our app, everything else was easily set up by marketing**. The savings from that alone makes the decision to go with a 3rd party (instead of building things ourselves) well worth it.” ###### Alex Klein Co-Founder at Ubindi "We wanted a cost-savvy solution that could be managed and changed easily without the help of IT/devs. GrowSurf provided us exactly what our business needed! They saved me and our development team valuable time by providing an easy-to-use solution of building an internal system, with minimal coding. **With GrowSurf's support, I was able to set up the entire program within a day.**" ###### Gabriella Di Fazio Marketing Manager at SurveyMonkey ## Unlock the power of word-of-mouth marketing and deepen your bond with customers Set up your refer a friend program with customer referral and affiliate program software that lowers your acquisition costs, increases customer loyalty, and saves you gobs of time. [Launch Your Program](https://app.growsurf.com/signup) 14 day free trial No credit card required Trusted by marketing and product teams that grow through customer, user, and partner referrals.