Referrals
7 operations in the WP Waterfall API.
- getThe company's Affiliate Program application
- postApply to the Affiliate Program
- getThe partner's commission by month
- getThe company's referrals
- postClaim a referral code saved in the browser
- getThe company's referral link
- getReferral sign-ups, paying customers, and credit
The company's Affiliate Program application
get/affiliate/applicationPermalink to The company's Affiliate Program application
- Scope:
billing:read - Permission:
billing.read
The state of the company's application (none, applied, approved, declined, or ended), what it sent, the terms version it accepted, the reason of a decline, and the program numbers: 10% of the profit, the 30 day hold, and the $50 minimum for a bank transfer. agency_partner is true for a company in the Agency Partner Program, which earns the same commission and does not apply.
Responses
| Status | Body | Description |
|---|---|---|
200 | AffiliateApplication | The application |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
state required | string | None, applied (waiting for staff), approved, declined, or ended. One of: none, applied, approved, declined, ended. |
agency_partner required | boolean | True when the company is in the Agency Partner Program: it earns the same commission already and does not apply. |
website_url required | string or null | The website or channel the application named. Null before an application. |
promotion required | string or null | How the applicant said it will promote WP Waterfall. Null before an application. |
applied_at required | string or null (date-time) | When the latest application was sent. |
decided_at required | string or null (date-time) | When staff approved or declined it. Null while it waits. |
decline_reason required | string or null | Why staff declined it. Null unless declined. |
terms_version required | string or null | The terms version accepted. Null before an application. |
terms_accepted_at required | string or null (date-time) | When the applicant accepted the terms. Null before an application. |
current_terms_version required | string | The version an application accepts today. |
commission_percent required | number | The commission share, in percent of the profit: 10. |
hold_days required | integer | Days an entry waits for refunds before it is earned. Range: 0 to any. |
min_transfer_cents required | integer | The least a bank transfer pays, in cents. Range: 0 to any. |
Apply to the Affiliate Program
post/affiliate/applicationPermalink to Apply to the Affiliate Program
- Permission:
billing.write - Dashboard session only, no API key
Signed-in session only. Sends the website or channel, how you will promote WP Waterfall, and your acceptance of the Affiliate Program Terms (terms_version must be the current one). Staff review it and you hear back by email. A company may apply when it never did, or after a decline or an end; a second application while one waits is refused with 409.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, AffiliateApplyRequest
Fields
| Name | Type | Description |
|---|---|---|
website_url required | string (uri) | The website or channel where you will share your link. |
promotion required | string | How you will promote WP Waterfall, in a few sentences. |
accept_terms required | boolean | True: you accept the Affiliate Program Terms. |
terms_version required | string | The terms version the page showed. It must be the current one. |
Responses
| Status | Body | Description |
|---|---|---|
201 | AffiliateApplication | The application |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
201 response fields
| Name | Type | Description |
|---|---|---|
state required | string | None, applied (waiting for staff), approved, declined, or ended. One of: none, applied, approved, declined, ended. |
agency_partner required | boolean | True when the company is in the Agency Partner Program: it earns the same commission already and does not apply. |
website_url required | string or null | The website or channel the application named. Null before an application. |
promotion required | string or null | How the applicant said it will promote WP Waterfall. Null before an application. |
applied_at required | string or null (date-time) | When the latest application was sent. |
decided_at required | string or null (date-time) | When staff approved or declined it. Null while it waits. |
decline_reason required | string or null | Why staff declined it. Null unless declined. |
terms_version required | string or null | The terms version accepted. Null before an application. |
terms_accepted_at required | string or null (date-time) | When the applicant accepted the terms. Null before an application. |
current_terms_version required | string | The version an application accepts today. |
commission_percent required | number | The commission share, in percent of the profit: 10. |
hold_days required | integer | Days an entry waits for refunds before it is earned. Range: 0 to any. |
min_transfer_cents required | integer | The least a bank transfer pays, in cents. Range: 0 to any. |
The partner's commission by month
get/partner/commissionsPermalink to The partner's commission by month
- Scope:
billing:read - Permission:
billing.read
For a company in the Agency Partner Program: 10% of the profit WP Waterfall makes on each paid invoice of a customer who signed up through the company's link. One row per month and state (pending for the 30 day refund window, earned, paid, or void), with a count of the customers who paid, and the totals. It names no customer and no invoice. A company that is not a partner reads partner false and empty totals.
Responses
| Status | Body | Description |
|---|---|---|
200 | PartnerCommissions | The commission by month |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
partner required | boolean | False when the company is not a partner or an approved affiliate. The rest is then empty. |
kind required | string or null | Agency or affiliate. Null when not a partner. One of: agency, affiliate. |
customers required | integer | Customers who signed up through the partner's link after it joined. Range: 0 to any. |
currency required | string | The currency of every amount here, as a lower case ISO code: usd. |
commission_percent required | number | The commission share, in percent: 10. |
hold_days required | integer | Days an entry waits for refunds before it is earned. Range: 0 to any. |
payout required | string or null | How earned commission is paid: account credit, or by hand as arranged. Null when not a partner. One of: credit, manual. |
totals required | object | The commission so far, by state, in cents. |
totals.pending_cents required | integer | Still inside the hold that waits for refunds. Range: 0 to any. |
totals.earned_cents required | integer | Past the hold and not paid yet. Range: 0 to any. |
totals.paid_cents required | integer | Paid, as account credit or by hand. Range: 0 to any. |
months required | array of object | One row per month and state, the newest month first. |
months[].month required | string | The month the referred customers paid, as 2026-11. |
months[].customers required | integer | How many referred customers paid in that month, for this state. Range: 0 to any. |
months[].commission_cents required | integer | The commission of that month and state, in cents. Range: 0 to any. |
months[].status required | string | Pending (inside the hold), earned, paid, or void (the invoice was refunded). One of: pending, earned, paid, void. |
The company's referrals
get/referralsPermalink to The company's referrals
- Scope:
billing:read - Permission:
billing.read
One row per friend who signed up, newest first, with a status: signed_up, converted, rewarded, expired, or rejected. The friend's address is masked, as a***@gmail.com. A rejected referral names the reason.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | One of: signed_up, converted, rewarded, expired, rejected. |
limit | query | integer | How many rows to return in one page: at most 200, and 50 when left out. Default: 50. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ReferralList | Referrals |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | The rows of this page. |
data[].id required | string (uuid) | |
data[].status required | string | One of: signed_up, converted, rewarded, expired, rejected. |
data[].who required | string or null | For example a***@gmail.com. |
data[].date required | string (date-time) | When the friend signed up. |
data[].reward_cents required | integer | Range: 0 to any. |
data[].currency required | string | |
data[].reward_eligible_at required | string or null (date-time) | When a converted referral's reward is paid. |
data[].rejected_reason required | string or null | One of: same_email, same_card, same_network, same_account, too_many_signups, refunded, chargeback, annual_cap, voided_by_staff, partner_customer. |
next_cursor required | string or null | Send it as cursor to get the next page. Null on the last page. |
Claim a referral code saved in the browser
post/referrals/claimPermalink to Claim a referral code saved in the browser
- Permission:
company.read - Dashboard session only, no API key
For a new account whose referral cookie did not arrive. The dashboard sends the code it saved when the visitor first followed a link. It counts only for a company the caller owns, made in the last 7 days and after the visit, with no referral yet. The same fraud rules apply. Answers claimed false, with 200, for anything else, so it never says why.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, ReferralClaimRequest
Fields
| Name | Type | Description |
|---|---|---|
code required | string | |
visited_at | string (date-time) | When the visit happened, from the browser. Never later than now. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ReferralClaimResult | Whether the referral was recorded |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
claimed required | boolean |
The company's referral link
get/referrals/linkPermalink to The company's referral link
- Scope:
billing:read - Permission:
billing.read
Every company has one referral link, made the first time this is read (or by the migration for older companies). Share the url: a friend who opens it, signs up, and pays gets account credit, and so does this company once the hold ends. Also returns the program numbers: the reward share and its limits, the new customer's credit, the hold in days, the yearly cap, and the cookie window.
Responses
| Status | Body | Description |
|---|---|---|
200 | ReferralLink | The link and the program numbers |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
code required | string | |
url required | string (uri) | The link to share, for example https://wpwaterfall.com/r/k7m2x9ab. |
program required | object | |
program.currency required | string | |
program.referrer_percent required | number | What the person who shares earns, as a share of the friend's first paid month. |
program.referrer_min_cents required | integer | Range: 0 to any. |
program.referrer_max_cents required | integer | Range: 0 to any. |
program.referee_credit_cents required | integer | What the new customer gets once, as account credit. Range: 0 to any. |
program.hold_days required | integer | Days after the friend's first payment before the reward is paid. Range: 0 to any. |
program.annual_cap_cents required | integer | The most one company earns in any 12 months. Range: 0 to any. |
program.cookie_days required | integer |
Referral sign-ups, paying customers, and credit
get/referrals/statsPermalink to Referral sign-ups, paying customers, and credit
- Scope:
billing:read - Permission:
billing.read
Sign-ups are new accounts the link brought in. Paying customers are referrals that made a first payment. Credit earned is already in the account balance; credit pending waits for the hold to end.
Responses
| Status | Body | Description |
|---|---|---|
200 | ReferralStats | The numbers |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
signups required | integer | Range: 0 to any. |
paying_customers required | integer | Range: 0 to any. |
rewarded required | integer | Range: 0 to any. |
currency required | string | |
credit_earned_cents required | integer | Credit already added to the account balance. Range: 0 to any. |
credit_pending_cents required | integer | Credit waiting for the hold to end. Range: 0 to any. |