affiliates

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

GET /v1/affiliates/program #

The partner program of this environment

One program per environment, so the sandbox and live have their own. 404 with the key affiliate.program.not_set before one is set.

Responses

StatusMeaningBody
200OKAffiliateProgram
404Error envelopeError
Example response
{
  "status": "draft",
  "commission_kind": "percent_bps",
  "commission_value": "string",
  "currency": "string",
  "commission_term": "first_invoices",
  "commission_term_value": 1,
  "attribution_window_days": 30,
  "hold_days": 0,
  "min_payout_minor": "string",
  "referred_coupon_code": "string",
  "daily_click_cap": 1000,
  "landing_url": "string",
  "auto_approve": false,
  "create_time": "2026-11-03T10:15:00Z",
  "update_time": "2026-11-03T10:15:00Z"
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/program \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

PUT /v1/affiliates/program #

Set the rules of the partner program

Replaces the program. A change applies to commissions earned from then on, never to those already earned. A commission is a share of the net, pre-tax amount of a paid invoice (percent_bps) or a fixed amount in one currency (fixed, earned only on invoices in that currency).

Request body

FieldTypeDescription
statusdraft | active | pausedpaused and draft earn nothing and turn the links off
commission_kind requiredpercent_bps | fixed
commission_value requiredstringBasis points of the net, pre-tax amount paid (1000 is 10 %), or minor units of currency for fixed
currencystringOnly for fixed; a percentage follows the currency of each invoice
commission_termfirst_invoices | months | lifetime
commission_term_valueintegerN invoices or N months; absent for lifetime
attribution_window_daysinteger
hold_daysintegerHow long a commission waits (the refund window) before it can be paid
min_payout_minorstring · int64
referred_coupon_codestringCoupon a referred customer gets on their next checkout
daily_click_capinteger
landing_urlstringWhere /r/<code> sends the visitor; empty shows a plain page. A public http(s) address: a host name (not an IP address, localhost or a name without a dot), no user name or password
auto_approvebooleanA partner who applies is active at once
create_timestring · date-time
update_timestring · date-time
Example
{
  "commission_kind": "percent_bps",
  "commission_value": "string"
}

Responses

StatusMeaningBody
200OKAffiliateProgram
400Error envelopeError
404Error envelopeError
Example response
{
  "status": "draft",
  "commission_kind": "percent_bps",
  "commission_value": "string",
  "currency": "string",
  "commission_term": "first_invoices",
  "commission_term_value": 1,
  "attribution_window_days": 30,
  "hold_days": 0,
  "min_payout_minor": "string",
  "referred_coupon_code": "string",
  "daily_click_cap": 1000,
  "landing_url": "string",
  "auto_approve": false,
  "create_time": "2026-11-03T10:15:00Z",
  "update_time": "2026-11-03T10:15:00Z"
}
curl
curl -X PUT https://YOUR-API-ADDRESS/v1/affiliates/program \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"commission_kind":"percent_bps","commission_value":"string"}'

GET /v1/affiliates #

Partners, newest first

Parameters

NameInTypeDescription
statusquerypending | active | suspended
searchquerystringPart of the code, e-mail address or name
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListAffiliatesResponse
400Error envelopeError
Example response
{
  "affiliates": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "code": "string",
      "email": "string",
      "name": "string",
      "status": "pending",
      "payout_method": "manual",
      "payout_details": "string",
      "source": "owner",
      "signed_in": false,
      "clicks": "string",
      "referrals": "string",
      "approve_time": "2026-11-03T10:15:00Z",
      "create_time": "2026-11-03T10:15:00Z",
      "link": "string"
    }
  ],
  "next_page_token": "string",
  "total": 1
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

POST /v1/affiliates #

Add a partner

The code (3 to 32 letters, numbers, - or _) is unique across the whole platform because the public link /r/ carries no tenant; leave it out for a random one. A partner you add is active unless you ask for pending.

Request body

FieldTypeDescription
email requiredstring · email
namestring
codestring
payout_methodmanual | bank_transfer
payout_detailsstring
pendingboolean
Example
{
  "email": "string"
}

