API reference

Invoices

The billing account, invoices and their payment.

Get the billing account

GET/v1/billing/account

Scopes
billing:read

the tenant's billing plan (current effective version and prices) and availability of payment through the provider. No plan - configured=false; prices are never shown as a fact without a tariff.

Responses

  • 200BillingAccountView
  • 400
  • 401
  • 403
  • 404
  • 409
  • 412
  • 413
  • 415
  • 422
  • 428
  • 429
  • 503

List invoices

GET/v1/billing/invoices

Scopes
billing:read

Parameters

FieldTypeRequired
cursorquerystringno
limitqueryintegerno
statusqueryenum: issued, partially_paid, paid, overdue, cancelledno

Responses

  • 200InvoiceList
  • 400
  • 401
  • 403
  • 404
  • 409
  • 412
  • 413
  • 415
  • 422
  • 428
  • 429
  • 503

Get an invoice

GET/v1/billing/invoices/{invoice_id}

Scopes
billing:read

Parameters

FieldTypeRequired
invoice_idpathstring (uuid)yes

Responses

  • 200Invoice
  • 400
  • 401
  • 403
  • 404
  • 409
  • 412
  • 413
  • 415
  • 422
  • 428
  • 429
  • 503

Download an invoice

POST/v1/billing/invoices/{invoice_id}/document

Scopes
billing:read
Required header
Idempotency-Key

signed short-lived URL of the invoice PDF (same generator as reports). 409 bad_state while the document is being generated.

Parameters

FieldTypeRequired
invoice_idpathstring (uuid)yes

Responses

  • 200Download
  • 400
  • 401
  • 403
  • 404
  • 409
  • 412
  • 413
  • 415
  • 422
  • 428
  • 429
  • 503

Pay an invoice

POST/v1/billing/invoices/{invoice_id}/payments

Scopes
billing:pay

starts or resumes the online payment of the amount due through the payment provider (NerezPay). One active online payment per invoice: a repeated call returns the active payment and its URL. Disabled online payment - 503 capability_disabled with the reason.

Parameters

FieldTypeRequired
invoice_idpathstring (uuid)yes

Responses

  • 201InvoicePaymentStart
  • 400
  • 401
  • 403
  • 404
  • 409
  • 412
  • 413
  • 415
  • 422
  • 428
  • 429
  • 503