Record a payment received on a customer invoice
dolibarr_invoice_record_paymentRecords a customer invoice payment in Dolibarr by booking the full remaining amount due, returning a preview unless confirmed; no money is transferred.
Instructions
Records in Dolibarr that the customer paid an invoice. It books the whole amount still due; it moves no money. This step cannot simply be undone: without confirm=true it only returns a preview.
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": {
"invoice_id": "<invoice_id>",
"date": "<date>",
"payment_mode_id": "<payment_mode_id>",
"bank_account_id": "<bank_account_id>"
},
"name": "dolibarr_invoice_record_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date of the payment (YYYY-MM-DD). | |
| reason | No | One line on why, kept in the audit log. Required when confirm is true. | |
| comment | No | ||
| confirm | No | false (default) = change nothing, only show what would happen. true = do it. Set true only after the user has explicitly agreed to this exact step. | |
| invoice_id | Yes | ||
| close_invoice | No | Mark the invoice as paid when the payment covers it. | |
| bank_account_id | Yes | Bank account id, from dolibarr_api_get /bankaccounts. Needed when the Bank module is enabled. | |
| payment_mode_id | Yes | Payment type id, from dolibarr_dictionary payment_types. | |
| payment_reference | No | Cheque or transfer number. |