For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bill

An invoice raised against the account, and the payment link that settles it.

A bill is an invoice raised against the account. Creating one returns a link the user follows to pay it, so an integration can put a payment step in its own interface rather than sending the user to the Navixy platform.

Both operations here need plugin 29 to be available to the user, and the payment_create right.

Bill object

API actions

API base path: /bill.


Required sub-user rights: payment_create.

Create bill

post
/bill/create

Create a new bill for the current user, and return its ID.

Requires the user bills plugin, plugin 29. Without it the call returns error 222 rather than creating anything.

Requires the payment_create right.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
payerstringRequired

Description of the payer.

sumnumber · min: 0.01 · max: 999999.99Required

Bill sum, in the default currency of the panel. From 0.01 to 999999.99.

Responses
200

The created bill

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
valueintegerOptional

ID of the new bill.

post/bill/create
POST /v2/bill/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "payer": "text",
  "sum": 1
}
{
  "success": true,
  "value": 1
}

Errors

These errors come in addition to the general error codes:

  • 222 - Plugin not found, when plugin 29 is not available for the user.


For a standalone installation, the base part of link can be changed with the billing.orders.baseUrl config option.

Required sub-user rights: payment_create.

List bills

post
/bill/list

List the bills of the current user.

Requires the user bills plugin, plugin 29, and returns error 222 without it.

A bill created through bill/create carries exactly one entry in positions.

On a standalone installation the base part of each link can be changed with the billing.orders.baseUrl config option.

Callable with an empty body. Also accepts GET with the same parameters as query-string values.

Requires the payment_create right.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
limitinteger · min: 1Optional

Optional. Maximum number of bills to return. Both the default and the cap are 10000, and a larger value is silently reduced to it rather than rejected.

offsetintegerOptional

Optional. Default 0. Return bills starting from this offset.

Responses
200

Matching bills

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
countintegerOptional

Total number of bills, ignoring pagination.

post/bill/list
POST /v2/bill/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "limit": 1,
  "offset": 1
}
{
  "success": true,
  "count": 1,
  "bills": [
    {
      "order_id": 1,
      "created": "text",
      "sum": 1,
      "status": "created",
      "positions": [
        "text"
      ],
      "link": "text"
    }
  ]
}

Errors

These errors come in addition to the general error codes:

  • 222 - Plugin not found, when plugin 29 is not available for the user.

Last updated

Was this helpful?