Demo docs: examples are illustrative.
Referral API

API overview

Conventions shared by every Referral API endpoint.

The REST API uses JSON request and response bodies, standard HTTP status codes, and bearer authentication.

EnvironmentBase URL
Livehttps://api.referralapi.example/v1
Testhttps://sandbox.referralapi.example/v1

Money

Amounts are integers in the smallest currency unit. 4900 in usd means $49.00.

Pagination

List endpoints return up to limit items and a next_cursor. Pass it as cursor to get the next page.

let cursor: string | undefined;
do {
  const page = await client.referrals.list({ limit: 100, cursor });
  for (const referral of page.data) handle(referral);
  cursor = page.nextCursor ?? undefined;
} while (cursor);

Idempotency

Send an Idempotency-Key header with any POST request. If the same key is sent again within 24 hours, you get the original response instead of a duplicate.

Rate limits

Each key can make 100 requests per second in live mode. When you go over, you get a 429 with a Retry-After header.

How is this guide?