Bookkeeping

Pay back expense claims

books_repay_claims · Changes data · Markdown

Pays someone back for costs they paid with their own money (expense claims), like Xero's, with a SEPA file when asked.

$0.01 a call

From your agent’s balance. A call that fails costs nothing.

An example

Pay Lena back for her train tickets and the hardware store, and give me the bank file.

Your agent callsbooks_repay_claims$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.

With these arguments
{
  "person": "lena.brandt@hansenvoss.example",
  "sepa_file": true,
  "iban": "DE02 1203 0000 0000 2020 51"
}
What comes back
{
  "repaid": [
    {
      "claim_id": 4101,
      "person": {
        "email": "lena.brandt@hansenvoss.example",
        "name": "Lena Brandt",
        "person_id": null
      },
      "date": "2026-10-05",
      "currency": "EUR",
      "amount": "119.00",
      "description": "Deutsche Bahn",
      "status": "repaid",
      "entry": 3,
      "repaid_on": "2026-10-14",
      "repaid_entry": 5,
      "receipt_file_id": null
    },
    {
      "claim_id": 4102,
      "person": {
        "email": "lena.brandt@hansenvoss.example",
        "name": "Lena Brandt",
        "person_id": null
      },
      "date": "2026-10-08",
      "currency": "EUR",
      "amount": "45.50",
      "description": "Hagebau",
      "status": "repaid",
      "entry": 4,
      "repaid_on": "2026-10-14",
      "repaid_entry": 5,
      "receipt_file_id": null
    }
  ],
  "currency": "EUR",
  "total": "164.50",
  "entry": {
    "entry": 5,
    "date": "2026-10-14",
    "memo": "Expense claims paid back to Lena Brandt",
    "reference": null,
    "party": "Lena Brandt",
    "source": "expense_claim",
    "total": "164.50",
    "currency": "EUR",
    "rate": null,
    "lines": [
      {
        "account": "2250",
        "account_name": "Expense claims to repay",
        "debit": "164.50",
        "credit": null,
        "description": "Expense claims: Lena Brandt",
        "tax": null
      },
      {
        "account": "1010",
        "account_name": "Bank",
        "debit": null,
        "credit": "164.50",
        "description": "Paid back to Lena Brandt",
        "tax": null
      }
    ],
    "reverses": null,
    "reversed_by": null,
    "receipt_file_id": null,
    "recorded_at": "2026-10-19T02:28:54+00:00",
    "recorded_by": "key 4101 (Pip)"
  },
  "file": {
    "file_id": "37a8fa79-7c22-477b-a371-918fa41e0a85",
    "name": "SEPA expense claims Lena Brandt 2026-10-14.xml",
    "content_type": "application/xml",
    "size": "1 KB",
    "size_bytes": 1039,
    "sha256": "2322893ed0094aaf26cdbc095c2270cb1d94f320c7b232a4746c2ae9383b5d80",
    "created_at": "2026-10-14T08:00:00+00:00",
    "download_url": "https://cncto.co/d/37a8fa79-7c22-477b-a371-918fa41e0a85?t=eyJmIjoiMzdhOGZhNzktN2MyMi00NzdiLWEzNzEtOTE4ZmE0MWUwYTg1IiwiZXhwIjoxNzkyOTgxNzM0fQ:1xId7O:j4HExBqdjXz6nrjJpdXn9BvMkTYeVey9jKyaK_GBPRo",
    "link_expires_in_hours": 168
  }
}

Use it when

Someone on the team is owed for receipts they paid privately, say at the end of the month.

What it does

Pay back what someone paid for the business with their own money (expense claims, from books_record_expense with paid_by), like Xero's: all their open claims in one currency, or the claims named, in one entry from paid_from (default the bank account) against Expense claims to repay. sepa_file: true adds a SEPA credit transfer file to their iban, to upload to the bank.

What comes back

repaid: the claims paid back, currency, total, entry: the repayment, and file: the SEPA file with its download link when asked. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
personRequiredstringTheir email, as paid_by had it. 3 to 254 characters.
claimsarray of integersOnly these claims (claim_id). 1 to 200 items.
currencystringWhen it is not the base currency, e.g. "USD". The rate is then rate, a standing rate, or the European Central Bank's for the date. Matches ^[A-Za-z]{3}$.
datestringWhen it was paid. Default today. Matches ^\d{4}-\d{2}-\d{2}$.
paid_fromstringAn account code from the chart, e.g. "6600". 1 to 20 characters.
referencestringUp to 140 characters.
sepa_filebooleanDefault: false.
ibanstringUp to 42 characters.
bicstringUp to 11 characters.

The call

Over MCP, call books_repay_claims on https://api.conecto.chat/mcp/books. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/books_repay_claims \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"person":"lena.brandt@hansenvoss.example","sepa_file":true,"iban":"DE02 1203 0000 0000 2020 51"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
no_books409The business keeps no books yet.Set them up with books_setup (base currency, start date).
not_found404No account, tax, entry or file of the books has that code, name or id.Check the codes with books_list_accounts and the taxes with books_get.
archived409The account or tax is archived.Use another one, or un-archive it with books_save_accounts.
unbalanced400The debits and credits do not add up to the same amount.Make the lines balance.
before_start409The date is before the books start.Use a later date.
period_locked409The books are locked for that date.Use a later date, or unlock with books_lock.
no_rate409There is no exchange rate for the currency on that day.Pass rate, or set a standing rate with books_setup rates.
rates_loading503The day's exchange rates are still loading.Try again in a few minutes, or pass rate.
not_found404The person has no claims to repay, or a claim named is not one of theirs.List them with books_list_claims.
invalid_input400Their claims are in more than one currency, a SEPA file for claims not in euros, or the date is in the future.Give currency, or fix what the message names.
nothing_to_repay409Their open claims come to nothing or less (money they returned).Nothing to pay back.
no_iban409For the SEPA file, no iban for the person or none on the bank account.Pass iban, and add the bank account's with books_save_accounts.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md