Get wallet balance
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Responses
200Wallet.
Content type: application/json
- walletWallet
Fields
- idinteger
- user_idinteger
- balance_rialsinteger
- negative_sincestring (date-time)
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.
- created_atstring (date-time)
- updated_atstring (date-time)
- recent_invoice_idsarray of integer
Ids of your 50 newest invoices, excluding traffic statements, newest first.
- latest_invoice_idinteger
The first of
recent_invoice_ids;0when you have none.
{
"wallet": {
"id": 0,
"user_id": 0,
"balance_rials": 0,
"negative_since": "2026-01-01T00:00:00Z",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
},
"recent_invoice_ids": [
0
],
"latest_invoice_id": 0
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}Example request
curl -X GET "https://api.nsin.ir/wallet" \
-H "Authorization: Bearer $NSIN_API_KEY"