Metanow Docs
User Guides

Finance — Recording a payment

Record a customer receipt or a supplier payment in cash or by bank, in one step, safely under retry.

Recording a payment

A payment settles exactly one document — an issued customer invoice or a posted supplier bill. Recording it creates the payment, allocates it to the document and posts it to the ledger in one step. "Paid" is never typed by hand: it is derived from the posted allocations.

From the dashboard

Open the invoice (or bill) and click Record payment.

ControlWhat it does
AmountDefaults to the open balance. Integer minor units under the hood; an overpayment is refused naming the outstanding amount.
Payment methodBank (default) or Cash. The account list below follows the choice.
Which account received / paid this?Bank: your bank journals (default: Default bank from Finance → Setup). Cash: your cash journals (default: Default cash from Finance → Setup, else the cash journal). Create mints a new account + journal of that kind.
Payment dateDefaults to today.
ReferenceOptional memo, stored in the audit log. It does not make two payments "the same" — two instalments with one reference are two receipts.

Confirm posts the payment. Double-clicking, a slow network or a browser retry cannot record it twice: the dialog carries one idempotency key per open, and the server returns the existing payment instead of a second one — in that case you see a warning ("already recorded as … on …, nothing written"), not a success message.

The Payments screen (Finance → Payments) also offers Save as draft — a draft is not posted; a user with posting rights posts it from the same form.

When cash cannot be recorded

Cash never posts to the bank account. If no cash account is mapped you see No cash account is mapped… and nothing is posted. Fix it once:

  • Finance → Accounts → reset from your chart template (every template carries a cash leaf and a cash journal), or
  • Finance → Setup → Default cash — point it at your cash account.

From the assistant

"Invoice INV-0042 was paid 150 EUR in cash today."

The assistant looks the invoice up and calls register_payment once. It is a high-stakes action, so it asks for your confirmation first.

API

POST /finance/payments/register (permission finance:post)

{
  "invoice_id": "…",              // or "bill_id" — exactly one
  "amount_cents": 15000,          // integer minor units
  "method": "cash",               // "cash" | "bank"
  "payment_date": "2026-09-21",   // optional, default today (UTC)
  "account_number": "1000",       // optional chart number of the cash/bank leaf
  "external_key": "invoice:<invoice_id>:cash:15000:2026-09-21"
}

Response 200 { payment, settlement, created }. created is true only for the call that recorded the payment; a replay with the same key returns the same payment with created: false and writes nothing. The same key with a different amount or document is refused (409 PAYMENT_KEY_REUSED) and the first payment is left untouched.

Derive the key, never invent it. A colliding key under-records visibly; a fresh random key double-records invisibly.

RefusalMeaning
404The document (or the account number) is not yours.
400Overpayment (names amount, outstanding, face, settled), currency mismatch, invalid amount or key.
409 PAYMENT_KEY_REUSEDSame key, different payload (amount, method, document, currency, direction).
409 PAYMENT_KEY_REVERSEDThe key names a payment that was reversed. Record a new payment with a new key.
409 PAYMENT_DRAFT_HAS_JOURNALDeleting a draft whose journal is already posted — a state the atomic post no longer produces (journal and payment commit together); such a row predates it or was edited by hand. Replay its key to finish the post if the document still has room; otherwise the journal must be cancelled and the draft deleted — a payment is never posted after its journal was cancelled.
409 PAYMENT_JOURNAL_CANCELLEDThe draft's settlement journal was cancelled. Delete the draft and record the payment again with a new key.
422 FINANCE_LIQUIDITY_ACCOUNT_NOT_POSTABLEThe stamped cash/bank account is deprecated, frozen, a group, or not yours.
422 FINANCE_CASH_ACCOUNT_MISSINGNo cash account mapped — see above.
422 FINANCE_LIQUIDITY_ACCOUNT_KIND_MISMATCHaccount_number is not a cash (or bank) account.

Bank statement lines are matched, not registered: this door takes no bank_transaction_id.

On this page