Skip to content

Get limits

GET/limits

The platform's limits, the workspace's own spending limits and what they have used.

Sandbox: test money only. No request moves real money.

Authenticate with your sandbox key as a bearer token: Authorization: Bearer nbk_test_....

Needs limits:read. The platform's limits are set by Nasfam and count Africa/Lagos days whatever the workspace zone. The workspace's limits count commitments: an order reserves its charge when it is accepted and gives it back only when it is released (failed with evidence, or never submitted). enforced is true only for a blocking limit while enforcement is on, in a USD workspace. An order a limit refuses answers 422 spending_limit_reached. Amounts are micro-dollars (1 USD = 1,000,000) as integer strings.

Request

HeaderValueSent
AuthorizationBearer nbk_test_...Required

No Idempotency-Key is needed: a read changes nothing, so it is safe to send again.

The request in cURL, JavaScript and Python
GET /v1/limitsSandbox, test key
const response = await fetch('https://sandbox-api.nasfampay.com/v1/limits', {  headers: {    Authorization: `Bearer ${process.env.NASFAM_SANDBOX_KEY}`,  },});if (!response.ok) {  const problem = await response.json();  throw new Error(`${problem.status} ${problem.code}: ${problem.title} (request ${problem.request_id})`);}const result = await response.json();console.log(response.status, result);
Code for Request
GET /v1/limitsSandbox, test key
// npm install axiosimport axios from 'axios';try {  const { status, data: limits } = await axios.get(    'https://sandbox-api.nasfampay.com/v1/limits',    {      headers: {        Authorization: `Bearer ${process.env.NASFAM_SANDBOX_KEY}`,      },    },  );  console.log(status, limits);} catch (error) {  if (!axios.isAxiosError(error) || !error.response) throw error;  const problem = error.response.data;  throw new Error(`${problem.status} ${problem.code}: ${problem.title} (request ${problem.request_id})`);}

Responses

StatusMeaningBody
OK200Limits. Headers: RateLimit (draft-ietf-httpapi-ratelimit-headers-11. the same buckets, each "<bucket>";r=<whole requests remaining, never negative>;t=<seconds until the quota is fully available again>. ), RateLimit-Policy (draft-ietf-httpapi-ratelimit-headers-11. a structured field list with one item per bucket the request drew on (orders, quotes, quotes_daily, reads, webhooks, lookups, lookups_org, lookups_daily), each "<bucket>";q=<quota>;w=<window seconds>. no partition key (pk) is sent. ).Limits object
Too many requests429Too many requests (rate_limited), or your queued orders are at your cap (queue_limit). A bucket that cannot be read at once because of contention is answered here too, never waited on. Honour Retry-After. . Headers: Request-Id, Retry-After (seconds to wait before retrying), RateLimit (draft-ietf-httpapi-ratelimit-headers-11. the same buckets, each "<bucket>";r=<whole requests remaining, never negative>;t=<seconds until the quota is fully available again>. ), RateLimit-Policy (draft-ietf-httpapi-ratelimit-headers-11. a structured field list with one item per bucket the request drew on (orders, quotes, quotes_daily, reads, webhooks, lookups, lookups_org, lookups_daily), each "<bucket>";q=<quota>;w=<window seconds>. no partition key (pk) is sent. ).Problem object
Any other statusdefaultError (RFC 9457). A 503 service_unavailable with Retry-After means the request was not processed: the rate limiter or the database could not answer, and the API refuses rather than serve unlimited (reads included). For a money-moving operation, retrying with the same Idempotency-Key is always safe. . Headers: Request-Id, Retry-After (on 429 and some 503 responses).Problem object

The limits object

