Get wallet balance
const url = 'https://api.nsin.ir/wallet';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.nsin.ir/wallet \ --header 'Authorization: Bearer <token>'Your wallet balance, in rials. negative_since is set while the
balance is below zero. If it stays negative past the grace window,
paid domains are suspended; it clears as soon as the balance is
non-negative again.
Also carries the ids of your newest invoices (not traffic statements), so a client can tell when a new one has arrived without loading the invoice list.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Wallet.
object
object
When the balance first went below zero in the current debt cycle. Absent while non-negative. Staying negative past the grace window suspends paid domains.
Ids of your 50 newest invoices, excluding traffic statements, newest first.
The first of recent_invoice_ids; 0 when you have none.
Example generated
{ "wallet": { "id": 1, "user_id": 1, "balance_rials": 1, "negative_since": "2026-04-15T12:00:00Z", "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z" }, "recent_invoice_ids": [ 1 ], "latest_invoice_id": 1}Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}