Skip to content
nsin docs

Get wallet balance

GET
/wallet
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.

Wallet.

Media type application/json
object
wallet
object
id
integer
user_id
integer
balance_rials
integer
negative_since

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.

string format: date-time
created_at
string format: date-time
updated_at
string format: date-time
recent_invoice_ids

Ids of your 50 newest invoices, excluding traffic statements, newest first.

Array<integer>
latest_invoice_id

The first of recent_invoice_ids; 0 when you have none.

integer
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.)

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}