Responses

StatusMeaningBody
201CreatedAffiliate
400Error envelopeError
409Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "code": "string",
  "email": "string",
  "name": "string",
  "status": "pending",
  "payout_method": "manual",
  "payout_details": "string",
  "source": "owner",
  "signed_in": false,
  "clicks": "string",
  "referrals": "string",
  "approve_time": "2026-11-03T10:15:00Z",
  "create_time": "2026-11-03T10:15:00Z",
  "link": "string"
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/affiliates \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"string"}'

GET /v1/affiliates/referrals #

The customers partners brought, newest first

The customer's e-mail address is masked (j***@example.com).

Parameters

NameInTypeDescription
affiliate_idquerystring · uuidOnly this partner's
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListAffiliateReferralsResponse
400Error envelopeError
Example response
{
  "referrals": [
    {
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_code": "string",
      "customer_external_id": "string",
      "customer_email_masked": "string",
      "source": "link",
      "attribute_time": "2026-11-03T10:15:00Z"
    }
  ],
  "next_page_token": "string",
  "total": 1
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/referrals \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/affiliates/commissions #

Commissions and the reversal rows that net against them, newest first

One commission per paid invoice of a customer a partner brought, in the invoice's currency, on the net, pre-tax amount paid. It is pending for the program's hold (the refund window), then approved, then paid by a payout. A refund, void or credit note takes it back (reversed_minor); one already paid is netted by a negative row of kind reversal that the next payout takes.

Parameters

NameInTypeDescription
affiliate_idquerystring · uuid
statusquerypending | approved | paid | reversed
kindquerycommission | reversal
invoice_idquerystring · uuid
payout_idquerystring · uuid
fromquerystring · date-timeEarned at or after
toquerystring · date-timeEarned before
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListAffiliateCommissionsResponse
400Error envelopeError
Example response
{
  "commissions": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_code": "string",
      "customer_external_id": "string",
      "kind": "commission",
      "invoice_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "invoice_number": "string",
      "currency": "string",
      "invoice_total_minor": "string",
      "net_minor": "string",
      "amount_minor": "string",
      "reversed_minor": "string",
      "status": "pending",
      "parent_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "earn_time": "2026-11-03T10:15:00Z",
      "approve_after_time": "2026-11-03T10:15:00Z",
      "approve_time": "2026-11-03T10:15:00Z",
      "pay_time": "2026-11-03T10:15:00Z",
      "payout_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e"
    }
  ],
  "next_page_token": "string",
  "total": 1
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/commissions \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

POST /v1/affiliates/commissions/reverse #

Take a commission back for a chargeback, or by hand

Refunds, voids and credit notes reverse on their own. The same (invoice, reason, reference) takes back once. A commission that was paid is netted from the partner's next payout.

Request body

FieldTypeDescription
invoice_id requiredstring · uuid
reason requiredchargeback | manual
referencestringNames this reversal; required for manual
amount_minorstring · int64How much to take back; 0 or absent is all that is left
notestring
Example
{
  "invoice_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "reason": "chargeback"
}

Responses

StatusMeaningBody
200OKReverseAffiliateCommissionResponse
400Error envelopeError
404Error envelopeError
Example response
{
  "reversed_minor": "string",
  "commission": {
    "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
    "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
    "affiliate_code": "string",
    "customer_external_id": "string",
    "kind": "commission",
    "invoice_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
    "invoice_number": "string",
    "currency": "string",
    "invoice_total_minor": "string",
    "net_minor": "string",
    "amount_minor": "string",
    "reversed_minor": "string",
    "status": "pending",
    "parent_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
    "earn_time": "2026-11-03T10:15:00Z",
    "approve_after_time": "2026-11-03T10:15:00Z",
    "approve_time": "2026-11-03T10:15:00Z",
    "pay_time": "2026-11-03T10:15:00Z",
    "payout_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e"
  }
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/affiliates/commissions/reverse \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"invoice_id":"0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e","reason":"chargeback"}'

GET /v1/affiliates/balances #

What each partner has, per currency

pending (in the hold), approved (available for a payout, net of reversals), paid (paid out, net of what was netted) and reversed (taken back in all). Currencies are never added together.

Parameters

NameInTypeDescription
affiliate_idquerystring · uuid

Responses

StatusMeaningBody
200OKGetAffiliateBalancesResponse
400Error envelopeError
Example response
{
  "balances": [
    {
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "currency": "string",
      "pending_minor": "string",
      "approved_minor": "string",
      "paid_minor": "string",
      "reversed_minor": "string"
    }
  ]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/balances \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/affiliates/funnel #

Clicks, referred customers, paying customers and commissions over a period

Parameters

NameInTypeDescription
fromquerystring · dateFirst day, UTC; default 30 days before to
toquerystring · dateLast day, UTC; default today
affiliate_idquerystring · uuid

Responses

StatusMeaningBody
200OKAffiliateFunnel
400Error envelopeError
Example response
{
  "from_date": "string",
  "to_date": "string",
  "clicks": "string",
  "referrals": "string",
  "paying_customers": "string",
  "commissions": [
    {
      "currency": "string",
      "earned_minor": "string",
      "reversed_minor": "string"
    }
  ]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/funnel \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/affiliates/payouts #

Payouts to partners, newest first

A payout is the approved commissions of one partner in one currency (no conversion), with the negative rows that net earlier payments taken back. An open payout is worth what its commissions are worth now.

Parameters

NameInTypeDescription
affiliate_idquerystring · uuid
statusqueryopen | paid | cancelled
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListAffiliatePayoutsResponse
400Error envelopeError
Example response
{
  "payouts": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_code": "string",
      "currency": "string",
      "total_minor": "string",
      "commission_count": 1,
      "method": "manual",
      "payout_details": "string",
      "reference": "string",
      "status": "open",
      "fake": false,
      "create_time": "2026-11-03T10:15:00Z",
      "pay_time": "2026-11-03T10:15:00Z",
      "cancel_time": "2026-11-03T10:15:00Z"
    }
  ],
  "next_page_token": "string",
  "total": 1
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/payouts \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

POST /v1/affiliates/payouts #

Batch the approved commissions into open payouts

For one partner or for every active partner, one payout per currency. A batch below the program's minimum payout, or not above zero, is skipped and reported; what is approved later joins a payout that is still open. A suspended partner is not paid; their balance is kept. A live environment that is not active pays nobody (affiliate.payout.tenant_not_active).

Request body

FieldTypeDescription
affiliate_idstring · uuid
currencystring
Example
{}

Responses

StatusMeaningBody
201CreatedCreateAffiliatePayoutsResponse
400Error envelopeError
404Error envelopeError
409Error envelopeError
Example response
{
  "payouts": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_code": "string",
      "currency": "string",
      "total_minor": "string",
      "commission_count": 1,
      "method": "manual",
      "payout_details": "string",
      "reference": "string",
      "status": "open",
      "fake": false,
      "create_time": "2026-11-03T10:15:00Z",
      "pay_time": "2026-11-03T10:15:00Z",
      "cancel_time": "2026-11-03T10:15:00Z"
    }
  ],
  "skipped": [
    {
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "currency": "string",
      "total_minor": "string",
      "reason": "below_minimum"
    }
  ]
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/affiliates/payouts \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /v1/affiliates/payouts/{id}/pay #

Record that you paid a payout, and post it

Payrudder moves no money: pay by hand or bank transfer, then say so. The commissions become paid and the journal gets the commission expense against the payable, and the payable against cash, balanced in the payout's currency. Doing it again changes nothing. In the sandbox the payout is fake and its postings say so.

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Request body

FieldTypeDescription
referencestringYour note, e.g. the bank transfer reference
Example
{}

Responses

StatusMeaningBody
200OKAffiliatePayout
404Error envelopeError
409Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "affiliate_code": "string",
  "currency": "string",
  "total_minor": "string",
  "commission_count": 1,
  "method": "manual",
  "payout_details": "string",
  "reference": "string",
  "status": "open",
  "fake": false,
  "create_time": "2026-11-03T10:15:00Z",
  "pay_time": "2026-11-03T10:15:00Z",
  "cancel_time": "2026-11-03T10:15:00Z"
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/affiliates/payouts/<id>/pay \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /v1/affiliates/payouts/{id}/cancel #

