ThoughtAPI

Docs FNB FNB bank APIs Transaction History

Status codes and errors

Every HTTP status the Transaction History documents mention, the error body shapes, and a retry policy for each.

Base URL
https://api.fnb.co.za/apigateway
Version
OpenAPI 1.0.5
Auth
OAuth 2.0 bearer token
Status
Live

Please note: This page is our own understanding of an FNB API, written in our own words. It is not FNB's official documentation. See Copyright and disclaimer.

At a glance#

The Spec (section 2.1, p10) and the OpenAPI each list status codes, and the two lists differ slightly. This table combines them so your client handles all of them.

Status Listed in Meaning What to do
200 Spec, OpenAPI Success. The body holds entry[] and groupHeader. Process the page.
204 Spec, Manual The bank has the request but has not finished checking and processing it. Retry later with the same X-Idempotency-ID, with a bounded number of attempts.
400 Spec, OpenAPI The request failed technical validation. Fix the request. Do not retry unchanged.
401 Spec, OpenAPI The access token is no longer valid; get a new one. Refresh the token once and retry. If refresh fails, alert a human.
403 Spec, OpenAPI Your client may not use this service. Do not retry. Check the subscription, the selected accounts and any third-party consent.
404 Spec Nothing exists at that address. Check the base URL and path.
406 OpenAPI Not Acceptable. Send Accept: application/json.
423 OpenAPI Labelled "Too Many Requests", the same as 429. Treat like 429 until the bank confirms. See known issues.
429 Spec, OpenAPI Rate limit reached. Back off exponentially and retry. Honour Retry-After if present.
500 Spec, OpenAPI The server hit an unexpected condition. Retry with backoff, a limited number of times.
503 Spec The service is down for now. Retry with backoff.

204 No Content#

204 is about the request, not about a transaction. The Manual (p5 and p6) explains it as: your request was accepted, but its result is not ready to collect yet.

We recommend:

  • Retry the identical request (same URL, same X-Idempotency-ID, new X-Request-ID).
  • Wait a few seconds, then longer each time, for example 2, 4, 8, 16 and 30 seconds.
  • Stop after a fixed number of attempts and try the window again on the next poll.

Open question: whether a date range with no entries can also come back as 204 rather than 200 with an empty list. If it can, an unbounded retry would never end, which is why the attempts above are capped.

Error bodies#

The OpenAPI defines two shapes.

For 400 and 500, a detailed body:

{
  "code": "EXAMPLE_CODE",
  "id": "example-id",
  "message": "Example message",
  "errors": [ { "code": "EXAMPLE_FIELD_CODE", "source": "fromDate", "details": "Example detail" } ]
}

For 401, 403, 406, 423 and 429, a message only:

{ "message": "Example message" }

The documents do not list the possible code values. Log the whole body together with your X-Request-ID, and match on the HTTP status rather than on message text.

A retry policy you can copy#

Situation Retry? How
204 Yes, bounded Same idempotency ID, growing delay, about 5 attempts
401 Once After a successful token refresh
423, 429 Yes Exponential backoff with jitter, honour Retry-After
500, 503, timeouts, connection errors Yes, bounded Exponential backoff with jitter
400, 403, 404, 406 No Fix configuration or request, alert

Always reuse the same X-Idempotency-ID when retrying the same logical request, as the OpenAPI asks.

Changelog#

  • 2026-12-01: Copyright and disclaimer notice added.
  • 2026-12-01: Addresses now have no trailing slash.
  • 2026-11-30: Status meanings and quoted passages rewritten in our own words.
  • 2026-11-29: First version.

Updated 2026-12-01