> For the complete documentation index, see [llms.txt](https://docs.growsurf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.growsurf.com/getting-started/referral-program-workflow.md).

# Referral Program Workflow

Follow a referred friend from the shared link through signup, the qualifying action, referral credit, and reward delivery.

GrowSurf tracks the customers your participants refer and unlocks rewards when they reach the goals you set. This guide walks through referral tracking, reward approval, and delivery.

![How a referred friend moves from a referral link to earning a reward](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2Fgit-blob-1e799a8cfb47a8b58ff7d267594f4df31b062911%2Freferral-program-workflow-diagram.svg?alt=media)

Before you invite participants, use the Program Editor to configure your referral trigger, rewards, who gets rewarded, and whether rewards require approval.

## 1. Give each participant their referral link

You can provide participants with their referral link through the [GrowSurf window](/developer-tools/javascript-sdk/tutorials.md#example-2-open-growsurf-window-on-button-click), [embedded form](/developer-tools/embeddable-elements.md#embedded-form), or a hosted referral portal.

For an iOS or Android app, follow [Getting Started for Native Mobile](https://docs.growsurf.com/getting-started-for-native-mobile) to add the GrowSurf Window to your app. Participants can then view and share their referral link and track their referrals and rewards.

## 2. Keep track of who referred the friend

When a referred friend signs up, GrowSurf needs to record who referred them. If you're using the Automagic form tracking method, verify that referral tracking is working correctly.

For forms that aren't compatible with Automagic form tracking, use the [JavaScript SDK](/developer-tools/javascript-sdk.md) or follow the [REST API](/developer-tools/rest-api.md) tutorial. When adding the new user with the REST API, include `referredBy` to associate the new user with a referrer. It can be the referrer's email address or unique GrowSurf ID. You can use [`growsurf.getReferrerId()`](https://docs.growsurf.com/developer-tools/javascript-sdk/api-reference#get-referrer-id) to retrieve the referrer ID.

For iOS and Android apps, install the [iOS](/developer-tools/ios-sdk.md) or [Android SDK](/developer-tools/android-sdk.md) to capture referral attribution, create referred participants, and show a native referral window in your app.

## 3. Record the action that counts

Your program's referral trigger determines when the referrer receives credit:

| Referral trigger            | How to record it                                                                                                        |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Signup                      | Configure your program to award referral credit on signup, then follow the signup flow for your integration.            |
| Sign Up + Qualifying Action | Configure your program to award referral credit after a qualifying action, such as making a purchase or booking a demo. |

## 4. Unlock and approve rewards

Referral credit counts toward your program's reward goals, and a reward unlocks when the applicable goal is reached. If you offer an [upfront discount](/integrations/stripe.md#upfront-discounts), the referred friend can receive their coupon before completing the qualifying action.

Choose how rewards are approved

* **Manually approve rewards.** Review the participant's activity and pending reward in the dashboard before approving the reward and marking it as fulfilled. You can enable the New Participant Reward email notification to know when a reward is ready for review.
* **Automatically approve rewards.** When a participant unlocks a reward, GrowSurf automatically approves it. You can then manually mark the reward as fulfilled to keep track of which rewards have been issued.
* **Automatically approve & mark as fulfilled.** When a participant unlocks a reward, GrowSurf automatically approves it and marks it as fulfilled.

## 5. Deliver rewards and show participants their progress

Once a reward is approved, GrowSurf issues it using the integration connected to that reward. You can deliver gift cards through [Tango Card](/integrations/tango-card.md) or [Tremendous](/integrations/tremendous.md), coupons or credits through [Stripe](/integrations/stripe.md#coupons-credits), and payouts with [PayPal](/integrations/paypal.md#payouts) or [webhooks](/developer-tools/webhooks.md). Follow the selected integration's setup instructions, including recipient settings and any funding requirements.

Use webhooks when you want your application to handle reward fulfillment. For example, when a participant reaches a goal, your backend can use the [`PARTICIPANT_REACHED_A_GOAL`](/developer-tools/webhooks/events-reference.md#participant_reached_a_goal) event to trigger your own reward logic, such as adding points to a user’s account or creating a reward in your system.&#x20;

After a reward is issued, participants can check their referrals and rewards through the GrowSurf window, the [embedded referral progress](/developer-tools/embeddable-elements.md#embedded-referral-status) or [earned rewards elements](/developer-tools/embeddable-elements.md#embedded-rewards), or your program's referral portal. Add the GrowSurf Window or the embeddable elements to your customer dashboard so participants can easily check their progress and rewards.

## Check the journey before launch

Create a separate development program to test your referral flow before going live. This keeps test participants and integration activity separate from your production program. If you're testing an integration, use its test mode to avoid affecting live data.

| Situation                                     | What to verify                                                                                                                                                                                                                                         |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| A referred friend follows a link and signs up | The new participant is associated with their referrer.                                                                                                                                                                                                 |
| The qualifying action happens later           | If the program requires a qualifying action, the referrer does not receive referral credit when the referred friend signs up. They receive referral credit when the referred friend completes the qualifying action within the referral credit window. |
| A participant reaches a reward goal           | The reward unlocks once the participant reaches the number of referrals needed to earn it.                                                                                                                                                             |
| A reward needs manual approval                | A reward is issued after it has been approved.                                                                                                                                                                                                         |
| A friend receives an upfront discount         | The friend can use the coupon before purchase, while the referrer's reward waits for the qualifying action.                                                                                                                                            |
| A webhook is delivered again                  | If the same webhook event is received more than once, your application should only issue the reward once.                                                                                                                                              |

Review the participant’s activity, progress, and reward details to make sure everything works as expected from the referral link to the reward.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.growsurf.com/getting-started/referral-program-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
