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 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.
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.
Description of the payer.
Bill sum, in the default currency of the panel. From 0.01 to 999999.99.
The created bill
true if request finished successfully.
trueID of the new bill.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
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 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.
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.
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.
Optional. Default 0. Return bills starting from this offset.
Matching bills
true if request finished successfully.
trueTotal number of bills, ignoring pagination.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
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?