List completed billing-period statements
GET
/wallet/period-statements
const url = 'https://api.nsin.ir/wallet/period-statements';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/period-statements \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” subscription_id
integer
limit
integer
Responses
Section titled “ Responses ”Completed statements, newest first.
Media type application/json
Array<object>
One billing period’s cost. For the period in progress the traffic figures are a running estimate.
object
id
integer
subscription_id
integer
plan_id
integer
plan_name
string
plan_term_id
integer
billing_duration_days
integer
quota_reset_days
integer
period_start
string
period_end
string
plan_price_rials
integer
traffic_cached_bytes
integer
traffic_proxied_bytes
integer
traffic_direct_bytes
integer
traffic_bypass_bytes
Legacy two-tier column, on historical periods only.
integer
traffic_charged_rials
integer
by_domain
Array<object>
object
domain
string
cached_bytes
integer
proxied_bytes
integer
direct_bytes
integer
estimated_charged_rials
integer
Example generated
[ { "id": 1, "subscription_id": 1, "plan_id": 1, "plan_name": "example", "plan_term_id": 1, "billing_duration_days": 1, "quota_reset_days": 1, "period_start": "example", "period_end": "example", "plan_price_rials": 1, "traffic_cached_bytes": 1, "traffic_proxied_bytes": 1, "traffic_direct_bytes": 1, "traffic_bypass_bytes": 1, "traffic_charged_rials": 1, "by_domain": [ { "domain": "example", "cached_bytes": 1, "proxied_bytes": 1, "direct_bytes": 1, "estimated_charged_rials": 1 } ] }]Missing, malformed, revoked or expired API key — or the owning account is inactive.
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"}