FieldDescription
As ofas_of · string · requiredFormat date-time.
Timezonetimezone · string · requiredThe zone the workspace's own limits count days and months in.
Enforcementenforcement · object · required
Blockenforcement.block · boolean · required
Notifyenforcement.notify · boolean · required
Periodperiod · object · required
Day startperiod.day_start · string · requiredFormat date-time.
Day endperiod.day_end · string · requiredFormat date-time.
Month startperiod.month_start · string · requiredFormat date-time.
Month endperiod.month_end · string · requiredFormat date-time.
Usedused · object · required
Used in the current dayused.today_micros · string · requiredAn integer number of micro-dollars (1 USD = 1,000,000), as a string. Every price is a whole number of cents. Pattern ^(0|[1-9][0-9]{0,15})$.
Used in the current monthused.this_month_micros · string · requiredAn integer number of micro-dollars (1 USD = 1,000,000), as a string. Every price is a whole number of cents. Pattern ^(0|[1-9][0-9]{0,15})$.
Platformplatform · object · required
Per order microsplatform.per_order_micros · string · requiredAn integer number of micro-dollars (1 USD = 1,000,000), as a string. Every price is a whole number of cents. Pattern ^(0|[1-9][0-9]{0,15})$.
Daily microsplatform.daily_micros · string · requiredAn integer number of micro-dollars (1 USD = 1,000,000), as a string. Every price is a whole number of cents. Pattern ^(0|[1-9][0-9]{0,15})$.
Used in the current dayplatform.used_today_micros · string · requiredAn integer number of micro-dollars (1 USD = 1,000,000), as a string. Every price is a whole number of cents. Pattern ^(0|[1-9][0-9]{0,15})$.
Timezoneplatform.timezone · string · requiredOne of Africa/Lagos.
Resets atplatform.resets_at · string · requiredFormat date-time.
Rulesrules · array of SpendingLimit · required
IDrules[].id · string · requiredPattern ^lim_[0-9A-HJKMNP-TV-Z]{26}$.
Versionrules[].version · integer · requiredAt least 1.
Moderules[].mode · string · requiredOne of block, notify.
Windowrules[].window · string · requiredOne of order, day, month.
Productrules[].product · string or null · requiredThe product it limits, or null for every product.
Amount microsrules[].amount_micros · string · requiredAn integer number of micro-dollars (1 USD = 1,000,000), as a string. Every price is a whole number of cents. Pattern ^(0|[1-9][0-9]{0,15})$.
Enforcedrules[].enforced · boolean · required
Used microsrules[].used_micros · object, one of 2 · requiredNull for a per-order limit. Either shape 1: ; or shape 2: .
Resets atrules[].resets_at · string or null · requiredFormat date-time.

Responses are extensible: ignore fields, enum values and event types you do not know. Any other status is a Problem (see Errors).

Every kind of response
200 OKSynthetic sandbox data
{  "as_of": "2026-10-10T10:05:02Z",  "timezone": "string",  "enforcement": {    "block": true,    "notify": true  },  "period": {    "day_start": "2026-10-10T10:05:02Z",    "day_end": "2026-10-10T10:05:02Z",    "month_start": "2026-10-10T10:05:02Z",    "month_end": "2026-10-10T10:05:02Z"  },  "used": {    "today_micros": "0",    "this_month_micros": "0"  },  "platform": {    "per_order_micros": "0",    "daily_micros": "0",    "used_today_micros": "0",    "timezone": "Africa/Lagos",    "resets_at": "2026-10-10T10:05:02Z"  },  "rules": [    {      "id": "lim_01K7SAMP000000000000000001",      "version": 1,      "mode": "block",      "window": "order",      "product": null,      "amount_micros": "0",      "enforced": true,      "used_micros": "0",      "resets_at": null    }  ]}
Code for Responses
Response
JSON
200 OKSynthetic sandbox data
{  "as_of": "2026-10-10T10:20:00.000Z",  "timezone": "Africa/Lagos",  "enforcement": {    "block": true,    "notify": true  },  "period": {    "day_start": "2026-10-09T23:00:00.000Z",    "day_end": "2026-10-10T23:00:00.000Z",    "month_start": "2026-09-30T23:00:00.000Z",    "month_end": "2026-10-31T23:00:00.000Z"  },  "used": {    "today_micros": "750000",    "this_month_micros": "750000"  },  "platform": {    "per_order_micros": "500000000",    "daily_micros": "2000000000",    "used_today_micros": "750000",    "timezone": "Africa/Lagos",    "resets_at": "2026-10-10T23:00:00.000Z"  },  "rules": [    {      "id": "lim_01K7SAMP000000000000000090",      "version": 1,      "mode": "block",      "window": "day",      "product": null,      "amount_micros": "100000000",      "enforced": true,      "used_micros": "750000",      "resets_at": "2026-10-10T23:00:00.000Z"    }  ]}
Error
JSON
429 Too Many RequestsSynthetic sandbox data
{  "type": "about:blank",  "title": "Too many requests",  "status": 429,  "code": "rate_limited",  "category": "rate_limit",  "detail": "Too many requests. Retry after the time in Retry-After.",  "param": null,  "request_id": "req_01K7SAMP000000000000000090"}

How it behaves

What to expect
AuthenticationYour key as a bearer token in the Authorization header: a nbk_test_ key on the sandbox host.
IdempotencyNot needed: a GET changes nothing, so it is safe to send again.
In the sandboxServed, on your own test records.
On LiveThe same request, on the Live host with a live key, which exists only for a workspace activated for Live. See Go live.
FundingNone. This request does not touch your balance.
Status changesNone.
Webhook eventsNone.

Error responses

Any request can answer with invalid_request, invalid_api_key, key_expired, key_environment_mismatch, insufficient_scope, rate_limited, service_unavailable, internal_error. Errors says what to do about each one.