Skip to content

GET /apiv2/billing/invoices ​

Your postpaid invoices. At the end of the billing period set in your contract an invoice is issued for the services of that period; each invoice has a due date. Part of postpaid billing.

Endpoints ​

EndpointReturns
GET /apiv2/billing/invoicesall invoices, newest period first
GET /apiv2/billing/invoices/{id}one invoice with its charges

Request headers ​

HeaderRequiredDescription
X-API-KEYyesAPI key with the billing.read permission
X-Real-IPyesAn address from the key whitelist

Example ​

bash
curl -s 'https://netts.io/apiv2/billing/invoices/12' \
  -H 'X-API-KEY: your-api-key' \
  -H 'X-Real-IP: 203.0.113.10'
json
{
  "success": true,
  "data": {
    "id": 12,
    "periodStart": "2026-10-12T00:00:00+00:00",
    "periodEnd": "2026-10-19T00:00:00+00:00",
    "totalTrx": "3778.500000",
    "totalUsdc": "1250.400000",
    "paidUsdc": "0.000000",
    "status": "issued",
    "issuedAt": "2026-10-19T00:10:00+00:00",
    "dueAt": "2026-10-24T00:10:00+00:00",
    "charges": [
      {
        "id": 1024,
        "orderId": "AB2EF201B582AA1",
        "productCode": "energy_1h",
        "amountTrx": "1.300000",
        "amountUsdc": "0.430096",
        "status": "invoiced"
      }
    ]
  },
  "timestamp": "2026-10-19T20:31:10+00:00"
}

Each charge has the same fields as in usage; the example shows a few of them.

An invoice ​

FieldDescription
idthe invoice number
periodStart, periodEndthe billing period the invoice covers, UTC
totalTrx, totalUsdcthe invoice total, in TRX and in the currency of your contract
paidUsdchow much is already paid, in the currency of your contract
statusissued, delivered, partially_paid, paid or void
issuedAtwhen the invoice was issued
dueAtthe date to pay by
chargesonly in /invoices/{id}: the charges of the invoice

The list endpoint returns the same fields without charges. An account with no invoices yet gets an empty list.

Errors ​

HTTPcodeMeaning
401-1, -2the key is missing or invalid, or the IP is not whitelisted — answered by the API gateway, see response format
403billing_read_required, postpaid_requiredno permission, or no postpaid billing
404not_foundno such invoice on your account