Skip to content

One document with its charges​

GET
/billing/invoices/{invoiceId}

A document of your account with its charges as they are now (charges) and, in contract-v1, as they were when the document was issued (composition). Requires billing.read.

Authorizations​

ApiKeyAuth

API key from the dashboard. Some Host Mode endpoints also accept the key as an api_key field in the request body — this is stated in the schema of the particular operation.

Type
API Key (header: X-API-KEY)

Parameters​

Header Parameters

X-Netts-Billing-Format

The response format. contract-v1 — every amount carries its currency and every rate names its pair. legacy — the original format, unchanged. Without the header the format depends on your contract: a contract with amounts in its own currency gets contract-v1, and legacy is refused with 406 billing_format_not_available; an account set up on postpaid before contract-v1 gets legacy, and contract-v1 is enabled for it per account, otherwise 403 billing_format_not_enabled. Any other value — 400 unsupported_billing_format, before anything is changed. The header changes only how the response is written: no amount, permission or IP check changes.

Type
string
Valid values
"legacy""contract-v1"

Path Parameters

invoiceId*

The document id — not its number.

Type
integer
Required

Responses​

The invoice.

application/json
JSON
{
  
"success": true,
  
"data": {
  
  
"id": 0,
  
  
"periodStart": "string",
  
  
"periodEnd": "string",
  
  
"totalTrx": "string",
  
  
"totalUsdc": "string",
  
  
"paidUsdc": "string",
  
  
"status": "string",
  
  
"issuedAt": "string",
  
  
"dueAt": "string",
  
  
"charges": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"orderId": "string",
  
  
  
  
"productCode": "string",
  
  
  
  
"address": "string",
  
  
  
  
"quantity": 0,
  
  
  
  
"unitPriceSun": "string",
  
  
  
  
"discount": {
  
  
  
  
  
"type": "string",
  
  
  
  
  
"value": "string"
  
  
  
  
},
  
  
  
  
"amountTrx": "string",
  
  
  
  
"amountUsdc": "string",
  
  
  
  
"usdPerTrx": "string",
  
  
  
  
"quoteId": "string",
  
  
  
  
"txHash": "string",
  
  
  
  
"fulfilledAt": "string",
  
  
  
  
"status": "string",
  
  
  
  
"paidTrx": "string",
  
  
  
  
"paidUsdc": "string",
  
  
  
  
"invoiceId": 0,
  
  
  
  
"reversesId": 0
  
  
  
}
  
  
]
  
},
  
"timestamp": "string"
}

Playground​

Authorization
Headers
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI