Native affiliate program, commissions and settlements.
Get the affiliate program settings
GET/affiliate-program
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. The org's referral-program configuration: whether it accepts affiliates and the default commission every affiliate earns. Call this first — the roster's per-affiliate commissionBps is an override that is null whenever this default applies.
Responses
200Get the affiliate program settings.
401Missing, invalid or revoked API key.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliate-program \
--header 'Authorization: Bearer cr_live_…'
{
"data": {
"commissionBps": 0,
"mode": "off"
}
}
Update the affiliate program settings
PATCH/affiliate-program
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. Turn the referral program on or off and set the org-wide default commission. ORG-ADMIN only. Both fields are optional — send just the one you mean. FINANCIAL EFFECT: raising commissionBps raises what the org owes on every FUTURE attributed sale (already-recorded sales keep the rate frozen at their purchase time). Setting mode to off stops all new attribution immediately — existing ?ref links stop earning — but does not erase the roster or any unpaid balance.
Responses
200Update the affiliate program settings.
400Validation failed or the request body is malformed.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliate-program \
--request PATCH \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"commissionBps": 0,
"mode": "off"
}'
{
"data": {
"commissionBps": 0,
"mode": "off"
}
}
List the affiliate roster
GET/affiliates
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. Every affiliate of the org — newest first — with their referral code, status, negotiated rate, and per-currency earnings (pending, paid, reversed). ORG-ADMIN only. This is the source of the id needed by every other Affiliates operation, and the only way to see what the org still owes: earnings[].pendingAmount is the unpaid balance. Paying someone? Keep snapshotAt — it is the cutoff to hand back to settleAffiliate as asOf so only the sales behind the figure you paid get marked paid.
Responses
200List the affiliate roster.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliates \
--header 'Authorization: Bearer cr_live_…'
{
"data": {
"affiliates": [
{
"code": "string",
"commissionBps": 0,
"createdAt": "2026-01-31T12:00:00.000Z",
"earnings": [
{
"currency": "string",
"paidAmount": 0,
"pendingAmount": 0,
"reversedAmount": 0,
"sales": 0
}
],
"email": "learner@example.com",
"id": "string",
"image": "string",
"name": "string",
"status": "pending",
"userId": "string"
}
],
"snapshotAt": "2026-01-31T12:00:00.000Z"
}
}
Approve or unblock an affiliate
POST/affiliates/{id}/approve
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. Sets the affiliate to active, so their ?ref links start attributing sales and earning commission. Use it both for a pending applicant (programs in approval mode) and to UNBLOCK someone previously blocked. ORG-ADMIN only. Idempotent — approving an already active affiliate changes nothing. Past sales are never re-attributed.
Path parameters
idstring
The affiliate id, from listAffiliates.
Responses
200Approve or unblock an affiliate.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliates/{id}/approve \
--request POST \
--header 'Authorization: Bearer cr_live_…'
{
"data": {
"id": "string",
"status": "string"
}
}
Block an affiliate
POST/affiliates/{id}/block
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. Sets the affiliate to blocked: their ?ref links stop attributing NEW sales immediately. History is kept — already-attributed sales and any unpaid balance survive, so settle up (settleAffiliate) before or after blocking if you still owe them. ORG-ADMIN only. Reversible with approveAffiliate.
Path parameters
idstring
The affiliate id, from listAffiliates.
Responses
200Block an affiliate.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliates/{id}/block \
--request POST \
--header 'Authorization: Bearer cr_live_…'
{
"data": {
"id": "string",
"status": "string"
}
}
Set or clear an affiliate's negotiated commission
PUT/affiliates/{id}/commission
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. Overrides the program default for ONE affiliate. ORG-ADMIN only. FINANCIAL EFFECT: this rate is what FUTURE attributed sales will owe this person — sales already recorded keep the rate frozen onto them and are not recalculated. Send {"commissionBps": null} to REMOVE the override and fall back to the program default from getAffiliateProgram. The value is in basis points, not percent.
Path parameters
idstring
The affiliate id, from listAffiliates.
Request body
commissionBpsinteger | nullrequired
Responses
200Set or clear an affiliate's negotiated commission.
400Validation failed or the request body is malformed.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliates/{id}/commission \
--request PUT \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"commissionBps": 0
}'
{
"data": {
"commissionBps": 0,
"id": "string"
}
}
Mark an affiliate's outstanding commissions as paid
POST/affiliates/{id}/settle
SYSTEM — Cursare's NATIVE affiliate program: affiliates sign up on the org's own Cursare storefront, Cursare attributes the ?ref= sale at checkout and holds the running balance the org owes them, and the org approves, blocks and settles people through these operations. This is the platform's only affiliate system; no external affiliate tracker is connected. Records a payout: every unsettled commission of this affiliate is MARKED PAID and its pendingAmount drops to zero. ORG-ADMIN only. IRREVERSIBLE — there is no unsettle operation, and a wrong call makes the org's books claim money was handed over when it was not. This only BOOKKEEPS: Cursare moves no money, the org pays the affiliate outside the platform (transfer, Pix, etc.). Only call it after the payment has actually been sent. Refunded and canceled sales are skipped. asOf bounds the stamp to sales recorded at or before that instant, so a sale landing between the moment you read the pending figure and this call is NOT silently marked paid: call listAffiliates, pay the pendingAmount you read there, then send that same response's snapshotAt back here as asOf. Never invent the value from a local clock — it drifts from the clock that timestamps sales. Omitting it settles everything outstanding right now, which also settles anything that landed while you were paying.
Path parameters
idstring
The affiliate id, from listAffiliates.
Request body
asOfdate-time
Only settle commissions from sales recorded at or before this ISO date-time. Use the snapshotAt returned by the listAffiliates call whose pendingAmount you actually paid — not a client-generated timestamp. Defaults to now (the database clock).
Responses
200Mark an affiliate's outstanding commissions as paid.
400Validation failed or the request body is malformed.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/affiliates/{id}/settle \
--request POST \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"asOf": "2026-01-31T12:00:00.000Z"
}'
{
"data": {
"asOf": "2026-01-31T12:00:00.000Z",
"id": "string",
"settled": [
{
"amount": 0,
"currency": "string"
}
]
}
}