Link bank account
const url = 'https://api.banklink.co.za/v1/link';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"bankId":"fnb","credentials":{"username":"12345678","password":"s3cr3t"},"saveCredentials":true,"syncTransactions":false,"nickname":"FNB Business Account"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.banklink.co.za/v1/link \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "bankId": "fnb", "credentials": { "username": "12345678", "password": "s3cr3t" }, "saveCredentials": true, "syncTransactions": false, "nickname": "FNB Business Account" }'Links a bank account by verifying the provided credentials against the
bank portal. On success, creates a bank_profile entry and returns the
profile ID and account number. The link completes in a single call.
By default only the login is checked and no transactions are read. Set
syncTransactions to also fetch the account’s transactions in the same
login and store them, as a manual sync would.
Supported bank IDs: fnb, absa, nedbank, standard_bank, discovery.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Identifier of the bank to link
Example
fnbBank-specific login credentials as key-value pairs
(e.g. for FNB: { username, password }).
object
Example
{ "username": "12345678", "password": "s3cr3t"}Set false to connect without storing login credentials. Provide fresh credentials on every subsequent sync.
Also fetch and store the account’s transactions while linking. Without it, the link only verifies the login.
Optional display name for the account (defaults to the bank ID)
Example
FNB Business AccountResponses
Section titled “Responses”Link result. The type field distinguishes between outcomes:
success— account linked successfullyerror— credential verification failed
object
object
ID of the newly created bank profile
Bank account number, if learned while linking. Omitted when not yet available.
Only when syncTransactions was set. Number of new transactions stored.
Only when syncTransactions was set. The account is linked, but its transactions could not be stored; sync it again later.
object
Human-readable reason for the failure
Example
{ "data": { "type": "success", "profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "account_number": "62012345678", "synced": 42 }}Missing or invalid request fields
object
object
Machine-readable error code
Human-readable error description
Example
{ "error": { "code": "not_found", "message": "Account not found" }}Missing or invalid API key
object
object
Machine-readable error code
Human-readable error description
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key" }}