Record payment
create_paymentRecord a customer payment and optionally apply it to a specific invoice to reduce the balance.
Instructions
Record a payment received from a customer, optionally applied against a specific invoice. Use it once the money has actually arrived, after confirming the invoice Id with get_invoice or search_invoices. Write operation with real accounting effect: it posts cash against the customer and reduces the linked invoice balance. Not idempotent, so a repeated call records a second payment. Supplying invoice_id links the whole total_amount to that invoice; omitting it leaves an unapplied credit on the customer.
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": {
"payment": "<payment>"
},
"name": "create_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payment | Yes | Payment to record: the customer Id, the total received, and optionally the invoice it settles. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| payment | No |