Record an invoice payment
record_paymentUse this when the user says a client paid an invoice, fully or in part, and asks to record or mark it as paid. Records a payment the client made against an issued invoice, through the same path as recording it in Fatura Go (accounting journal, paid status). Two steps: without confirmation_token nothing is recorded and the result is a preview (invoice, amount, date, method, account, remaining after) with a confirmation_token valid 10 minutes for one use; call again with the same arguments and the token only after the user answered (a confirmation sent within 10 seconds of the preview is refused). amount must be above 0 and at most the remaining balance; an overpayment is recorded in Fatura Go, not here. Not for a Shopify order's invoice. The date must not be in a closed accounting period. method is one of bank_transfer, cash, cheque, card, other: cash posts to cash on hand, any other or none to the default bank account. A recorded payment can be undone in the app; there is no undo tool. Do not use it for supplier bill payments or refunds: those are recorded in Fatura Go.
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": {
"amount": "<amount>"
},
"name": "record_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD, the day the money was received. Default today (UAE). | |
| amount | Yes | The amount received, in the invoice currency, above 0, at most 2 decimals. | |
| method | No | One of bank_transfer, cash, cheque, card, other. | |
| currency | No | Optional check: must be the invoice currency. | |
| reference | No | Bank or cheque reference, if the user gave one. | |
| invoice_id | No | From list_invoices or get_invoice. | |
| business_id | No | From list_businesses. May be left out: the invoice is then looked up in every business shared with this connection. | |
| invoice_number | No | Instead of invoice_id. | |
| confirmation_token | No | Leave out on the first call (preview). Pass the token from the preview only after the user confirmed it, with the same other arguments. |