Expenses

Record a payment against an expense

Records a full or partial payment against an expense and posts the payment journal entry from the given payment account (e.g. bank). Omitting amount pays the remaining balance. amount is the CHF (base-currency) book value, unlike invoice payments where it is in the invoice currency; a foreign-currency expense therefore refuses amount with 400 FW_AMOUNT_REQUIRED: send fwAmount (the amount paid in the expense currency) instead. The dashboard always does. The same rule applies to POST /revenue/{id}/receive. Currency errors (400): FX_RATE_UNAVAILABLE, FX_RATE_SOURCE_UNAVAILABLE (ESTV/BAZG unreachable, retry), INVALID_EXCHANGE_RATE, EXCHANGE_RATE_IMPLAUSIBLE (exchangeRate, or the rate baseAmount implies, outside 0.5x to 2x of the ESTV/BAZG rate of the payment date), AMOUNT_OUT_OF_RANGE, FW_AMOUNT_REQUIRED, PAYMENT_ACCOUNT_CURRENCY_MISMATCH, OPEN_ITEM_RATE_MISSING (the expense has no stored rate, so its open item has no CHF book value), PAYMENT_EXCEEDS_OPEN (fwAmount above what is still open; the expense row is locked for the payment, so a concurrent payment is seen). zeroSaldoSkipped reports a zero-saldo realization that was not booked.

post/expenses/{id}/pay

Request

  • Base URL: https://api.lumabill.ch/v1
  • URL: https://api.lumabill.ch/v1/expenses/{id}/pay
  • Auth: HTTP bearer

Request body

paymentAccountIdstring uuid required

Chart-of-accounts UUID of the paying account (e.g. 1021 Bank)

paidDatestring date required
amountnumber double nullable

Partial payment amount in CHF (the base-currency book value); omit to pay the remaining balance. Base-currency expenses only: a foreign-currency expense refuses it with 400 FW_AMOUNT_REQUIRED, send fwAmount there.

fwAmountnumber double nullable

Foreign-currency expense only - partial amount in the expense currency. The only way to pay part of a foreign-currency expense (amount is refused there).

exchangeRatenumber double nullable

Foreign-currency expense only - the rate actually applied (CHF per 1 unit). Omit to use baseAmount or the ESTV/BAZG rate of the payment date

baseAmountnumber double nullable

Foreign-currency expense only - the CHF that actually left the account (bank statement); wins over exchangeRate

notestring nullable

Example request

{
  "paidDate": "2026-06-30",
  "amount": 84.5
}

Response

Payment recorded

paymentStatus'UNPAID' | 'PARTIALLY_PAID' | 'PAID' required
amountPaidnumber double required
remainingnumber double
paymentJournalEntryIdstring uuid nullable
zeroSaldoSkipped'PRIOR_YEAR_NOT_CLOSED' | 'FX_ACCOUNT_MISSING'

Present when the payment emptied a foreign-currency account in FW but the residual CHF book value was not realized (zero-saldo rule): PRIOR_YEAR_NOT_CLOSED (the previous fiscal year is open, so the account has no Saldovortrag yet; close it and the residual is realized then), FX_ACCOUNT_MISSING (no FX result account: set one in the FX settings). The payment itself is booked.

messagestring

Example response

{
  "fx": {
    "currency": "CHF"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.