Transaction History API (FNB)
A plain-language guide to FNB's own Transaction History API, one read-only call that returns the entries booked to an account for a date range, page by page.
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.
Overview#
This is FNB's API, not ours. We wrote this guide because we integrate with it and wanted one clear page for the next developer, human or AI. It is based on the three documents the bank supplies to subscribers:
| Short name | Document |
|---|---|
| Manual | API Transaction History Product Configuration Manual, FNB SA, version 04 (6 pages) |
| Spec | API Transaction History Message Specification, FNB SA, version 03 (12 pages) |
| OpenAPI | Transaction-History-OpenAPI, OpenAPI 3.0.1, API version 1.0.5 |
plus the public catalogue page. Section and page numbers below point into those documents.
Honesty note. As of 2026-11-29 we have read the documents closely but have not yet called the live integration environment. Anything the documents do not settle is marked open question, and anything we infer is marked our reading. We will update these pages, and say so, once we have tested.
The good news first: the API is small and sensible. One GET, JSON in and out, ISO 20022 field names, standard OAuth 2.0, cursor pagination and a running balance on every entry. That running balance makes it possible to check that no entry was missed, which many bank feeds do not offer.
In one paragraph#
You subscribe on FNB's Integration Channel and get a client ID and secret. You obtain an OAuth 2.0 access token (authorisation code flow, then refresh tokens). You call GET /transaction-history/retrieve/v2/{accountNumber} with a fromDate and toDate, plus two UUID headers. You get back a list of entries and a pagination block. If lastPageIndicator is false, call again with lastItemKey to get the next page of the same range. There are no webhooks; you poll.
Detail pages#
Servers#
From the OpenAPI servers list (a localhost entry is also listed, for the bank's own use):
| Environment | Base URL |
|---|---|
| Integration (testing) | https://api.i.fnb.co.za/apigateway |
| Pre-production | https://api.p.fnb.co.za/apigateway |
| Production | https://api.fnb.co.za/apigateway |
The endpoint#
GET /transaction-history/retrieve/v2/{accountNumber}#
Return the entries booked to one account within a date range, one page at a time.
Auth Bearer access token from the OAuth 2.0 token endpoint
| Name | In | Type | Description |
|---|---|---|---|
accountNumber required | path | string, up to 23 characters | The account to read. One account per call. Must not be only zeros or spaces (Spec 1.5.2). |
fromDate required | query | date, YYYY-MM-DD | First date of the range, inclusive. The Spec lists it as required; the OpenAPI marks it optional. Always send it. |
toDate required | query | date, YYYY-MM-DD | Last date of the range, inclusive (our reading). Always send it. |
lastItemKey | query | string, up to 15 characters | Leave out on the first call. On later calls, send the lastItemKey from the previous response to get the next page of the same range. |
X-Request-ID required | header | uuid | A new UUID for every HTTP request. Echoed back as X-Correlation-ID. |
X-Idempotency-ID required | header | uuid | A UUID for the logical request. Reuse the same value when you retry that request. |
Authorization required | header | string | Bearer followed by the access token. |
Request
curl "https://api.i.fnb.co.za/apigateway/transaction-history/retrieve/v2/<account-number>?fromDate=2026-11-01&toDate=2026-11-07" \
-H "Authorization: Bearer <access-token>" \
-H "X-Request-ID: 3f2a9c1e-0000-4000-8000-000000000001" \
-H "X-Idempotency-ID: 3f2a9c1e-0000-4000-8000-0000000000aa" \
-H "Accept: application/json"
Response
{
"entry": [
{
"entryId": "EXAMPLE0001",
"bookingDate": { "Date": "2026-11-02" },
"valueDate": { "Date": "2026-11-02" },
"entryDetails": {
"transactionDetails": {
"remittanceInfo": { "unstructured": "EXAMPLE INVOICE 1001" },
"reference": { "endToEndId": "EXAMPLE-E2E-1" }
}
},
"amount": { "amount": "1500.00", "currency": "ZAR" },
"creditDebitIndicator": "CREDIT",
"availability": {
"amount": "11500.00",
"currency": "ZAR",
"creditDebitIndicator": "CREDIT"
}
}
],
"groupHeader": {
"pagination": { "lastPageIndicator": true, "lastItemKey": "EXAMPLEKEY01" }
}
}
| Status | Meaning |
|---|---|
204 | Received but still being processed. Try again later with the same X-Idempotency-ID. |
400 | The request failed validation. Body has code, id, message and errors[]. |
401 | Token no longer valid. Refresh it and retry once. |
403 | Not allowed for this service or account. Check the subscription. |
404 | Resource not found at this address (Spec only). |
406 | Not acceptable (OpenAPI only). |
423 | Listed in the OpenAPI with the description "Too Many Requests". Treat like 429 until the bank confirms. |
429 | Too many requests. Back off and retry. |
500 | Unexpected server error. Retry with backoff. |
503 | Service unavailable (Spec only). Retry with backoff. |
All example values are invented. The response header X-Correlation-ID carries the X-Request-ID you sent, which is useful when you raise a query with the bank.
Response fields#
Field names are ISO 20022 style. Note the capital D in Date. Paths are relative to one item of entry[] unless they start with groupHeader.
| Field | Type | Meaning, in plain words |
|---|---|---|
entryId |
text, up to 15 | The bank's label for the entry. Not unique: the Spec notes that the same value may occur more than once in one date range (Spec 1.6, p6). Do not use it as a key on its own. |
bookingDate.Date |
date | The day the entry was posted to the account's books. |
valueDate.Date |
date | The day the money became available (credit) or stopped being available (debit). Can differ from bookingDate. |
entryDetails.transactionDetails.remittanceInfo.unstructured |
text, up to 30 | The reference shown on the statement, usually what the payer typed. When money is paid into an FNB account of type LOAN, TRNS, SBSH or GRCP, the bank uses just the first 20 of those characters (Spec p7). |
entryDetails.transactionDetails.reference.endToEndId |
text, up to 20 | An ID set by whoever started the payment and passed through unchanged. Whether it is filled in for incoming payments from other banks is an open question. |
amount.amount |
decimal string | The entry's value, unsigned (the OpenAPI pattern has no minus sign). Up to 13 digits with 2 decimals (Spec p8). Parse it as an exact decimal, never as a float. |
amount.currency |
text, 3 | ISO 4217 code, for example ZAR. |
creditDebitIndicator |
CREDIT or DEBIT |
Money in or money out. The sign lives here, not in amount. |
availability.amount |
decimal string | The available balance after this entry, as a positive number. |
availability.currency |
text, 3 | Currency of that balance. |
availability.creditDebitIndicator |
CREDIT or DEBIT |
Whether the balance is in credit or overdrawn. A zero balance is reported as CREDIT (Spec p9). |
groupHeader.pagination.lastPageIndicator |
boolean | true on the last page of this date range. |
groupHeader.pagination.lastItemKey |
text, up to 15 | Send this back as the lastItemKey query parameter to get the next page. |
What the response does not contain#
The documents describe no transaction status (pending, cleared, reversed), no transaction type or channel (EFT, real-time, cash), no payer name or account, no time of day, and no link between a reversal and the entry it undoes. Plan your matching around the reference, amount, dates and running balance.
FNB's Statements API does carry some of these: an ISO bank transaction code that classifies each entry, the debtor's name, and a bank reference that its Spec describes as unique. It returns booked entries only. We have not integrated it, but it is worth knowing about if you need those fields.
Gotchas worth knowing on day one#
- Store every entry once, using your own key.
entryIdrepeats, and overlapping polls return the same entries again. A content hash of the entry plus an occurrence counter for exact duplicates on the same day works well. - Re-read recent days. Pagination is not a "changes since" feed: the Spec makes clear that
lastItemKeycannot be used to fetch only what is new since an earlier call (p9). Poll an overlapping window (for example the last 3 days) and deduplicate. - Use the running balance as a check. For consecutive entries, previous
availabilityplus or minus thisamountshould equal thisavailability. A mismatch means a missed or reordered entry. - Retry 204, but not forever. See Status codes and errors.
- Reversals show as new entries (our reading). Nothing in the documents says an entry is ever edited or removed, so an undone credit most likely appears later as a separate
DEBIT. The bank's EFT Domestic Payments Spec supports this for outgoing batches: a failed payment in a consolidated batch comes back as a separate reversal entry. - Refresh tokens can run out. When they do, the documents say the subscription step must be repeated (Manual p4). Alert a human rather than failing quietly.
Changelog#
- 2026-12-01: Copyright and disclaimer notice added.
- 2026-12-01: Pointer to the Statements API for transaction type, payer name and a unique bank reference. Addresses now have no trailing slash. Reversal note supported by the EFT Domestic Payments Spec.
- 2026-11-30: Quoted passages from the bank documents rewritten in our own words.
- 2026-11-29: First version.
Updated 2026-12-01