add_payment_to_invoice
Record a payment against a validated Dolibarr invoice. Supports partial or full amounts, sets payment date and mode, and optionally closes the invoice when fully paid.
Instructions
Enregistrer un paiement (règlement) sur une facture validée
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": {
"id": "<id>",
"datepaye": "<datepaye>",
"payment_mode_id": "<payment_mode_id>"
},
"name": "add_payment_to_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID de la facture | |
| amount | No | Montant payé (si partiel, sinon total TTC) | |
| comment | No | Commentaire/référence du paiement (ex: N° virement) | |
| datepaye | Yes | Date du paiement ISO 8601 (ex: '2025-01-31') | |
| accountid | No | ID compte bancaire pour enregistrement (utiliser list_bank_accounts) | |
| payment_mode_id | Yes | ID du mode de paiement (utiliser list_payment_methods) | |
| closepaidinvoices | No | "yes" pour fermer la facture si totalement payée (défaut: yes) |