Purchasing

Pay bills in a batch

purchasing_pay_bills · Changes data · Markdown

Pays several bills at once from one bank account, like Xero's batch payments, with the SEPA file to upload to the bank.

$0.01 per bill paid

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

An example

Pay every bill due by the end of October from the business account and give me the bank file.

Your agent callspurchasing_pay_bills$0.01 per bill paid

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
{
  "due_before": "2026-10-31",
  "sepa_file": true
}
What comes back
{
  "batch": {
    "number": "PB-0001",
    "date": "2026-10-14",
    "currency": "EUR",
    "total": "1102.50",
    "count": 2,
    "account": "1010",
    "payments": [
      {
        "payment_id": 4101,
        "bill_id": "f1903745-74dc-412a-8d56-64333a46e3ea",
        "supplier": "Kühlmann Kältetechnik",
        "reference": "KK-40177",
        "amount": "640.00"
      },
      {
        "payment_id": 4102,
        "bill_id": "85d29c16-34b2-409f-b115-c78beebdf308",
        "supplier": "Nordstahl Küchentechnik GmbH",
        "reference": "NS-2026-1188",
        "amount": "462.50"
      }
    ],
    "file": {
      "file_id": "a069debb-b3a9-4d4c-af8a-6a6cc20e067a",
      "name": "SEPA PB-0001.xml",
      "content_type": "application/xml",
      "size": "1.3 KB",
      "size_bytes": 1327,
      "sha256": "e8df23c27f05fdbd2d95bd5265dd749fb114dcd25837bd395643ac1b861cdeca",
      "created_at": "2026-10-14T08:00:00+00:00",
      "download_url": "https://cncto.co/d/a069debb-b3a9-4d4c-af8a-6a6cc20e067a?t=eyJmIjoiYTA2OWRlYmItYjNhOS00ZDRjLWFmOGEtNmE2Y2MyMGUwNjdhIiwiZXhwIjoxNzkyOTc4NTUzfQ:1xIcI5:2m5OcvUkenNE1HhgrV138tA1DiouWmZlBn_6SaUhgdk",
      "link_expires_in_hours": 168
    }
  }
}

Use it when

The business pays its suppliers in one go, say every Friday or before the month ends.

What it does

Pay several bills at once from one bank account, like Xero's batch payments: bills (each with an optional amount, else its balance), or every unpaid bill due on or before due_before (one supplier's with supplier). One payment per bill on date, posted to the books from bank_account (default: where bank transfers land). sepa_file: true adds the SEPA credit transfer file (pain.001) to upload to the bank, paying each supplier's IBAN with the bill's reference; the bank books the batch as one line, which books_bank_lines then suggests matching to all its payments at once. All of it is paid or none.

What comes back

batch: its number, date, currency, total, the bank account, each payment (bill, supplier, reference, amount) and with sepa_file the file with its download link. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
billsarray of objects1 to 200 items.
bills[].bill_idRequiredstringThe bill_id purchasing_create_bill returned. Exactly 36 characters.
bills[].amountnumber or stringPart of it. Default: what is still owed. Up to 24 characters.
due_beforestringEvery unpaid bill due on or before this day, instead of bills. Matches ^\d{4}-\d{2}-\d{2}$.
supplierinteger or stringA supplier_id, or the supplier's name. 1 to 200 characters, at least 1.
datestringThe day it is paid. Default today. Matches ^\d{4}-\d{2}-\d{2}$.
bank_accountstringThe books' bank account it is paid from, by code. Up to 20 characters.
sepa_filebooleanDefault: false.
from_ibanstringThe IBAN it is paid from, when not the bank account's own. Up to 42 characters.
from_bicstringUp to 11 characters.

The call

Over MCP, call purchasing_pay_bills on https://api.conecto.chat/mcp/purchasing. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/purchasing_pay_bills \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"due_before":"2026-10-31","sepa_file":true}'

When it refuses

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

CodeWhenWhat to do
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.
invalid_input400Neither bills nor due_before, or both; the date is in the future; a bill is in it twice; the bills are in different currencies; or a SEPA file for bills not in euros.Fix what the message names.
not_found404No unpaid bill is due by due_before, or a bill_id is unknown.List them with purchasing_list_bills.
void409A bill is void.Leave it out.
already_paid409A bill is paid in full.Leave it out.
more_than_balance409An amount is more than its bill's balance.Pay at most the balance.
no_iban409For the SEPA file, a supplier or the bank account has no IBAN.Add it with purchasing_save_supplier or books_save_accounts, or leave those bills out.
in_progress409Another batch was numbered at the same moment.Call again.

Give this to your agent.

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