Developers
API-ReferenzRevenue share

Settle a partner now

POST
/commission-statements

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.

Authorization

apiKey partner:commissions:write
headerAuthorizationBearer <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

Header Parameters

Idempotency-Key*string

Your 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.

Length1 <= length <= 255
AlphaCount-Version?string

The API version to use. Default: the current one.

Request Body

application/json
  1. body

POST /commission-statements (with the Idempotency-Key header): settle a partner now — prepare from everything open, issue, optionally send.

partner*
period_end?|null
send?Send
Defaultfalse

Response Body

OK

application/json
  1. response
cancelled_by_id*string|null
cancels_statement_id*string|null
document_id*string|null
e_invoice_format*string|null
external_ref?|

Your reference, on a statement you issued yourself and registered here.

gross_cents*Gross Cents
has_pdf*Has Pdf
has_xml*Has Xml
id*Id
issue_date*|null
kind*Kind

self_billing is a Gutschrift (self-billed invoice, VAT law); settlement a statement for a private person; partner_invoice asks the partner to invoice.

Value in"self_billing""settlement""partner_invoice"
lines*array<>
net_cents*Net Cents
number*string|null
objected_at*|null
paid_at*|null
partner_id*Partner Id
partner_name*string|null
period_end*Period End
Formatdate
send_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*|null
sent_to*string|null
status*Status
Value in"draft""issued""sent""cancelled""objected"
stripe_transfer_ids?array<string>|

The Stripe Connect transfers reported as its payment.

tax_note*Tax Note
Value in"regular""small_business""reverse_charge""private_person"
vat_cents*Vat Cents
vat_rate*Vat Rate
Example Request
curl -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"}'
Example Response
{  "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}