The flow
1
billings.create fires
Debbie calls your webhook endpoint with a
billingId.2
Fetch the deposit distribution
GET /billings/{billingId}/deposit-distribution — every payment in the
settlement, and how each was split between you and your collection partner.3
Fetch the billing vouchers
GET /billings/{billingId}/billing-vouchers — the fees (honorarer) and
disbursements (udlæg) you are charged.4
Post it
Revenue, commission, fees, disbursements, overpayments and the net amount.
1. The webhook
X-Verification-Token header, acknowledge with 200, and do the
fetching asynchronously. A webhook of yours only ever carries your own
creditor’s events. See Webhooks for
delivery and retry behaviour, and
Create webhook to subscribe.
If you would rather not run a webhook receiver at all, the settlement is also
in the creditor portal, and the billingId is all these endpoints need.
2. The deposit distribution
Reading it
customer.referenceIdis your customer number andcaseVouchers[].referenceIdis your invoice number — the values you sent in. This is what makes the settlement postable: each amount lands on the invoice it paid.depositCaseVoucher.amountis the payment.caseVouchersis what it was distributed to, and those amounts plusoverpaymentadd up to it.overpaymentis the part that exceeded the debt. It is owed back to the debtor, not to you, and needs its own account.
source is what tells you what is already in your books
Every entry carries source:
CREDITOR— you imposed it. The invoice, the reminder fee, the compensation fee you sent at handover, and the direct payments you registered yourself. You already have these postings, so a distribution to them is money against a receivable you already carry.COLLECTOR— your debt collection partner imposed it. Collection fees, court fees, interest calculated during collection. These do not exist in your system until this settlement puts them there.
Direct payments
By default the payments you registered yourself are not in the distribution, and the commission charged on them shows up as a separate fee among the billing vouchers instead. Add?includeDepositsWithSourceCreditor=true to have them
reported here, with their commission as part of the distribution.
Paging
The response isitems plus meta, 25 payments per page by default. Page with
page and pageSize until a page returns fewer items than pageSize; there is
no total count. See Pagination.
API reference: Get deposit distribution
See GET Get deposit
distribution for full
details.
3. The billing vouchers
collectionCommission, so booking both endpoints counts nothing twice — and
misses nothing.
categoryis eitherfee— your collection partner’s own charge, a honorar — ordisbursement, an outlay they paid on your behalf, an udlæg. They are usually posted to different accounts, and can be fetched separately with?category=["fee"]or?category=["disbursement"](JSON encoded, as on Debbie’s other list filters). Both are returned when it is omitted.amountexcludes VAT, andvatcarries the VAT charged on the entry.labelis what the line is called, in the language of the settlement.caseIdandcaseSequentialIdtie the charge to a case where there is one; a charge that is not case specific has them null.depositCaseVoucheris the payment that triggered the charge, where there is one. Commission on a direct payment you registered yourself appears here, withdepositCaseVoucher.sourceset toCREDITOR— that is where it goes when you did not passincludeDepositsWithSourceCreditor=trueon the distribution.- The response is paged the same way as the distribution.
API reference: Get billing vouchers
See GET Get billing
vouchers for full
details.
4. Posting it
Once you have both halves, a settlement decomposes into:
What is left is the net: paid out to you when the settlement is in your favour,
invoiced to you when it is not.
Scopes
Both endpoints requireread:billings on the API key. A key only ever reaches
its own creditor’s settlements.