nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Billing

List invoices

gethttps://api.nsin.ir/invoices

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

Your invoices across all your domains — plan purchases, renewals, top-ups and manual invoices — newest first, each with its line items. Traffic statements are not included.

Query parameters

  • limitintegerquery

    How many invoices to return, 1–200.

    Default: 200
  • offsetintegerquery
    Default: 0

Responses

200Invoices, newest first.

Content type: application/json

  • idinteger
  • numberstring

    Human-facing invoice number, sequential per Jalali year.

  • user_idinteger
  • domain_idinteger
  • domain_namestring
  • subscription_idinteger
  • payment_idinteger
  • kindstring

    subscription — a plan purchase or renewal (taxed). period — the traffic of a closed billing period, when it had metered traffic (no VAT). topup — a wallet top-up (no VAT). manual — issued by NSIN support (taxed).

    One of: "subscription" "period" "topup" "manual"
  • statusstring
    One of: "paid" "unpaid" "cancelled"
  • subtotal_rialsinteger

    Before tax, in rials.

  • tax_rialsinteger

    VAT, in rials.

  • total_rialsinteger

    What was charged, in rials.

  • issued_atstring (date-time)
  • paid_atstring | null (date-time)
  • notesstring
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • itemsarray of InvoiceItem
    Item fields
    • idinteger
    • invoice_idinteger
    • descriptionstring
    • quantityinteger
    • unit_price_rialsinteger
    • total_rialsinteger
json
[
  {
    "id": 0,
    "number": "string",
    "user_id": 0,
    "domain_id": 0,
    "domain_name": "string",
    "subscription_id": 0,
    "payment_id": 0,
    "kind": "subscription",
    "status": "paid",
    "subtotal_rials": 0,
    "tax_rials": 0,
    "total_rials": 0,
    "issued_at": "2026-01-01T00:00:00Z",
    "paid_at": "2026-01-01T00:00:00Z",
    "notes": "string",
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-01-01T00:00:00Z",
    "items": [
      {
        "id": 0,
        "invoice_id": 0,
        "description": "string",
        "quantity": 0,
        "unit_price_rials": 0,
        "total_rials": 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.

json
{
  "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.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/invoices" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc