Sevdesk book payment
sevdesk_book_paymentBook the payment for a document's voucher in sevDesk, attaching the bank transaction so the voucher settles to 0 open and shows as fully paid. This is the LAST step of the round trip: run it after sevdesk_push_documents has created the voucher and match_invoice_transaction has linked the payment. Without it the voucher stays open in sevDesk even though the payment is linked in Book-AI-ze. Reads the amount and date from the linked bank transaction rather than taking them on trust, and verifies the result by reading the voucher back. REFUSES a voucher that is ALREADY on status 1000: sevDesk does not replace a payment, it stacks a second one, and the result is a double payment on a settled voucher. The check reads sevDesk, not the local status — which is the point, because a local status can be stale. Pass reset_first:true to take the old payment back and book once. The dry run reports voucher_now, so the voucher's real state is visible before anything is written.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>"
},
"name": "sevdesk_book_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Override the amount to book. Rarely needed: the linked transaction's own amount is used by default, which is correct for a full payment including any FX difference. Pass a positive number; the direction is derived from the transaction. | |
| dry_run | No | Default TRUE. Resolves the voucher, transaction and bank account and reports exactly what would be sent, without writing. Pass false to really book it. | |
| document_id | Yes | The document whose voucher should be marked paid. Must already have a sevdesk_id. | |
| reset_first | No | Reset the voucher to open before booking (PUT /resetToOpen). Use this to correct a previous wrong booking — booking again without it stacks a second payment on top. Default false. | |
| transaction_id | No | Which transaction paid it. Optional — defaults to the one already linked to the document, which is what match_invoice_transaction wrote. |