> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/billing/bill.md).

# 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](/docs/navixy-api/user-api/resources/commons/plugin.md) 29 to be available to the user, and the `payment_create` right.

## Bill object

## The Bill object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"Bill":{"type":"object","description":"A bill raised against the user's account.","properties":{"order_id":{"type":"integer","description":"Unique bill ID."},"created":{"type":"string","description":"When the bill was created."},"sum":{"type":"number","description":"Bill sum, in the default currency of the panel."},"status":{"type":"string","description":"Bill order status. `created` means raised but not settled.","enum":["created","settled","gathered","shipped","shipped_partially","canceled"]},"positions":{"type":"array","description":"Position names. A bill raised through `bill/create` carries exactly one.","items":{"type":"string"}},"link":{"type":"string","description":"URL to the order."}}}}}}
```

## API actions

API base path: `/bill`.

***

*Required sub-user rights:* `payment_create`.

## Create bill

> 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.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Billing","description":"Bills, payment systems, subscriptions, device plans and the transaction log. All resources under the /bill/, /payment_system/, /subscription/, /tariff/ and /transaction/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/bill/create":{"post":{"tags":["Billing"],"summary":"Create bill","description":"Create a new bill for the current user, and return its ID.\n\nRequires the user bills plugin, plugin 29. Without it the call returns error 222 rather than creating anything.\n\nRequires the `payment_create` right.","operationId":"billCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payer":{"type":"string","description":"Description of the payer."},"sum":{"type":"number","description":"Bill sum, in the default currency of the panel. From 0.01 to 999999.99.","minimum":0.01,"maximum":999999.99}},"required":["payer","sum"]}}}},"responses":{"200":{"description":"The created bill","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"type":"integer","description":"ID of the new bill."}}}}}},"400":{"description":"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.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#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

> 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.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Billing","description":"Bills, payment systems, subscriptions, device plans and the transaction log. All resources under the /bill/, /payment_system/, /subscription/, /tariff/ and /transaction/ paths."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"Bill":{"type":"object","description":"A bill raised against the user's account.","properties":{"order_id":{"type":"integer","description":"Unique bill ID."},"created":{"type":"string","description":"When the bill was created."},"sum":{"type":"number","description":"Bill sum, in the default currency of the panel."},"status":{"type":"string","description":"Bill order status. `created` means raised but not settled.","enum":["created","settled","gathered","shipped","shipped_partially","canceled"]},"positions":{"type":"array","description":"Position names. A bill raised through `bill/create` carries exactly one.","items":{"type":"string"}},"link":{"type":"string","description":"URL to the order."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/bill/list":{"post":{"tags":["Billing"],"summary":"List bills","description":"List the bills of the current user.\n\nRequires the user bills plugin, plugin 29, and returns error 222 without it.\n\nA bill created through `bill/create` carries exactly one entry in `positions`.\n\nOn a standalone installation the base part of each `link` can be changed with the `billing.orders.baseUrl` config option.\n\nCallable with an empty body. Also accepts GET with the same parameters as query-string values.\n\nRequires the `payment_create` right.","operationId":"billList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","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.","minimum":1},"offset":{"type":"integer","description":"Optional. Default 0. Return bills starting from this offset.","minimum":0}}}}}},"responses":{"200":{"description":"Matching bills","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"count":{"type":"integer","description":"Total number of bills, ignoring pagination."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/Bill"}}}}}}},"400":{"description":"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.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/billing/bill.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
