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

Look up a top-up payment result

gethttps://api.nsin.ir/wallet/topup-result

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

The outcome of a wallet top-up, by payment gateway authority. Reading is allowed; starting a top-up is not available to API keys.

Query parameters

  • authoritystringrequiredquery

    The payment gateway authority returned when the top-up started.

Responses

200Payment outcome.

Content type: application/json

  • statusstring
  • ref_codestring
  • amount_rialsinteger
json
{
  "status": "string",
  "ref_code": "string",
  "amount_rials": 0
}
400Missing authority.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
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"
}
404No such payment on this account.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only 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/wallet/topup-result?authority=string" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc