Statements API (FNB)
A plain-language guide to FNB's Statements API, one read-only call that returns a statement for one account and date range, with opening and closing balances, transaction type codes and the payer's name.
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, and we have not integrated it yet. We use Transaction History today. We wrote this page because the bank shared the Statements documents with us, and because Statements carries several things Transaction History does not, so the next developer can decide which one fits.
It is based on the three documents the bank supplies to subscribers:
| Short name | Document |
|---|---|
| Manual | API Statement Product Configuration Manual, FNB SA, version 03 (6 pages) |
| Spec | API Statements Message Specification, FNB SA, version 03 (17 pages) |
| OpenAPI | Realtime Statements Execution, OpenAPI 3.0.1, API version 1.0.11 |
Page numbers below point into those documents. Nothing here has been checked against the live API; anything the documents leave open is marked open question, and anything we infer is marked our reading.
What it does#
You send one account number and a date range, and the bank returns a statement for that range in JSON, shaped after the ISO 20022 camt.053 bank-to-customer statement message (Manual p4, Spec 1.1). The statement has:
- the account it belongs to, with the account type, currency, account name, owner name and the bank's BIC;
- an opening and closing booked balance for the range (Spec 1.2);
- the entries booked in the range, each with its amount, dates, a bank reference, an ISO bank transaction code that classifies the transaction, and transaction details including the debtor's name.
The bank says it returns booked entries only, and every entry carries a status code that defaults to BOOK (Spec p10). One statement covers one account; the bank notes that it does not combine several accounts into one statement (Spec 1.2).
Who can use it#
- Business, commercial, corporate and investment clients in South Africa, Lesotho, Zambia, Eswatini and Botswana (Manual p2).
- Transact, credit and savings accounts (Manual p2). That is wider than Transaction History, whose Manual mentions transact accounts only.
- Onboarding is the same as for the bank's other APIs: subscribe on the Integration Channel in Online Banking Enterprise, unassisted or with help from your bank team, and connect either on your own behalf or through a third party that you give consent to (Manual p2 and p3). See How access works.
Environments#
The OpenAPI lists three servers, the same hosts as Transaction History:
| Environment | Base URL |
|---|---|
| Integration (test) | https://api.i.fnb.co.za/apigateway |
| Pre-production | https://api.p.fnb.co.za/apigateway |
| Production | https://api.fnb.co.za/apigateway |
Authentication#
The documents describe two different flows, so please confirm with the bank which one applies to your subscription (see ST-01):
- The Manual (p3 and p4) describes the same model as Transaction History: a client ID and secret from the subscription, signed JWTs for client authentication, and OAuth 2.0 with the authorisation code flow, then a refresh token. If the refresh token expires, the subscription is repeated.
- The OpenAPI declares OAuth 2.0 with the client credentials grant, with the token URL
https://api.fnb.co.za/apigateway/oauth2/token/v2and the scopei_can.
Either way, the call itself carries Authorization: Bearer <access-token>. The token endpoint path matches the one in the Transaction History OpenAPI, so the Transaction History authentication guide applies here too.
The endpoint#
POST /statements/retrieveStatement/v1/#
Return the statement for one account and date range, with opening and closing booked balances and the booked entries.
Auth Bearer access token from the OAuth 2.0 token endpoint
| Name | In | Type | Description |
|---|---|---|---|
X-Request-ID required | header | uuid (version 4) | A new UUID for every request, used to trace the interaction. |
Authorization required | header | string | Bearer followed by the access token. |
accountId required | body | string | The account to read. One account per call (our reading of Spec 1.2). |
fromDate required | body | date, YYYY-MM-DD | First date of the statement range. The OpenAPI does not mark it required; always send it. |
toDate required | body | date, YYYY-MM-DD | Last date of the statement range. Always send it. |
Request
curl -X POST "https://api.i.fnb.co.za/apigateway/statements/retrieveStatement/v1/" \
-H "Authorization: Bearer <access-token>" \
-H "X-Request-ID: 6b1d2e3f-0000-4000-8000-000000000001" \
-H "Content-Type: application/json" \
-d '{"accountId": "<account-number>", "fromDate": "2026-11-01", "toDate": "2026-11-07"}'
Response
{
"groupHeader": {
"messageId": "EXAMPLE-MSG-0001",
"creationDateTime": "2026-11-08",
"pageNumber": 1,
"lastPageIndicator": true
},
"statement": {
"statementNumber": 11,
"sequenceNumber": "00011",
"creationDateTime": "2026-11-08",
"fromDateTime": "2026-11-01",
"toDateTime": "2026-11-07",
"account": {
"typeCode": "CACC",
"currency": "ZAR",
"name": "EXAMPLE ACCOUNT",
"accountNumber": "<account-number>",
"ownerName": "EXAMPLE (PTY) LTD",
"servicer": { "institutionName": "FIRNZAJJXXX", "institutionCountry": "ZA" }
},
"balance": [
{ "typeCode": "OPDB", "amountValue": 10000.00, "amountCurrency": "ZAR", "creditDebitIndicator": "CRDT", "date": "2026-11-01" },
{ "typeCode": "CLDB", "amountValue": 11500.00, "amountCurrency": "ZAR", "creditDebitIndicator": "CRDT", "date": "2026-11-07" }
],
"entry": [
{
"amountValue": 1500.00,
"amountCurrency": "ZAR",
"creditDebitIndicator": "CRDT",
"statusCode": "BOOK",
"bookingDateTime": "2026-11-02",
"valueDate": "2026-11-02",
"servicerReference": "EXAMPLE-BANK-REF-0001",
"bankTransactionCode": { "domainCode": "PMNT", "domainFamilyCode": "RCDT", "domainSubFamilyCode": "DMCT" },
"transactionDetails": {
"referenceEndToEndId": "EXAMPLE INVOICE 1001",
"amountValue": 1500.00,
"amountCurrency": "ZAR",
"creditDebitIndicator": "CRDT",
"relatedPartyDebitorName": "EXAMPLE PAYER"
}
}
]
}
}
| Status | Meaning |
|---|---|
204 | Received but still being processed by the bank. Try again later (Manual p5, Spec 2.1). |
400 | The request failed technical validation. |
401 | The access token has expired. Get a new access token (with the refresh token, or a new client credentials request, depending on the flow), then retry. |
403 | The client is not authorised for this service, or for this account. |
404 | Nothing was found at the endpoint that was called. |
429 | Too many requests. Back off and retry. |
500 | The bank could not process the request. |
503 | The service is unavailable. Retry later. |
All example values are our own invention. The bank transaction codes in the example are ordinary ISO 20022 codes used for illustration; the documents do not list the codes FNB actually sends. Call the path exactly as published, including the trailing slash. The OpenAPI lists only 200, 400, 401, 403 and 500; the Spec adds 204, 404, 429 and 503. Handle all of them.
The error body, per the OpenAPI, has three required fields: status (always FAILED), message and details (1 to 255 characters).
Response fields#
Field names are as in the OpenAPI; lengths and rules are from the Spec (pages 6 to 13).
| Field | Type | What it means |
|---|---|---|
groupHeader.messageId |
text, up to 35 | The bank's identifier for this message. |
groupHeader.creationDateTime |
date | When the bank produced the message. |
groupHeader.pageNumber, lastPageIndicator |
number, boolean | Paging markers. The request has no page parameter, see ST-06. |
statement.statementNumber, sequenceNumber |
text, up to 5 | Statement identifiers, set by the statement frequency configured on the account at the bank. |
statement.fromDateTime, toDateTime |
date | The range the statement covers. |
statement.account.typeCode |
code, 4 | Account type: CACC cash, LOAN loan, SVGS savings, TRAN transmission (Spec 2.2). |
statement.account.accountNumber |
text, up to 23 | The account number. |
statement.account.name, ownerName |
text, up to 20 | The account's name and its legal owner. |
statement.account.servicer.institutionName |
text, up to 11 | The bank's BIC, FIRNZAJJXXX. |
statement.balance[].typeCode |
code, 4 | OPDB opening booked balance, CLDB closing booked balance, as written in the Spec. See ST-03. |
statement.balance[].amountValue |
number, 13 digits, 2 decimals | The balance amount. |
statement.balance[].creditDebitIndicator |
CRDT or DBIT |
A zero balance counts as CRDT (Spec p9). |
statement.entry[].amountValue, amountCurrency |
number, code | The entry amount and currency. |
statement.entry[].creditDebitIndicator |
CRDT or DBIT |
Money in or out. Note the short codes, see ST-02. |
statement.entry[].statusCode |
code, 4 | Booking status, BOOK by default. |
statement.entry[].bookingDateTime |
date | The date the entry was posted to the account. |
statement.entry[].valueDate |
date | The date the funds became available (credit) or stopped being available (debit). |
statement.entry[].servicerReference |
text, up to 30 | The bank's own reference for the entry, which the Spec describes as unique. |
statement.entry[].bankTransactionCode |
three codes of up to 4 | The ISO 20022 domain, family and sub-family that classify the transaction (Spec p11). |
...transactionDetails.referenceEndToEndId |
text, up to 30 | For an itemised entry, the payer's reference or end-to-end ID. For a consolidated (batch) entry, the batch or payment information ID. Which one you get depends on the account's batch booking preference (Spec p12). |
...transactionDetails.relatedPartyDebitorName |
text, up to 35 | The name of the debtor, the party the money came from. |
...transactionDetails.counterValueAmount |
object | Only for currency conversions: the source currency and the exchange rate. |
How it compares with Transaction History#
| Transaction History | Statements | |
|---|---|---|
| Call | GET, account in the path |
POST, account in a JSON body |
| Balances | Running available balance on every entry | Opening and closing booked balance for the range |
| Transaction type | Not included | ISO bank transaction code on every entry |
| Payer name | Not included | relatedPartyDebitorName |
| Bank's entry reference | entryId, not unique |
servicerReference, described as unique |
| Credit or debit codes | CREDIT, DEBIT |
CRDT, DBIT |
| Paging | lastItemKey |
Page markers only, see ST-06 |
| Idempotency header | X-Idempotency-ID required |
Not listed |
| Accounts | Transact | Transact, credit and savings |
The bank transaction code, the payer name and a unique bank reference would all help with matching incoming payments. That makes Statements worth evaluating as a second source, or a cross-check, next to Transaction History. We have not decided this yet.
Known issues and doc clarifications#
The Statements documents are clear and follow ISO 20022 closely. As with any set of three documents written in parallel, a few details differ between them. We list them so they are easy to confirm with the bank. All are Unconfirmed.
ST-01: Authorisation code or client credentials#
- Manual p3 and p4: authorisation code flow, then refresh tokens, with a new subscription when the refresh token expires.
- OpenAPI
securitySchemes: client credentials grant, production token URL. The EFT Domestic Payments OpenAPI declares the same grant. - Recommendation: ask the bank which flow your subscription uses. A client credentials flow would suit a server-only integration well, because it needs no refresh token.
ST-02: Credit and debit codes differ from Transaction History#
- Statements uses the ISO short codes
CRDTandDBIT(Spec p9, p10, p13). Transaction History usesCREDITandDEBIT. - Recommendation: if you read both APIs, map both spellings to one internal value.
ST-03: Balance type codes#
- Spec p9: opening and closing booked balances are written
OPDBandCLDB. The ISO 20022 balance type code list usesOPBDandCLBDfor the same meanings. - Recommendation: accept both spellings until the bank confirms which one the API sends.
ST-04: transactionDetails, one or many#
- Spec p11:
transactionDetailsmay repeat (1..n). - OpenAPI:
transactionDetailsis a single object. - Recommendation: accept an object or a list.
ST-05: Small field name differences#
- The Spec writes
serviceCurrencyExchangeandbookingdateTime; the OpenAPI writesservicerCurrencyExchangeandbookingDateTime. The Spec names the header IDmessageIdentification (messageId); the OpenAPI usesmessageId. - Recommendation: use the OpenAPI names, and be tolerant when parsing.
ST-06: Page markers without a page request#
- OpenAPI:
groupHeaderhaspageNumberandlastPageIndicator, but the request has onlyaccountId,fromDateandtoDate. The Spec does not describe paging. - Open question: how to fetch page 2 when
lastPageIndicatoris false. Until confirmed, use short date ranges and treat a falselastPageIndicatoras an alert.
ST-07: Date-time fields carry dates#
- The Spec labels several fields as ISO date-time but gives the format
YYYY-MM-DD; the OpenAPI marks themformat: date. - Recommendation: parse as plain dates, and accept a full timestamp if one arrives.
ST-08: Some OpenAPI descriptions look carried over#
- A few OpenAPI descriptions seem to come from other templates: the operation description mentions trying integer IDs of 5 or less or more than 10,
accountNumberis described as a type of interest, a balance amount as a tax calculation,fromDateTimeandtoDateTimeas the message creation time, and an entry amount as a minimum reporting amount. - Recommendation: rely on the Spec's descriptions, which read correctly. This is an easy one for the bank to tidy.
ST-09: 200 described with an Instruction ID#
- Spec 2.1 (p14):
200is named "Accepted" and mentions an instruction ID, the same wording as in the Transaction History Spec (KI-14). The response has no instruction ID. - Recommendation: treat
200as a normal success with the statement in the body.
ST-10: Character set wording#
- Spec 2.3 (p16): the permitted character table counts 29 letters for both A to Z and a to z, and labels the lower-case row as capital letters. This reads as a typing slip for the 26 Latin letters in each case.
- Recommendation: keep request values to letters, digits, space and the listed punctuation.
Open questions we are asking the bank#
- Which OAuth flow applies, and what are the token lifetimes (ST-01)?
- How is a second page requested (ST-06)?
- Is
servicerReferenceunique across all entries and stable over time? - Does an empty range return
200with no entries (the Spec allows0..nentries) or204? - How far back can
fromDatego, and how soon after posting does an entry appear? - Which bank transaction codes does FNB send, for example for EFT, real-time and cash deposits?
- Is the
servicerReferencefor an entry the same as anything in Transaction History, so the two can be joined?
If you know an answer, we would be glad to hear it at info@thoughtful.co.za.
Changelog#
- 2026-12-01: Copyright and disclaimer notice added.
- 2026-12-01: First version, from the Statements Manual v03, Spec v03 and OpenAPI 1.0.11.
Updated 2026-12-01