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
- 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.
- 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.
- 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.
- 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
settlementin 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:
{
"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:
period | What is counted |
|---|---|
outstanding | unpaid charges, plus accepted orders not recorded yet |
day | charges of the current UTC day, paid ones included, plus accepted orders not recorded yet |
week | charges of the current UTC week from Monday 00:00 UTC, paid ones included, plus accepted orders not recorded yet |
order | the 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:
| Permission | Allows |
|---|---|
billing.read | account, rate, limits, usage, invoices and payments |
limits.write | creating, 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
| Endpoint | What it does |
|---|---|
GET /apiv2/billing/account | credit limit, debt and what is available now |
GET /apiv2/billing/rate | your current rate of TRX to the currency of your contract |
GET /apiv2/billing/limits | all limits with used and available amounts, available per product |
POST /apiv2/billing/limits | create, change, switch off and on your own limits |
GET /apiv2/billing/usage | charge components, linked to their orders |
GET /apiv2/billing/invoices | invoices, one invoice with its charges |
GET /apiv2/billing/payments | payments and credit |
Response format
{ "success": true, "data": { }, "timestamp": "2026-10-19T20:12:30+00:00" }An error from the service:
{
"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:
{ "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"}.
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request, invalid_amount, idempotency_key_required, invalid_idempotency_key | a parameter is missing or has a wrong format |
| 403 | postpaid_required | the account has no postpaid billing |
| 403 | postpaid_disabled | postpaid billing is paused: you can read, but not change limits |
| 403 | billing_read_required, forbidden | the key lacks billing.read or limits.write |
| 403 | netts_limit_readonly | the limit is set by Netts and cannot be changed |
| 404 | not_found | no such limit or invoice on your account |
| 409 | revision_conflict | the limit was changed meanwhile — read it again |
| 409 | limit_exists | you already have a limit for this product and period |
| 409 | idempotency_conflict | the Idempotency-Key was used with another request |
| 409 | no_account_limit | the account has no credit limit set by Netts yet |
| 422 | above_account_limit | the value is higher than the Netts limit |
| 422 | product_not_postpaid | the product is not available on postpaid |
| 422 | unit_mismatch | the currency of the Netts limit changed — set a new value before switching your limit on |
| 503 | unavailable | temporarily unavailable — retry later |
| 503 | rate_unavailable | your rate is temporarily unavailable — retry later |