Get the current billing-period statement
const url = 'https://api.nsin.ir/wallet/period-statement';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-statement \ --header 'Authorization: Bearer <token>'A live estimate for the billing period in progress: plan price plus traffic accrued so far, per domain.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Which subscription’s period to report. Defaults to the current one.
Responses
Section titled “ Responses ”Period statement.
One billing period’s cost. For the period in progress the traffic figures are a running estimate.
object
Legacy two-tier column, on historical periods only.
object
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.
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"}