> 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/transaction.md).

# Transaction

The account's billing history over a period.

A transaction is one movement on the account's balance: a payment in, a charge out. This operation reads them over a period, which is what an integration needs to reconcile the Navixy platform's billing against its own records.

The period is capped. A span longer than the `report.max_time_span` value that [`dealer/get_ui_config`](/docs/navixy-api/user-api/resources/commons/dealer.md#post-dealer-get_ui_config) reports returns error 211.

## Transaction object

## The Transaction object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"Transaction":{"type":"object","description":"One billing transaction on the user's account.","properties":{"description":{"type":"string","description":"Transaction description."},"type":{"type":"string","description":"Type of transaction."},"subtype":{"type":"string","description":"Subtype of transaction."},"timestamp":{"type":"string","description":"When the transaction was created."},"user_id":{"type":"integer","description":"ID of the user who made the transaction."},"dealer_id":{"type":"integer","description":"ID of the dealer."},"tracker_id":{"type":"integer","description":"Tracker ID, or 0 when the transaction is not associated with a tracker."},"amount":{"type":"number","description":"Amount of money in the transaction. Can be negative: -10.0000 means 10 units were taken off the balance."},"new_balance":{"type":"number","description":"The user's money balance after the transaction."},"old_balance":{"type":"number","description":"The user's money balance before the transaction."},"bonus_amount":{"type":"number","description":"Amount of bonus used in the transaction. Can be negative."},"new_bonus":{"type":"number","description":"The user's bonus balance after the transaction."},"old_bonus":{"type":"number","description":"The user's bonus balance before the transaction."}}}}}}
```

## API actions

API base path: `/transaction`.

***

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

## List transactions

> List the billing transactions of the current user over a period.\
> \
> A request with an empty body reports \`interval\` as the missing parameter. That is the internal name of the field holding both dates; the public parameters are \`from\` and \`to\`.\
> \
> 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":{"Transaction":{"type":"object","description":"One billing transaction on the user's account.","properties":{"description":{"type":"string","description":"Transaction description."},"type":{"type":"string","description":"Type of transaction."},"subtype":{"type":"string","description":"Subtype of transaction."},"timestamp":{"type":"string","description":"When the transaction was created."},"user_id":{"type":"integer","description":"ID of the user who made the transaction."},"dealer_id":{"type":"integer","description":"ID of the dealer."},"tracker_id":{"type":"integer","description":"Tracker ID, or 0 when the transaction is not associated with a tracker."},"amount":{"type":"number","description":"Amount of money in the transaction. Can be negative: -10.0000 means 10 units were taken off the balance."},"new_balance":{"type":"number","description":"The user's money balance after the transaction."},"old_balance":{"type":"number","description":"The user's money balance before the transaction."},"bonus_amount":{"type":"number","description":"Amount of bonus used in the transaction. Can be negative."},"new_bonus":{"type":"number","description":"The user's bonus balance after the transaction."},"old_bonus":{"type":"number","description":"The user's bonus balance before the transaction."}}}},"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":{"/transaction/list":{"post":{"tags":["Billing"],"summary":"List transactions","description":"List the billing transactions of the current user over a period.\n\nA request with an empty body reports `interval` as the missing parameter. That is the internal name of the field holding both dates; the public parameters are `from` and `to`.\n\nRequires the `payment_create` right.","operationId":"transactionList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Start of the period. Date and time."},"to":{"type":"string","description":"End of the period. Date and time. Must be after `from`."},"limit":{"type":"integer","description":"Optional. Maximum number of transactions to return. Both the default and the cap are 20000.","minimum":1,"maximum":20000}},"required":["from","to"]}}}},"responses":{"200":{"description":"Matching transactions","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}}}},"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):

* 211 - Requested time span is too big, more than [report.maxTimeSpan](/docs/navixy-api/user-api/resources/commons/dealer.md).


---

# 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/transaction.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.
