Справочник API

Счета

Платежный аккаунт, счета и их оплата.

Платежный аккаунт

GET/v1/billing/account

Области доступа
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.

Ответы

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

Список счетов

GET/v1/billing/invoices

Области доступа
billing:read

Параметры

ПолеТипОбязательно
cursorзапросstringнет
limitзапросintegerнет
statusзапросenum: issued, partially_paid, paid, overdue, cancelledнет

Ответы

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

Получить счет

GET/v1/billing/invoices/{invoice_id}

Области доступа
billing:read

Параметры

ПолеТипОбязательно
invoice_idпутьstring (uuid)да

Ответы

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

Скачать счет

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

Области доступа
billing:read
Обязательный заголовок
Idempotency-Key

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

Параметры

ПолеТипОбязательно
invoice_idпутьstring (uuid)да

Ответы

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

Оплатить счет

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

Области доступа
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.

Параметры

ПолеТипОбязательно
invoice_idпутьstring (uuid)да

Ответы

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