Skip to navigation

Mark as paid

View as Markdown

Mark a CASH invoice as paid

Manually settles the invoice :id when it was collected in cash. It moves the invoice to Paid, runs the whole paid-invoice pipeline (notifications, webhooks, settlement) and broadcasts the change over the websocket gateway.

Auth

x-api-key header with Merchant.invoice.patch. Also accepts JWT user, POS JWT and limited JWT tokens.

Path params

  • id (required): the invoice id.

Errors

  • 400 Invoice is already in a paid status.
  • 403 You do not have permission to modify this invoice. — the invoice belongs to another store.
  • 400 — the invoice’s resolved payment method is not CASH.

There is no request body.

Side effects

Sets the status to Paid, records a MANUALLY_MARKED_AS_PAID invoice event with the acting user id and runs handlePaidInvoice. Response: { status: "marked-as-paid" }.


Notas: Handler: statusService.markAsPaid(user, id, body?.storeId). Only invoices whose resolved payment method is CASH can be marked as paid. MarkAsPaidDto exposes an optional storeId, but getValidStoreId ignores it for non-POS callers (API key included) and always uses the store resolved from the credentials — so it is not documented as a body field. Replaces the deprecated PATCH /v1/invoice/:id/mark-as-paid, which took storeId as a query param.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

idstringRequired
Id of the CASH invoice to settle manually.

Headers

x-application-account-idstringOptional

Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the x-account-id header, or the application_account_id / account_id query parameter.