---
name: "invoices_record_payment"
area: "invoices"
title: "Record a payment"
price: "$0.01"
method: "POST"
url: "https://api.conecto.chat/v1/tools/invoices_record_payment"
mcp_server: "https://api.conecto.chat/mcp/invoices"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/invoices/invoices_record_payment"
---

# Record a payment (`invoices_record_payment`)

Records money received against a sent invoice, or a refund; the invoice becomes partially paid or paid.

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.

Price: $0.01 a call. A call that fails costs nothing.

## 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](https://conecto.chat/tools/invoices/invoices_create_credit_note.md).
- For a deposit before there is an invoice, use [invoices_record_prepayment](https://conecto.chat/tools/invoices/invoices_record_prepayment.md).

## Say this to your agent

> Hotel Elbblick transferred 6,000 euros toward invoice INV-0042 today, reference RE-0042.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `invoice_id` | string | yes | The invoice_id invoices_create returned (quotes and credit notes have one too). Exactly 36 characters. |  |  |
| `amount` | number or string | yes | In the invoice's currency, e.g. "250.00". Negative for a refund. Up to 24 characters. |  |  |
| `date` | string | no | When it was paid. Default today. Matches ^\\d{4}-\\d{2}-\\d{2}$. |  |  |
| `method` | string | no |  | `"bank_transfer"`, `"card"`, `"cash"`, `"check"`, `"online"`, `"other"` | `"other"` |
| `reference` | string | no | e.g. the bank transfer reference or the payment id. Up to 120 characters. |  |  |
| `note` | string | no | Up to 500 characters. |  |  |
| `keep_excess` | boolean | no | Paid more than the balance: keep the rest as the customer's credit. |  | `false` |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `invoices_record_payment` on the MCP server `https://api.conecto.chat/mcp/invoices` with these arguments:

```json
{
  "invoice_id": "2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f",
  "amount": "6000.00",
  "method": "bank_transfer",
  "reference": "RE-0042"
}
```

REST:

```bash
curl 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"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "invoices_record_payment",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.01",
  "balance_usd": "$19.75",
  "result": {
    "invoice": {
      "invoice_id": "2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f",
      "kind": "invoice",
      "number": "INV-0042",
      "status": "partially_paid",
      "currency": "EUR",
      "issue_date": "2026-10-14",
      "due_date": "2026-10-28",
      "overdue": false,
      "days_overdue": 0,
      "customer": {
        "contact_id": null,
        "company_id": null,
        "name": "Hotel Elbblick GmbH",
        "email": "lukas.meyer@hotel-elbblick.example",
        "address": "Elbchaussee 120\n22763 Hamburg",
        "tax_id": "",
        "country": null
      },
      "total": "13887.30",
      "total_formatted": "€13,887.30",
      "amount_paid": "6000.00",
      "balance": "7887.30",
      "balance_formatted": "€7,887.30",
      "public_url": "https://cncto.co/i/z0YW4TSWlxT-bnbJvqs3SjStKE0kz4ky",
      "created_at": "2026-10-14T08:00:00+00:00",
      "sent_at": "2026-10-14T08:00:00+00:00",
      "credited": "0.00",
      "items": [
        {
          "description": "Bistro chair, beech\nStackable, for terraces",
          "quantity": "40",
          "unit_price": "320",
          "tax_rate": "19",
          "discount_percent": "10",
          "amount": "12800.00",
          "discount": "1280.00",
          "tax": "2188.80",
          "total": "13708.80"
        },
        {
          "description": "Delivery and setup",
          "quantity": "1",
          "unit_price": "150",
          "tax_rate": "19",
          "discount_percent": "0",
          "amount": "150.00",
          "discount": "0.00",
          "tax": "28.50",
          "total": "178.50"
        }
      ],
      "totals": {
        "subtotal": "12950.00",
        "subtotal_formatted": "€12,950.00",
        "discount": "1280.00",
        "discount_formatted": "€1,280.00",
        "tax": "2217.30",
        "tax_formatted": "€2,217.30",
        "total": "13887.30",
        "total_formatted": "€13,887.30",
        "credited": "0.00",
        "credited_formatted": "€0.00",
        "amount_paid": "6000.00",
        "amount_paid_formatted": "€6,000.00",
        "balance": "7887.30",
        "balance_formatted": "€7,887.30",
        "taxes": [
          {
            "rate": "19",
            "base": "11670.00",
            "amount": "2217.30",
            "amount_formatted": "€2,217.30"
          }
        ]
      },
      "supply": {
        "label": "Date of supply",
        "text": "October 14, 2026",
        "from": "2026-10-14",
        "until": "2026-10-14"
      },
      "tax_exemption": null,
      "tax_note": null,
      "vat_exchange_rate": null,
      "national_vat": null,
      "e_invoice": null,
      "notes": "",
      "payment_link": null,
      "business": {
        "name": "Hansen & Voss GmbH",
        "address": "Billbrookdeich 112\n22113 Hamburg\nGermany",
        "tax_id": "DE123456789",
        "email": "billing@hansenvoss.example",
        "phone": "+49 40 66969 100",
        "logo_file_id": "",
        "footer": "Please pay by bank transfer to Hansen & Voss GmbH\nIBAN DE89 3704 0044 0532 0130 00, BIC COBADEFFXXX",
        "tax_label": "VAT",
        "paper": "a4",
        "country": "DE",
        "legal_notes": "Hansen & Voss GmbH, Amtsgericht Hamburg HRB 123456\nManaging directors: Clara Hansen, Henrik Voss",
        "document_language": ""
      },
      "pdf": {
        "file_id": "8506d546-cf7e-4729-b619-dc28a816ffff",
        "name": "Invoice INV-0042.pdf",
        "content_type": "application/pdf",
        "size": "582 bytes",
        "size_bytes": 582,
        "sha256": "7a628ee1199dd863f0236a61a39b6729a977b4ea18a669e9930a57280cb2326e",
        "created_at": "2026-10-14T08:00:00+00:00",
        "download_url": "https://cncto.co/d/8506d546-cf7e-4729-b619-dc28a816ffff?t=eyJmIjoiODUwNmQ1NDYtY2Y3ZS00NzI5LWI2MTktZGMyOGE4MTZmZmZmIiwiZXhwIjoxNzkyMTYwODk3fQ:1xHMRN:7YBDRvq66SZ823JBQv2T3k_bEHE9Ih69-5tPA-bcuC8",
        "link_expires_in_hours": 24
      },
      "payments": [
        {
          "payment_id": 4101,
          "amount": "6000.00",
          "amount_formatted": "€6,000.00",
          "date": "2026-10-14",
          "method": "bank_transfer",
          "reference": "RE-0042",
          "note": "",
          "recorded_at": "2026-10-14T08:00:00+00:00"
        }
      ],
      "quote_id": null,
      "credit_notes": [],
      "viewed_at": null,
      "accepted_at": null,
      "declined_at": null,
      "paid_at": null,
      "voided_at": null,
      "void_reason": null,
      "last_emailed_at": "2026-10-14T08:00:00+00:00",
      "reminders_sent": 0,
      "history": [
        {
          "at": "2026-10-14T08:00:00+00:00",
          "event": "created",
          "detail": "",
          "by": "key 4101 (Pip)"
        },
        {
          "at": "2026-10-14T08:00:00+00:00",
          "event": "sent",
          "detail": "INV-0042",
          "by": "key 4101 (Pip)"
        }
      ]
    },
    "payment": {
      "payment_id": 4101,
      "amount": "6000.00",
      "amount_formatted": "€6,000.00",
      "date": "2026-10-14",
      "method": "bank_transfer",
      "reference": "RE-0042",
      "note": "",
      "recorded_at": "2026-10-14T08:00:00+00:00"
    }
  }
}
```

`result`: invoice: the document with its new status, amount paid and balance; payment: the payment as recorded.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No quote or invoice of the business has that invoice_id. | Find it with invoices_list and use its invoice_id. |
| `not_an_invoice` | 400 | 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_sent` | 409 | The invoice is still a draft. | Send it with invoices_send first. |
| `void` | 409 | The invoice is void. | Payments go on invoices that are not void. |
| `already_paid` | 409 | The invoice is paid in full. | Nothing more can be recorded, except a refund. |
| `more_than_balance` | 409 | 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_paid` | 409 | The refund is more than what was paid. | Refund at most what was paid. |
| `invalid_input` | 400 | 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_rate` | 409 | There is no exchange rate for the invoice's currency on that day. | Set a standing rate with books_setup rates. |
| `rates_loading` | 503 | The day's exchange rates are still loading. | Try again in a few minutes. |
| `before_start` | 409 | The date is before the books start. | Use a later date, or set an earlier start with books_setup. |
| `period_locked` | 409 | The books are locked for that date. | Use a later date, or unlock the period with books_lock. |
| `no_role` | 409 | The books have no account for a role the posting needs. | Give an account that role with books_save_accounts. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [invoices_set_profile](https://conecto.chat/tools/invoices/invoices_set_profile.md): Sets 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.
- [invoices_get_profile](https://conecto.chat/tools/invoices/invoices_get_profile.md): The business details on quotes and invoices, the next numbers, and what is missing before documents can be sent. Free up to 1,000,000 reads a month.
- [invoices_connect_stripe](https://conecto.chat/tools/invoices/invoices_connect_stripe.md): Connects 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.
- [invoices_create](https://conecto.chat/tools/invoices/invoices_create.md): Creates a draft quote or invoice: the customer, the lines, the currency and the dates. $0.01 a call.
- [invoices_update](https://conecto.chat/tools/invoices/invoices_update.md): Changes a draft quote or invoice; customer and lines replace the old ones. $0.01 a call.
- [invoices_send](https://conecto.chat/tools/invoices/invoices_send.md): Sends 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.
- [invoices_get](https://conecto.chat/tools/invoices/invoices_get.md): One quote or invoice in full, by invoice_id or number: lines, totals, taxes, payments, history, its page and a fresh PDF link. Free up to 1,000,000 reads a month.
- [invoices_list](https://conecto.chat/tools/invoices/invoices_list.md): Quotes and invoices, newest first, by kind, status (also overdue, unpaid and expired), customer and issue date. Free up to 1,000,000 reads a month.
- [invoices_convert_quote](https://conecto.chat/tools/invoices/invoices_convert_quote.md): Turns an accepted quote into a draft invoice with the same customer and lines. $0.01 a call.
- [invoices_record_prepayment](https://conecto.chat/tools/invoices/invoices_record_prepayment.md): 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.
- [invoices_use_credit](https://conecto.chat/tools/invoices/invoices_use_credit.md): Puts a customer's credit on their invoice, like Xero's allocate credit, or pays it back to them. $0.01 a call.
- [invoices_list_credits](https://conecto.chat/tools/invoices/invoices_list_credits.md): Lists customers' credits, deposits and overpayments, with what is left on each. Free up to 1,000,000 reads a month.
- [invoices_remind](https://conecto.chat/tools/invoices/invoices_remind.md): Emails the customer a reminder about a sent invoice with a balance, at most once a day. $0.02 a call.
- [invoices_remind_overdue](https://conecto.chat/tools/invoices/invoices_remind_overdue.md): Emails a reminder about every invoice at least some days overdue, the longest overdue first. $0.02 per reminder sent.
- [invoices_set_expected_date](https://conecto.chat/tools/invoices/invoices_set_expected_date.md): Notes the day a customer says they will pay an invoice, so the cash flow forecast counts the money then, even when the invoice is overdue. Free.
- [invoices_create_credit_note](https://conecto.chat/tools/invoices/invoices_create_credit_note.md): Corrects a sent invoice with a numbered credit note: all of it, some of its lines or an amount, emailed like an invoice. $0.10 a call.
- [invoices_void](https://conecto.chat/tools/invoices/invoices_void.md): Voids a document: a sent one keeps its number but can no longer be paid or accepted; a draft is discarded. $0.01 a call.
- [invoices_save_repeating](https://conecto.chat/tools/invoices/invoices_save_repeating.md): Makes an invoice again every so many weeks, months or years, drafted or sent on its day, with [Month] and [Year] filled in, like Xero's repeating invoices. $0.001 a call.
- [invoices_list_repeating](https://conecto.chat/tools/invoices/invoices_list_repeating.md): Lists the repeating invoices: who each is for, how often, the next dates, and what each made. Free up to 1,000,000 reads a month.
- [invoices_delete_repeating](https://conecto.chat/tools/invoices/invoices_delete_repeating.md): Stops a repeating invoice for good; the invoices it made stay. Free.
- [invoices_statement](https://conecto.chat/tools/invoices/invoices_statement.md): Makes a customer statement, outstanding or activity, as a PDF, and emails it when asked, like Xero's statements. $0.05 a call.
- [invoices_summary](https://conecto.chat/tools/invoices/invoices_summary.md): What customers owe, per currency: outstanding, overdue and paid this month, and the quotes still open. Free up to 1,000,000 reads a month.
- [invoices_report](https://conecto.chat/tools/invoices/invoices_report.md): Aged receivables on any day, or sales per customer for a period with the credit notes taken off. Free up to 1,000,000 reads a month.
