> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gameball.co/llms.txt
> Use this file to discover all available pages before exploring further.

# How Do I Track Referrals with Gameball POS (v4)?

> Track customer referrals at your POS system

Referral tracking rewards customers for bringing new shoppers to your store. When a new customer makes their first purchase and mentions a referrer, you include the referrer's code in the order, and Gameball rewards both parties based on your configured campaign rules.

> [!NOTE]
>
> Referral tracking is optional. If you don't run a referral program, you can skip this page.

## How It Works

Referrals are handled through the [order submission](https://docs.gameball.co/installation-guides/v4/pos/track-orders.md) flow. On the new customer's **first** purchase, add a `referrerCode` to the order payload:

```bash cURL theme={null}
curl -X POST 'https://api.gameball.co/api/v4.0/integrations/orders' \
  -H 'Content-Type: application/json' \
  -H 'APIKey: YOUR_API_KEY' \
  -H 'SecretKey: YOUR_SECRET_KEY' \
  -d '{
    "customerId": "mobile_966500001234",
    "orderId": "POS_987654323",
    "orderDate": "2025-09-29T15:20:00Z",
    "totalPaid": 250,
    "totalPrice": 250,
    "referrerCode": "REF123456"
  }'
```

## Referral Flow

**1. Identify the new customer**

Register the new customer with the [Create Customer](https://docs.gameball.co/installation-guides/v4/pos/customer-management.md) call (or let the order auto-create them).

**2. Collect the referrer code**

Capture the referrer's code at checkout, entered manually by staff or scanned from a QR code.

**3. Submit the order with the referrer**

Include `referrerCode` in the order payload on the customer's first purchase.

**4. Gameball issues the rewards**

Referral rewards are processed automatically based on your configured campaign rules.

## Tips & Gotchas

* Referral rewards are configured in your Gameball dashboard.
* Both the referrer and the new customer may receive rewards, depending on your campaign settings.
* Referral tracking must occur during the new customer's **first** purchase.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.