Drop an open payout

Its commissions go back to being payable in another payout.

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Responses

StatusMeaningBody
200OKAffiliatePayout
404Error envelopeError
409Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "affiliate_code": "string",
  "currency": "string",
  "total_minor": "string",
  "commission_count": 1,
  "method": "manual",
  "payout_details": "string",
  "reference": "string",
  "status": "open",
  "fake": false,
  "create_time": "2026-11-03T10:15:00Z",
  "pay_time": "2026-11-03T10:15:00Z",
  "cancel_time": "2026-11-03T10:15:00Z"
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/affiliates/payouts/<id>/cancel \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/affiliates/journal #

The postings of paid payouts, with debit and credit totals per currency

totals cover the whole filter, not only the page. The books balance when debits equal credits in every currency; the database refuses to commit postings that do not.

Parameters

NameInTypeDescription
payout_idquerystring · uuid
currencyquerystring
fromquerystring · date-time
toquerystring · date-time
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListAffiliateJournalResponse
400Error envelopeError
Example response
{
  "entries": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "payout_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "affiliate_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "post_time": "2026-11-03T10:15:00Z",
      "currency": "string",
      "account": "commission_expense",
      "debit_minor": "string",
      "credit_minor": "string",
      "memo": "string",
      "fake": false
    }
  ],
  "totals": [
    {
      "currency": "string",
      "debit_minor": "string",
      "credit_minor": "string"
    }
  ],
  "next_page_token": "string",
  "total": 1
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/journal \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/affiliates/journal.csv #

The same postings as a CSV file, with a total line per currency

Parameters

NameInTypeDescription
payout_idquerystring · uuid
currencyquerystring
fromquerystring · date-time
toquerystring · date-time

Responses

StatusMeaningBody
200OK
400Error envelopeError
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/journal.csv \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/affiliates/{id} #

One partner with their click and referral counts

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Responses

StatusMeaningBody
200OKAffiliate
404Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "code": "string",
  "email": "string",
  "name": "string",
  "status": "pending",
  "payout_method": "manual",
  "payout_details": "string",
  "source": "owner",
  "signed_in": false,
  "clicks": "string",
  "referrals": "string",
  "approve_time": "2026-11-03T10:15:00Z",
  "create_time": "2026-11-03T10:15:00Z",
  "link": "string"
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/affiliates/<id> \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

PATCH /v1/affiliates/{id} #

Change a partner's name, payout details or status

status active approves a pending partner or reinstates a suspended one; suspended stops new attributions and commissions but keeps what was approved. Nothing returns to pending.

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Request body

FieldTypeDescription
namestring
payout_methodmanual | bank_transfer
payout_detailsstring
statusactive | suspended
Example
{}

Responses

StatusMeaningBody
200OKAffiliate
400Error envelopeError
404Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "code": "string",
  "email": "string",
  "name": "string",
  "status": "pending",
  "payout_method": "manual",
  "payout_details": "string",
  "source": "owner",
  "signed_in": false,
  "clicks": "string",
  "referrals": "string",
  "approve_time": "2026-11-03T10:15:00Z",
  "create_time": "2026-11-03T10:15:00Z",
  "link": "string"
}
curl
curl -X PATCH https://YOUR-API-ADDRESS/v1/affiliates/<id> \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

PUT /v1/affiliates/{id}/promotion-code #

Make a promotion code the partner's

A customer who redeems the code at a checkout is attributed to the partner, as if they had followed the link.

Parameters

NameInTypeDescription
id requiredpathstring · uuid

Request body

FieldTypeDescription
promotion_code requiredstring
Example
{
  "promotion_code": "string"
}

Responses

