> 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/affiliate-program-workflow.md).

# Affiliate Program Workflow

Follow a sale from an affiliate's link through commission, review, and payout to what the affiliate sees.

GrowSurf tracks the customers your affiliates bring in, works out what each affiliate earns, and pays them for you. This guide walks through those steps using Stripe for sales and PayPal or Wise for payouts.

![How a sale moves from the affiliate's link to a payout](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LeklWo0yn03AhWro2Ux%2Fuploads%2Fgit-blob-594b18d214cc536e852c48b182611c38e842d1dc%2Faffiliate-program-workflow-diagram.svg?alt=media)

Before inviting an affiliate, set your commission terms, including what counts as a sale, the commission rate, the hold period for refunds and chargebacks, and the minimum payout.

## 1. Give each affiliate their link

Install the [GrowSurf Universal Code](/getting-started.md) on your website. Affiliates get their referral link from their affiliate portal, or you can display it in your product using [embeddable elements](/developer-tools/embeddable-elements.md).

If your signup flow doesn't add participants automatically, add the referred customer using the [JavaScript SDK](/developer-tools/javascript-sdk.md) or [REST API](/developer-tools/rest-api.md).

{% tabs %}
{% tab title="Affiliate widget" %}
{% embed url="<https://www.youtube.com/watch?v=uAtRI489PGY>" %}
{% endtab %}

{% tab title="Hosted affiliate portal" %}
{% embed url="<https://www.youtube.com/watch?v=QtWxjNCsNHw>" %}
{% endtab %}

{% tab title="Embeddable elements" %}
{% embed url="<https://www.youtube.com/watch?v=1UY89l0mVUw>" %}
{% endtab %}
{% endtabs %}

## 2. Credit the sale to the affiliate

Connect [Stripe](/integrations/stripe.md#for-affiliate-programs), [Chargebee](/integrations/chargebee.md#for-affiliate-programs), or [Recurly](/integrations/recurly.md#for-affiliate-programs) in the Program Editor. GrowSurf detects payments and calculates affiliate commissions based on your program's commission settings. If you're using another payment system, record the sale through the [Record Affiliate Transaction](/developer-tools/rest-api/api-reference.md#post-campaign-id-participant-participantidoremail-transaction) endpoint.

When GrowSurf creates a commission, it triggers the `NEW_COMMISSION_ADDED` webhook, if enabled.

## 3. Let refunds settle, then approve commissions

Use the commission hold period to allow time for refunds and chargebacks. GrowSurf adjusts commissions when supported refund or chargeback events are received from the payment integration. Check the participant's activity log and commission details if an amount differs from what you expect.

If you're using your own sales integration, your application must report supported sales and adjustment events through the API.

Commissions can be `PENDING`, `APPROVED`, `PAID`, or `REVERSED`. After the hold period, eligible commissions are approved and become available for payout. Commission adjustments can trigger the `COMMISSION_ADJUSTED` webhook.

## 4. Pay affiliates who are due

Connect [PayPal](https://docs.growsurf.com/integrations/paypal#for-affiliate-programs) or [Wise](https://docs.growsurf.com/integrations/wise#for-affiliate-programs) and follow that provider's setup instructions.

In the Payouts page, review the affiliates, amounts, destination details, and fees before confirming a payout. GrowSurf automatically aggregates each affiliate's approved commissions into a payout when their total meets your minimum payout threshold. Pending commissions do not count toward the threshold.

With Wise, GrowSurf creates the payout batch in your Wise account. Fund the batch in Wise to send the payouts. GrowSurf keeps the payouts pending until Wise reports that the transfers are complete.

After submission, check the payout status in GrowSurf. The `NEW_PAYOUT_ISSUED` webhook reports an issued payout.

## 5. Let affiliates see their earnings

Affiliates can check their commissions and payouts in the affiliate portal. You can also embed an [affiliate summary](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-affiliate-summary), [commissions](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-commissions), or [payouts](https://docs.growsurf.com/developer-tools/embeddable-elements#embedded-payouts) table in your product

For your own reporting, subscribe to these [webhook events](/developer-tools/webhooks/events-reference.md):

| Event                  | What it records                      |
| ---------------------- | ------------------------------------ |
| `NEW_COMMISSION_ADDED` | A commission was generated.          |
| `COMMISSION_ADJUSTED`  | An existing commission was adjusted. |
| `NEW_PAYOUT_ISSUED`    | A payout was issued.                 |

Webhook delivery can be retried. Follow the [webhook setup and retry guidance](/developer-tools/webhooks.md), and make your receiver safe to process repeated deliveries.

## Check these cases before launch or migration

| Situation                                    | What to verify                                                                                                                                                                |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A sale happens days after signup             | The customer still has the correct affiliate relationship when the sale occurs.                                                                                               |
| A subscription renews                        | The configured commission terms cover the renewal, and the renewal is associated with the same customer.                                                                      |
| More than one program could claim a sale     | Define which program receives credit and verify that your integration follows that rule. Do not assume that the same sale will automatically be excluded from other programs. |
| Operations and finance need different access | Check the available team permissions against the actions each person needs before rollout.                                                                                    |

Create a separate development program to test your affiliate setup before going live. Use your payment integration’s test mode to test affiliate tracking and commission calculations. After testing, use your production program for your affiliates.


---

# 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/affiliate-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.
