Skip to content
nsin docs

Get one wallet transaction

GET
/wallet/transactions/{id}
curl --request GET \
--url https://api.nsin.ir/wallet/transactions/1 \
--header 'Authorization: Bearer <token>'

The ledger row, plus — for a traffic charge — the per-domain byte and cost breakdown of that billing window. A traffic charge is billed once per account per window, summed across all your domains, so by_domain is how you attribute it.

id
required
integer

Transaction detail.

Media type application/json
object
id
integer
wallet_id
integer
user_id
integer
type

topup — money added. purchase — a plan bought or renewed. refund. admin_adjust — a correction by NSIN support. traffic_usage — a traffic charge. signup_bonus — the credit granted at signup.

string
Allowed values: topup purchase refund admin_adjust traffic_usage signup_bonus
amount_rials

Signed — positive credits, negative debits.

integer
balance_after
integer
description
string
ref_type

What the row refers to — payment, subscription, traffic or manual.

string
ref_id
integer
ref_code

Payment gateway reference, for top-ups.

string
origin_node

Internal — set on rows replicated from another NSIN region. Clients can ignore it.

string
sync_key

Internal — the replication idempotency key of a replicated row. Clients can ignore it.

string
created_at
string format: date-time
domain_id

The domain a traffic charge is attributed to. Only on rows of GET /wallet/transactions.

integer
domain_name

That domain’s name. Only on rows of GET /wallet/transactions.

string
node
string
billing_window_key

Identifies the billing window a traffic charge covers.

string
by_domain

Per-domain contribution to this charge. Traffic charges only.

Array<object>

One domain’s share of a single traffic charge.

object
domain_id
integer
domain_name
string
cached_bytes
integer
proxied_bytes
integer
direct_bytes
integer
bypass_bytes

Legacy two-tier column, on historical rows only.

integer
charged_rials
integer
cached_bytes

Total across by_domain.

integer
proxied_bytes

Total across by_domain.

integer
direct_bytes

Total across by_domain.

integer
bypass_bytes

Total across by_domain.

integer
charged_rials

Total charged across by_domain.

integer
Example
{
"type": "topup"
}

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"
}

No such transaction on this account.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only 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"
}