Create a payout
Opens a commission payout for one partner and one period, so your finance stack can assemble a payout end to end over the API. The payout is created empty by default: attach lines with POST /commission-lines using the returned payout id, then render the statement with POST /api/v1/payouts//statement. Set attachPendingLines to pull in the partner’s pending lines for the period instead, the way creating a payout in the app does. Every payout belongs to a batch: pass batchId to put this partner on an existing run alongside others, or leave it out and the payout gets a batch of its own. Either way the id comes back on the payout as batchId. Answers 200 instead of 201 when the partner already had a payout on that batch, returning the one they have.
Authorizations
Introw API key shown once when the credential is created.
Body
Introw partner the payout is for.
1Start of the commission period the payout covers.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$End of the commission period the payout covers. Must be on or after periodStart.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Existing batch to open this payout on, so several partners share one payout run. The batch is one period by definition, so it dates the payout and periodStart/periodEnd are ignored. When omitted, the payout gets a batch of its own. A partner already on the batch returns their existing payout instead of a second one.
1Stage to open the payout in. Defaults to DRAFT, which is where the app creates one.
DRAFT, PENDING_REVIEW, PENDING_INVOICE, APPROVED, SCHEDULED, PENDING_PAYMENT, PAID, DECLINED, POSTPONED, BLOCKED, FAILED Partner purchase order number.
Free-text block printed on the commission statement PDF, below the commission table.
2000Attach the partner's pending commission lines whose period overlaps this one, the way creating a payout in the app does. Defaults to false, so the payout opens empty and you attach lines yourself with POST /commission-lines.
Response
Payout created successfully.