StatusMeaningBody
200OKAffiliate
404Error envelopeError
Example response
{
  "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
  "code": "string",
  "email": "string",
  "name": "string",
  "status": "pending",
  "payout_method": "manual",
  "payout_details": "string",
  "source": "owner",
  "signed_in": false,
  "clicks": "string",
  "referrals": "string",
  "approve_time": "2026-11-03T10:15:00Z",
  "create_time": "2026-11-03T10:15:00Z",
  "link": "string"
}
curl
curl -X PUT https://YOUR-API-ADDRESS/v1/affiliates/<id>/promotion-code \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"promotion_code":"string"}'

Models

Affiliate

FieldTypeDescription
id requiredstring · uuid
code requiredstring
email requiredstring
name requiredstring
status requiredpending | active | suspended
payout_method requiredmanual | bank_transfer
payout_details requiredstring
source requiredowner | application
signed_in requiredbooleanThe partner has signed in and claimed this affiliate
clicks requiredstring · int64
referrals requiredstring · int64
approve_time requiredstring · date-time
create_time requiredstring · date-time
link requiredstringThe partner's public referral link, https://<gateway>/r/<code>

AffiliateBalance

FieldTypeDescription
affiliate_id requiredstring · uuid
currency requiredstring
pending_minor requiredstring · int64
approved_minor requiredstring · int64
paid_minor requiredstring · int64
reversed_minor requiredstring · int64

AffiliateCommission

FieldTypeDescription
id requiredstring · uuid
affiliate_id requiredstring · uuid
affiliate_code requiredstring
customer_external_id requiredstring
kind requiredcommission | reversal
invoice_id requiredstring · uuid
invoice_number requiredstring
currency requiredstring
invoice_total_minor requiredstring · int64What the invoice came to, tax included
net_minor requiredstring · int64The base: the net, pre-tax amount actually paid
amount_minor requiredstring · int64The commission; negative on a reversal row
reversed_minor requiredstringHow much of the commission has been taken back, format: int64
status requiredpending | approved | paid | reversed
parent_id requiredstring · uuid
earn_time requiredstring · date-time
approve_after_time requiredstring · date-time
approve_time requiredstring · date-time
pay_time requiredstring · date-time
payout_id requiredstring · uuid

AffiliateFunnel

FieldTypeDescription
from_date requiredstring · date
to_date requiredstring · date
clicks requiredstring · int64
referrals requiredstringCustomers attributed in the period, format: int64
paying_customers requiredstringCustomers with a commission earned in the period, format: int64
commissions requiredarray of object

AffiliateJournalEntry

FieldTypeDescription
id requiredstring · uuid
payout_id requiredstring · uuid
affiliate_id requiredstring · uuid
post_time requiredstring · date-time
currency requiredstring
account requiredcommission_expense | commissions_payable | cash
debit_minor requiredstring · int64
credit_minor requiredstring · int64
memo requiredstring
fake requiredboolean

AffiliatePayout

FieldTypeDescription
id requiredstring · uuid
affiliate_id requiredstring · uuid
affiliate_code requiredstring
currency requiredstring
total_minor requiredstring · int64Open: what its commissions are worth now. Paid: what was paid
commission_count requiredinteger
method requiredmanual | bank_transfer
payout_details requiredstring
reference requiredstring
status requiredopen | paid | cancelled
fake requiredbooleanA payout of a sandbox environment: nothing was or will be paid
create_time requiredstring · date-time
pay_time requiredstring · date-time
cancel_time requiredstring · date-time

AffiliateProgram

FieldTypeDescription
status requireddraft | active | pausedpaused and draft earn nothing and turn the links off
commission_kind requiredpercent_bps | fixed
commission_value requiredstring · int64Basis points of the net, pre-tax amount paid (1000 is 10 %), or minor units of currency for fixed
currency requiredstringOnly for fixed; a percentage follows the currency of each invoice
commission_term requiredfirst_invoices | months | lifetime
commission_term_value requiredintegerN invoices or N months; absent for lifetime
attribution_window_days requiredinteger
hold_days requiredintegerHow long a commission waits (the refund window) before it can be paid
min_payout_minor requiredstring · int64
referred_coupon_code requiredstringCoupon a referred customer gets on their next checkout
daily_click_cap requiredinteger
landing_url requiredstringWhere /r/<code> sends the visitor; empty shows a plain page. A public http(s) address: a host name (not an IP address, localhost or a name without a dot), no user name or password
auto_approve requiredbooleanA partner who applies is active at once
create_time requiredstring · date-time
update_time requiredstring · date-time

