x-api-key).
Endpoints
| Method | Path | Returns |
|---|---|---|
| GET | /referrals/stats | direct, total, by_level[], earned_micro |
| GET | /referrals/tree?depth=2&limit=50 | Nested invite tree, paged |
| GET | /referrals/earnings?limit=100 | Ledger entries with kind = 'referral_reward' |
| GET | /ledger?limit=100 | Full FLOW ledger for the user |
SDK
Pagination
tree and earnings use opaque cursor pagination — pass back next_cursor from the previous response.
Webhooks
Subscribe to thereferral.reward slice via the payment.received event family — see Webhooks.