Record a prepayment
Records a customer's deposit before there is an invoice, like Xero's prepayments; it waits as their credit, with its VAT owed at once.
$0.01 a call
From your agent’s balance. A call that fails costs nothing.
An example
Hotel Elbblick paid a 3,570 euro deposit on the dishwasher today, VAT included.
Your agent callsinvoices_record_prepayment$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.
{
"customer": {
"name": "Hotel Elbblick GmbH",
"email": "einkauf@elbblick.example"
},
"amount": "3570.00",
"tax_rate": 19,
"method": "bank_transfer",
"reference": "Deposit, dishwasher DW-500"
}Use it when
A customer paid ahead: a deposit on an order, an advance on a project.
- For money toward an invoice already sent, use
invoices_record_payment.
What it does
Record money a customer paid before there is an invoice, like a deposit, as Xero's prepayments: it waits as their credit (CR-0001 on) until invoices_use_credit puts it on their invoice or pays it back. With tax_rate it carries its VAT, owed when the money came in (as the EU has it for advance payments); using it on the invoice takes that VAT back off, so the sale's VAT counts once. With books kept it is posted at once: the bank against Customer prepayments (2400, made when missing) and the tax owed.
What comes back
credit: its number, the amount, its VAT, what is left, the customer and the entry that booked it. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
customerRequired | object | Who paid: a CRM contact or company, or a name and email. |
customer.contact_id | integer | A CRM contact; fills the name and email. At least 1. |
customer.company_id | integer | A CRM company; fills the name. At least 1. |
customer.name | string | Who is billed, as printed. Up to 200 characters. |
customer.email | string | Where the document is emailed. Up to 254 characters. |
customer.address | string | Postal address, one line per row. Up to 1,000 characters. |
customer.tax_id | string | The customer's VAT or tax number, for business customers. A reverse-charge or intra-EU invoice needs their EU VAT ID, e.g. "FR12345678901". Up to 60 characters. |
customer.country | string | ISO 3166-1 code of the customer's country, e.g. "FR". Checks intra_eu and export invoices; e-invoices need it. Up to 2 characters. |
amountRequired | number or string | What they paid, tax included, e.g. "3570.00". Up to 24 characters. |
currency | string | ISO 4217, e.g. "USD", "EUR" or "JPY". Matches ^[A-Za-z]{3}$. |
date | string | When it came in. Default today. Matches ^\d{4}-\d{2}-\d{2}$. |
method | string | One of: bank_transfer,card,cash,check,online,other. Default: bank_transfer. |
reference | string | Up to 120 characters. |
note | string | Up to 500 characters. |
tax_rate | number | The VAT in it, in percent, e.g. 19. Default none. 0 to 100. |
The call
Over MCP, call invoices_record_prepayment on https://api.conecto.chat/mcp/invoices. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/invoices_record_prepayment \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"customer":{"name":"Hotel Elbblick GmbH","email":"einkauf@elbblick.example"},"amount":"3570.00","tax_rate":19,"method":"bank_transfer","reference":"Deposit, dishwasher DW-500"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | The customer's contact_id or company_id is not in the business's CRM. | Find the record with crm_search, or give a name and email instead. |
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. |
invalid_input400 | The amount is 0 or not a number in the currency, the date is in the future, or the customer has no name. | Fix what the message names. |
limit_reached409 | The account has 5,000 open credits. | Use or pay back some first. |
in_progress409 | Another credit took the number at the same moment. | Call again. |
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