Record a payment
Records money received against a sent invoice, or a refund; the invoice becomes partially paid or paid.
$0.01 a call
From your agent’s balance. A call that fails costs nothing.
An example
Hotel Elbblick transferred 6,000 euros toward invoice INV-0042 today, reference RE-0042.
Your agent callsinvoices_record_payment$0.01 a call
The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.
{
"invoice_id": "2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f",
"amount": "6000.00",
"method": "bank_transfer",
"reference": "RE-0042"
}Use it when
A customer paid by transfer, card or cash, or money went back to them.
- For money back because goods came back or the price was wrong, use
invoices_create_credit_note. - For a deposit before there is an invoice, use
invoices_record_prepayment.
What it does
Record money received against a sent invoice: amount, date, method and reference. It becomes partially_paid, or paid when nothing is left. A payment can't be more than the balance, unless keep_excess keeps the rest as the customer's credit (an overpayment, like Xero's, for invoices_use_credit); a negative amount records a refund. When the account keeps books, it is posted to them.
What comes back
invoice: the document with its new status, amount paid and balance; payment: the payment as recorded. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
invoice_idRequired | string | The invoice_id invoices_create returned (quotes and credit notes have one too). Exactly 36 characters. |
amountRequired | number or string | In the invoice's currency, e.g. "250.00". Negative for a refund. Up to 24 characters. |
date | string | When it was paid. Default today. Matches ^\d{4}-\d{2}-\d{2}$. |
method | string | One of: bank_transfer,card,cash,check,online,other. Default: other. |
reference | string | e.g. the bank transfer reference or the payment id. Up to 120 characters. |
note | string | Up to 500 characters. |
keep_excess | boolean | Paid more than the balance: keep the rest as the customer's credit. Default: false. |
The call
Over MCP, call invoices_record_payment on https://api.conecto.chat/mcp/invoices. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/invoices_record_payment \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"invoice_id":"2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f","amount":"6000.00","method":"bank_transfer","reference":"RE-0042"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No quote or invoice of the business has that invoice_id. | Find it with invoices_list and use its invoice_id. |
not_an_invoice400 | The id is a quote or a credit note. | Turn a quote into an invoice with invoices_convert_quote; a credit note records money back when it is issued. |
not_sent409 | The invoice is still a draft. | Send it with invoices_send first. |
void409 | The invoice is void. | Payments go on invoices that are not void. |
already_paid409 | The invoice is paid in full. | Nothing more can be recorded, except a refund. |
more_than_balance409 | The amount is more than the balance. | Record at most the balance, or keep the rest as the customer's credit with keep_excess. |
more_than_paid409 | The refund is more than what was paid. | Refund at most what was paid. |
invalid_input400 | The amount is 0 or not a number in the invoice's currency, or the date is in the future. | Send an amount like "250.00" and a date that has passed. |
no_rate409 | There is no exchange rate for the invoice's currency on that day. | Set a standing rate with books_setup rates. |
rates_loading503 | The day's exchange rates are still loading. | Try again in a few minutes. |
before_start409 | The date is before the books start. | Use a later date, or set an earlier start with books_setup. |
period_locked409 | The books are locked for that date. | Use a later date, or unlock the period with books_lock. |
no_role409 | The books have no account for a role the posting needs. | Give an account that role with books_save_accounts. |
More Invoices tools
All 24 tools- Set the business details
invoices_set_profileSets the business details on quotes and invoices: name, country, address, tax ID, logo, terms, tax, numbering, how to pay and legal notes.$0.001 a call - Get the business details
invoices_get_profileThe business details on quotes and invoices, the next numbers, and what is missing before documents can be sent.Free* - Connect Stripe for invoices
invoices_connect_stripeConnects the business's own Stripe account with a restricted key, so invoices can be paid online; the money goes straight to the business.$0.001 a call - Create a quote or invoice
invoices_createCreates a draft quote or invoice: the customer, the lines, the currency and the dates.$0.01 a call - Change a draft
invoices_updateChanges a draft quote or invoice; customer and lines replace the old ones.$0.01 a call - Send a quote or invoice
invoices_sendSends a draft: it gets the next number, its PDF is made, and the customer is emailed a link to view, pay or accept it.$0.10 a call - Get a quote or invoice
invoices_getOne quote or invoice in full, by invoice_id or number: lines, totals, taxes, payments, history, its page and a fresh PDF link.Free* - List quotes and invoices
invoices_listQuotes and invoices, newest first, by kind, status (also overdue, unpaid and expired), customer and issue date.Free*
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md