Skip to content

Postpaid billing ​

With postpaid billing you order energy, bandwidth, activation and AML checks without topping up a deposit first. Services are priced using the applicable customer-specific tariff, including applicable discounts. Charges, payments and adjustments are reflected in your invoice under the billing and payment terms of your contract.

Postpaid is enabled by Netts on request for business accounts. The endpoints in this section answer only for accounts with postpaid billing; other accounts receive 403 postpaid_required.

How it works ​

  1. You order as usual. The same order endpoints, the same API key. A postpaid account does not need a deposit balance for these orders. The price is the price under your contract, including your discounts.
  2. Supplied services are recorded as charges. An accepted order is not by itself a supplied service. A charge appears in usage once the service or a separately chargeable part of the order has been supplied — this can be later than the order response.
  3. The price and rate are fixed and kept. A valid quotation fixes the price under your contract for that order. Without a quotation, the price under your contract when the order is placed applies, and the amount in the currency of your contract is calculated at the rate when the service is supplied. Recorded amounts are not recalculated when you read usage, receive an invoice or make a payment.
  4. You receive and pay your invoice. The billing period and payment terms are those agreed in your contract. An invoice shows the services of the period, the payments and adjustments applied, and the amount still payable; a payment does not delete the service records. See invoices and payments. The payment currency, network and payment term are shown in settlement in account. An overpayment stays on your account as credit and is used for the next charges.

Tariff, quotation and recorded exchange rate ​

A quotation (freezePrice) fixes the price under your contract for one minute. Place the order with quoteId and the same parameters within that minute, and it is billed at the quoted price, even if the price changes or the service is supplied later. A quotation is optional; see 1-hour energy and 5-minute energy for the request fields.

Without a quotation, the amount in the currency of your contract is calculated at the rate when the service is supplied, not when you looked at a price or at your account. The current rate — your rate and the rate in account responses — is for comparison only; it is not a promise of the rate of a future order.

AML checks are priced in US dollars and recorded in the currency of your contract; the TRX equivalent is calculated at the rate when the check is completed. Do not recalculate an AML charge from its rounded TRX amount.

Amounts are shown in TRX and in the currency of your contract; your limits are counted in the currency of your contract. usdPerTrx is the rate of TRX to the currency of your contract. You pay in the currency and network of your contract, shown in settlement.

An order can have more than one charge, for example energy and a separately chargeable activation. Each charge has its own time and rate. Amounts are rounded once to six decimal places, half-even; a quotation keeps its quoted amounts. Reconcile an order by its charges, not by applying a current rate to its total.

All times are UTC. All amounts are decimal strings, for example "30000.000000" — parse them with a decimal type, not a float.

Credit limit ​

Netts sets the credit limit of your account: the most you can owe at any moment. It is shown in account and limits with "origin": "netts". You can see it but cannot change or switch it off — ask your Netts manager if you need a different limit.

Products and API keys share this one account-level credit limit. Each new order is checked against every applicable limit. When that check finds insufficient available credit, the order is refused before execution:

json
{
  "detail": {
    "code": 1004,
    "msg": "Postpaid credit limit reached.",
    "paymentMode": "postpaid",
    "reason": "limit_reached",
    "product": "*",
    "period": "outstanding",
    "limitId": 1
  }
}

The order endpoint answers 402. A payment frees the limit again. If the check is temporarily unavailable, the order endpoint answers 503 with code 5036 — retry later, nothing was charged by the rejected attempt. An available amount shown by a read request is the current figure, not a reservation for a later order; other accepted orders can change it.

Your own limits ​

Inside the Netts limit you can set your own, lower limits — to keep spending under control or restrict individual products:

  • Your own overall limit — the total you allow yourself to owe, below the Netts limit.
  • A product limit — how much one product may use, for example energy_5m.

Your limits never add credit. Product limits do not add up: with a Netts limit of 50 USD, product limits of 50 USD for energy_1h and 50 USD for energy_5m still share 50 USD of account-level credit. The order check applies every relevant limit, and limits shows for each product how much can currently be spent.

A limit can count:

periodWhat is counted
outstandingunpaid charges, plus accepted orders not recorded yet
daycharges of the current UTC day, paid ones included, plus accepted orders not recorded yet
weekcharges of the current UTC week from Monday 00:00 UTC, paid ones included, plus accepted orders not recorded yet
orderthe amount of a single new order

A payment reduces your debt but does not reset the day's or week's usage. Credit from an overpayment is shown as creditApplied and counts once against your overall debt; it does not add to each product limit.

Your limits are in the currency of the Netts limit and cannot be higher than it. If Netts lowers its limit below one of yours, the lower applicable constraint remains in force.

Products: energy_1h, energy_5m, bandwidth, activation, aml_check.

API key permissions ​

Each API key needs a permission for this section. Your Netts manager grants it per key:

PermissionAllows
billing.readaccount, rate, limits, usage, invoices and payments
limits.writecreating, changing, switching off and on your own limits

Without the permission the endpoint answers 403 with billing_read_required or forbidden. The key's IP whitelist applies as for every other endpoint. These endpoints stay available when the deposit balance is zero.

Endpoints ​

EndpointWhat it does
GET /apiv2/billing/accountcredit limit, debt and what is available now
GET /apiv2/billing/rateyour current rate of TRX to the currency of your contract
GET /apiv2/billing/limitsall limits with used and available amounts, available per product
POST /apiv2/billing/limitscreate, change, switch off and on your own limits
GET /apiv2/billing/usagecharge components, linked to their orders
GET /apiv2/billing/invoicesinvoices, one invoice with its charges
GET /apiv2/billing/paymentspayments and credit

Response format ​

json
{ "success": true, "data": { }, "timestamp": "2026-10-19T20:12:30+00:00" }

An error from the service:

json
{
  "success": false,
  "error": { "code": "postpaid_required", "message": "this account has no postpaid billing" },
  "timestamp": "2026-10-19T20:12:30+00:00"
}

A missing or invalid key, or a request from an IP outside the key's whitelist, is refused by the API gateway before it reaches the service, with 401:

json
{ "detail": { "code": -1, "msg": "Invalid or missing API key" } }

Code -2 with "Invalid API key or IP not in whitelist" means the IP is not in the key's whitelist. More than 10 requests per second or 300 per minute from one IP are refused with 429 and {"message": "API rate limit exceeded"}.

HTTPcodeMeaning
400invalid_request, invalid_amount, idempotency_key_required, invalid_idempotency_keya parameter is missing or has a wrong format
403postpaid_requiredthe account has no postpaid billing
403postpaid_disabledpostpaid billing is paused: you can read, but not change limits
403billing_read_required, forbiddenthe key lacks billing.read or limits.write
403netts_limit_readonlythe limit is set by Netts and cannot be changed
404not_foundno such limit or invoice on your account
409revision_conflictthe limit was changed meanwhile — read it again
409limit_existsyou already have a limit for this product and period
409idempotency_conflictthe Idempotency-Key was used with another request
409no_account_limitthe account has no credit limit set by Netts yet
422above_account_limitthe value is higher than the Netts limit
422product_not_postpaidthe product is not available on postpaid
422unit_mismatchthe currency of the Netts limit changed — set a new value before switching your limit on
503unavailabletemporarily unavailable — retry later
503rate_unavailableyour rate is temporarily unavailable — retry later