Invoices

Undo a recorded payment

Undoes one payment (by paymentId, else the most recent). The payment journal entry is reversed with a Storno on the payment date (nothing is deleted, the Buchungsnummer series stays gap-free), bank matches are released and the payment status is recomputed. Rejected with 400 FISCAL_YEAR_CLOSED when the payment date lies in a closed fiscal year.

post/invoices/{id}/unpay

Request

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

Request body

paymentIdstring uuid

Payment to undo (from the payments list); omit to undo the most recent payment

Response

Payment undone

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.