Settle a partner now
Settles everything open for one partner: a statement over the revenue paid before period_end (without it: before the partner's current period) is prepared and issued — number, PDF, e-invoice where due, booked as an incoming document — and with send: true mailed to the partner. Nothing open, or below the partner's minimum, answers commission.nothing_to_settle; the next call settles what accrued since. Requires an Idempotency-Key header: the same key answers the first answer again (Idempotent-Replayed: true), the same key with a different body is refused. Scope partner:commissions:write.
apiKey partner:commissions:writeAuthorizationBearer <ab_…>An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.
Scope: partner:commissions:write
Idempotency-Key*stringYour key for this request — a UUID, for example. The same key with the same body answers with the first answer; with another body it is refused.
1 <= length <= 255AlphaCount-Version?stringThe API version to use. Default: the current one.
application/json- body
POST /commission-statements (with the Idempotency-Key header):
settle a partner now — prepare from everything open, issue, optionally send.
partner*period_end?|nullsend?SendfalseOK
application/json- response
cancelled_by_id*string|nullcancels_statement_id*string|nulldocument_id*string|nulle_invoice_format*string|nullexternal_ref?|Your reference, on a statement you issued yourself and registered here.
gross_cents*Gross Centshas_pdf*Has Pdfhas_xml*Has Xmlid*Idissue_date*|nullkind*Kindself_billing is a Gutschrift (self-billed invoice, VAT law); settlement a statement for a private person; partner_invoice asks the partner to invoice.
"self_billing""settlement""partner_invoice"lines*array<>net_cents*Net Centsnumber*string|nullobjected_at*|nullpaid_at*|nullpartner_id*Partner Idpartner_name*string|nullperiod_end*Period Enddatesend_error?|Set when send was requested on create and the mail failed; the statement exists either way. code is one of commission.partner_email_missing (the partner has no address), commission.no_mailbox (the company has none to send from), commission.send_failed (the mail server refused), commission.statement_not_sendable, or — only in the answer replayed for an Idempotency-Key whose first request never finished — commission.send_not_confirmed.
sent_at*|nullsent_to*string|nullstatus*Status"draft""issued""sent""cancelled""objected"stripe_transfer_ids?array<string>|The Stripe Connect transfers reported as its payment.
tax_note*Tax Note"regular""small_business""reverse_charge""private_person"vat_cents*Vat Centsvat_rate*Vat Ratecurl -X POST 'https://app.alphacount.ai/api/partner/v1/commission-statements' \ -H 'Authorization: Bearer ab_...' \ -H 'Idempotency-Key: 8e0b3c5e-2f7a-4f6e-9a51-0c2d6f0e1a77' \ -H 'Content-Type: application/json' \ -d '{ "partner": { "external_ref": "lernlink", "source": "alphalearn" }, "period_end": "2026-06-01"}'{ "cancelled_by_id": null, "cancels_statement_id": null, "document_id": "00000000-0000-4000-8000-000000000004", "e_invoice_format": "zugferd", "gross_cents": 7140, "has_pdf": true, "has_xml": false, "id": "00000000-0000-4000-8000-000000000001", "issue_date": "2026-10-28", "kind": "self_billing", "lines": [ { "amount_cents": 6000, "basis_cents": 40000, "contract_month": 5, "customer": "Zwölfte Schule", "entry_id": "00000000-0000-4000-8000-000000000003", "paid_at": "2026-05-02", "percent": 15, "service_period_start": "2026-05-01" } ], "net_cents": 6000, "number": "GS-2026-0001", "objected_at": null, "paid_at": null, "partner_id": "00000000-0000-4000-8000-000000000002", "partner_name": "lern.link GmbH", "period_end": "2026-06-01", "send_error": null, "sent_at": null, "sent_to": null, "status": "issued", "tax_note": "regular", "vat_cents": 1140, "vat_rate": 19}