GET /apiv2/billing/usage
Your postpaid charges: one line per separately chargeable component of an order, newest first. A line appears after the service has been supplied and recorded, which can be later than the order response. Use it to reconcile orders with the debt and with invoices. Part of postpaid billing.
Endpoint URL
GET https://netts.io/apiv2/billing/usageRequest headers
| Header | Required | Description |
|---|---|---|
X-API-KEY | yes | API key with the billing.read permission |
X-Real-IP | yes | An address from the key whitelist |
Query parameters
| Parameter | Required | Description |
|---|---|---|
from | no | charges from this moment, ISO 8601 with a time zone: 2026-10-01T00:00:00Z |
to | no | charges before this moment, same format |
limit | no | lines per page, 1–500, default 100 |
cursor | no | nextCursor from the previous page |
A time without a zone is refused with 400 invalid_request — the period would be ambiguous.
Example
bash
curl -s 'https://netts.io/apiv2/billing/usage?from=2026-10-01T00:00:00Z&limit=2' \
-H 'X-API-KEY: your-api-key' \
-H 'X-Real-IP: 203.0.113.10'json
{
"success": true,
"data": {
"items": [
{
"id": 1024,
"orderId": "AB2EF201B582AA1",
"productCode": "energy_1h",
"address": "TXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"quantity": 65000,
"unitPriceSun": "20.000000",
"discount": null,
"amountTrx": "1.300000",
"amountUsdc": "0.430096",
"usdPerTrx": "0.330842760000000000",
"quoteId": null,
"txHash": "5c1f0e0d3a2b4c6d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f",
"fulfilledAt": "2026-10-19T10:11:42.563494+00:00",
"status": "accrued",
"paidTrx": "0.000000",
"paidUsdc": "0.000000",
"invoiceId": null,
"reversesId": null
}
],
"nextCursor": 1023
},
"timestamp": "2026-10-19T20:31:10+00:00"
}A charge
| Field | Description |
|---|---|
id | the charge number |
orderId | the order this charge belongs to — the same id the order endpoint returned |
productCode | energy_1h, energy_5m, bandwidth, activation or aml_check |
address | the TRON address the order was for |
quantity | energy or bandwidth units, or 1 for an activation or a check |
unitPriceSun | the price per unit in SUN you were charged, your personal price included; null for products priced per order |
discount | a separate discount on this order — type percent or sun_per_unit and its value — or null |
amountTrx, amountUsdc | the recorded amount of this component, in TRX and in the currency of your contract |
usdPerTrx | the rate of TRX to the currency of your contract recorded for this component: from its quotation if the quotation fixed the amount, otherwise at the time the service was supplied |
quoteId | the quote the order used, if any |
txHash | the TRON transaction of this component, when there is one |
fulfilledAt | when this component was supplied, UTC |
status | accrued — not invoiced yet; invoiced; paid; reversed — cancelled by a later correction |
paidTrx, paidUsdc | how much of the charge is already paid, in TRX and in the currency of your contract |
invoiceId | the invoice that contains it |
reversesId | for a correction line: the charge it cancels |
An order with energy and an activation has two lines, one per part. A correction never edits an old line: it adds a new one with reversesId.
Pages
Send the nextCursor value as cursor to get the next, older page. nextCursor is null on the last page.
Errors
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | wrong parameter, or from/to without a time zone |
| 401 | -1, -2 | the key is missing or invalid, or the IP is not whitelisted — answered by the API gateway, see response format |
| 403 | billing_read_required, postpaid_required | no permission, or no postpaid billing |