Record payment
Record a payment received on an invoice.
MCP tool ifirma_write → record_payment
write Confirm
Adds a payment to one invoice. The amount cannot be more than what is still owed on it. For a foreign-currency invoice or a cash-method invoice, the payment date is required. iFirma then shows the invoice as paid or partly paid. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices. |
| amount number required | number | Amount received, at most the amount still owed. |
| date string | string | YYYY-MM-DD the money arrived. Required for foreign-currency and cash-method invoices. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ifirma_write",
"arguments": {
"operation": "record_payment",
"arguments": {
"invoice_id": 1,
"amount": 1
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"invoice_id": 7020104,
"amount": 800,
"remaining": 0,
"status": "paid"
},
"isError": false
}