> 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)

You bring the affiliates. Set your commission terms before you invite them: what counts as a sale, the commission rate, the hold period, and the payout minimum.

## 1. Give each affiliate their own link

Install the [GrowSurf Universal Code](/getting-started.md) on your website. Affiliates get their referral link from their affiliate portal. You can also show it inside your own product with [embeddable elements](/developer-tools/embeddable-elements.md).

Keep the referral relationship when a visitor becomes a customer. If your signup flow does not add participants automatically, add the referred customer through the JavaScript SDK or REST API. Use the customer's email consistently with your payment integration.

If your marketing site, signup flow, and checkout use different domains, verify attribution across that exact journey. For Stripe-hosted Checkout, Payment Links, Buy Buttons, and Pricing Tables, follow the [Stripe tracking instructions](https://docs.growsurf.com/integrations/stripe#for-affiliate-programs). A server-created Checkout Session needs the referrer ID in `client_reference_id`.

## 2. Credit the sale to the affiliate

Connect Stripe in the Program Editor to detect supported payments and calculate affiliate commissions. Your commission settings determine whether the affiliate earns a flat amount or a percentage, and whether eligible later payments also earn a commission.

For a conversion your billing integration cannot detect, use the [REST API](/developer-tools/rest-api.md) from your server. Your application must decide when the business event qualifies, such as a completed onboarding milestone. GrowSurf cannot infer that event from a page visit.

When a commission is generated, GrowSurf can send the `NEW_COMMISSION_ADDED` webhook. The event is a commission record, not confirmation that the affiliate has been paid.

## 3. Let refunds settle, then approve commissions

Use the commission hold period to allow time for refunds or chargebacks. With the Stripe integration, supported refund and chargeback events adjust the commission. Check the participant's activity log and commission details when an amount differs from what you expect.

For a custom sales integration, your application must report the supported sales and adjustment events through the API. Connecting a payout provider does not give GrowSurf access to an unrelated billing system.

Commissions can be `PENDING`, `APPROVED`, `PAID`, or `REVERSED`. An approved commission is eligible for payout processing; it is not a completed payout. A commission adjustment can emit `COMMISSION_ADJUSTED`. See the [event reference](/developer-tools/webhooks/events-reference.md) for the payload and status fields.

## 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), then follow that provider's setup instructions. Wise payouts are available for affiliate programs.

In the Payouts page, review the affiliates, amounts, destination details, and fees before confirming a payout. The affiliate must meet the program's payout requirements, including the minimum approved balance and required destination information. Pending commissions do not count toward the approved balance.

Check the payout's recorded status after submission. The `NEW_PAYOUT_ISSUED` webhook reports an issued payout; use the provider's records to investigate delivery questions. A commission reversal is not proof that money already sent to an affiliate has been recovered.

## 5. Let affiliates see their earnings

Affiliates check their commissions and payouts in their affiliate portal. You can also embed the [commission and payout tables](/developer-tools/embeddable-elements.md) 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 boundaries before launch or migration

| Situation                                    | What to verify                                                                                                                                                                            |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A conversion happens days after signup       | The customer still has the correct referral relationship when the qualifying event arrives.                                                                                               |
| A subscription renews                        | The configured commission terms cover the renewal, and the payment integration identifies the same customer.                                                                              |
| You move an existing affiliate program       | Agree on the cutoff date, attribution mapping, recurring terms, and treatment of unpaid balances before importing. A participant import alone does not prove those records were migrated. |
| More than one channel claims a sale          | Define which program receives credit and verify that rule with your integration. Do not assume cross-program deduplication.                                                               |
| Operations and finance need different access | Check the available team permissions against the actions each person needs before rollout.                                                                                                |

Use a separate development program and the payment integration's test mode to verify tracking and commission calculations. Review the full journey before you invite affiliates to the production program.


---

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