AffiliateProgramInput

FieldTypeDescription
statusdraft | active | pausedpaused and draft earn nothing and turn the links off
commission_kind requiredpercent_bps | fixed
commission_value requiredstringBasis points of the net, pre-tax amount paid (1000 is 10 %), or minor units of currency for fixed
currencystringOnly for fixed; a percentage follows the currency of each invoice
commission_termfirst_invoices | months | lifetime
commission_term_valueintegerN invoices or N months; absent for lifetime
attribution_window_daysinteger
hold_daysintegerHow long a commission waits (the refund window) before it can be paid
min_payout_minorstring · int64
referred_coupon_codestringCoupon a referred customer gets on their next checkout
daily_click_capinteger
landing_urlstringWhere /r/<code> sends the visitor; empty shows a plain page. A public http(s) address: a host name (not an IP address, localhost or a name without a dot), no user name or password
auto_approvebooleanA partner who applies is active at once
create_timestring · date-time
update_timestring · date-time

AffiliateReferral

FieldTypeDescription
affiliate_id requiredstring · uuid
affiliate_code requiredstring
customer_external_id requiredstring
customer_email_masked requiredstring
source requiredlink | code | api
attribute_time requiredstring · date-time

CreateAffiliatePayoutsRequest

FieldTypeDescription
affiliate_idstring · uuid
currencystring

CreateAffiliatePayoutsResponse

FieldTypeDescription
payouts requiredarray of AffiliatePayout
skipped requiredarray of CreateAffiliatePayoutsSkipped

CreateAffiliatePayoutsSkipped

FieldTypeDescription
affiliate_id requiredstring · uuid
currency requiredstring
total_minor requiredstring · int64
reason requiredbelow_minimum | not_positive

CreateAffiliateRequest

FieldTypeDescription
email requiredstring · email
namestring
codestring
payout_methodmanual | bank_transfer
payout_detailsstring
pendingboolean

Error

FieldTypeDescription
error requiredobject

GetAffiliateBalancesResponse

FieldTypeDescription
balances requiredarray of AffiliateBalance

LinkAffiliatePromotionCodeRequest

FieldTypeDescription
promotion_code requiredstring

ListAffiliateCommissionsResponse

FieldTypeDescription
commissions requiredarray of AffiliateCommission
next_page_token requiredstring
total requiredinteger

ListAffiliateJournalResponse

FieldTypeDescription
entries requiredarray of AffiliateJournalEntry
totals requiredarray of ListAffiliateJournalTotal
next_page_token requiredstring
total requiredinteger

ListAffiliateJournalTotal

FieldTypeDescription
currency requiredstring
debit_minor requiredstring · int64
credit_minor requiredstring · int64

ListAffiliatePayoutsResponse

FieldTypeDescription
payouts requiredarray of AffiliatePayout
next_page_token requiredstring
total requiredinteger

ListAffiliateReferralsResponse

FieldTypeDescription
referrals requiredarray of AffiliateReferral
next_page_token requiredstring
total requiredinteger

ListAffiliatesResponse

FieldTypeDescription
affiliates requiredarray of Affiliate
next_page_token requiredstring
total requiredinteger

MarkAffiliatePayoutPaidRequest

FieldTypeDescription
referencestringYour note, e.g. the bank transfer reference

ReverseAffiliateCommissionRequest

FieldTypeDescription
invoice_id requiredstring · uuid
reason requiredchargeback | manual
referencestringNames this reversal; required for manual
amount_minorstring · int64How much to take back; 0 or absent is all that is left
notestring

ReverseAffiliateCommissionResponse

FieldTypeDescription
reversed_minor requiredstring · int64How much this call took back; 0 on a repeat
commission requiredany

UpdateAffiliateRequest

FieldTypeDescription
namestring
payout_methodmanual | bank_transfer
payout_detailsstring
statusactive | suspended