Get the domain's current subscription
const url = 'https://api.nsin.ir/domains/example.com/subscription';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/domains/example.com/subscription \ --header 'Authorization: Bearer <token>'The active subscription, its period statement, its invoices and the
wallet movements tied to it. Returns null when the domain has no
subscription. Readable by shared members, not only the owner.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”Current subscription, or null.
object
A plan attached to one domain. Entitlements are not read from the
plan directly — use GET /domains/{domain}/features, which resolves any
per-subscription overrides.
object
The plan this subscription is on.
object
The billing term purchased.
object
For example active, expired, grace or cancelled.
Traffic-allowance reset cadence, frozen at purchase time so later plan changes cannot shift an existing subscriber’s quota window.
The free trial granted at signup. Downgrades to the free plan on expiry rather than entering grace.
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
object
Human-facing invoice number, sequential per Jalali year.
object
Wallet movements belonging to this subscription — the purchase debit, renewal debits and any refunds of its invoices — newest first. Empty when the term was never paid from the wallet.
object
Signed — positive credits, negative debits.
What the row refers to — payment, subscription, traffic or manual.
Payment gateway reference, for top-ups.
Set on traffic charges.
Set on traffic charges.
Example
{ "invoices": [ { "kind": "subscription", "status": "paid" } ], "transactions": [ { "type": "topup" } ]}Missing domain.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}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"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only 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"}