Front end vs. back end
Every Flinks integration has two independent halves. You choose one option for each.- Front end: what the end user interacts with to connect their account, either the Flinks Connect iframe or Flinks Express. See Choose a Front-End Solution.
- Back end: how your system receives the connected data, either API requests or Webhooks. See Choose a Back-End Solution.
This page describes the standard integration: Flinks Connect on the front end plus API requests on the back end. If you want data pushed to you automatically instead of polling, see Choosing your back end below.
Prerequisites
Before you begin, make sure you have the following credentials and values. You can find these in your Flinks Dashboard or from your Flinks representative.| Value | Purpose |
|---|---|
Customer ID (customerId) | Identifies your account. Used in every API URL path. |
| Instance name | Your regionally-scoped instance (for example, sandbox vs. production). Determines your base URLs. See Instances. |
| Secret key | The unique key Flinks provides during integration. Passed in the flinks-auth-key header of /GenerateAuthorizeToken to create authorize tokens. |
| Authorize token | A single-use token generated from your secret key. Passed to Flinks Connect (URL parameter) or to /Authorize (flinks-auth-key header). |
| iframe base URL | The Flinks Connect endpoint you launch, in the form https://yourinstance-iframe.private.fin.ag/. |
End-to-end flow
The diagram below shows the standard integration happy path.Step-by-step
Generate an authorize token to launch the iframe
Call
/GenerateAuthorizeToken with your secret key in the flinks-auth-key header.- Input: secret key (header)
- Output: an authorize token that is single-use and active for 15 minutes.
authorizeToken URL parameter:URL
The end user completes Flinks Connect
The end user selects their financial institution, enters their credentials, and completes multi-factor authentication (MFA) if their bank requires it. Flinks Connect handles all bank processes, edge cases, and errors on your behalf.When the connection succeeds, capture the
loginId (and optionally an accountId) from the Flinks Connect event listener or the redirect URL.- Output:
loginId, a permanent token representing the saved connection. Store it securely on your servers; never expose it publicly.
The
loginId does not expire and is required for all future data retrieval. See Key Concepts.Generate a fresh authorize token
The token you generated in step 1 was consumed when you launched Flinks Connect. Authorize tokens are single-use, so call
/GenerateAuthorizeToken again to create a new token before calling /Authorize.- Input: secret key (header)
- Output: a fresh authorize token.
Call /Authorize in cached mode
Call In cached mode the response is
/Authorize with the loginId, passing the fresh authorize token in the flinks-auth-key header. Use cached mode (MostRecentCached: true) to open a session against the data that was just collected.Authorize
200, because the end user already completed any required authentication in the iframe.200: Authenticated. Use the returnedRequestIdto retrieve data (next step).- Output: a
RequestId, a session token used to call the data endpoints. It cannot be reused.
Retrieve account data
Send a
POST request to /GetAccountsDetail with the RequestId in the body. (Use /GetAccountsSummary if you only need summary-level data.)Handle the response by status:200: Data is ready. The response contains the full account payload.202: The operation is still processing. Poll for the result (next step). A202is expected on the initial call.
Poll on 202 until data is ready
When
/GetAccountsDetail returns 202:- Call
/GetAccountsDetailAsyncwith the sameRequestIdas a path parameter (this is aGETrequest). - If the response is
202, the data is still processing. Wait ~10 seconds, then poll again. - Repeat until you receive a
200, which contains the same payload as a200from/GetAccountsDetail. - Set a maximum timeout of 30 minutes to avoid an infinite polling loop.
/GetAccountsDetailAsync is not a separate data endpoint. It is the polling mechanism for /GetAccountsDetail. See Retrieve Account Data.Choosing your back end
This page uses API requests with polling on the back end. If you would rather have data pushed to you automatically when processing completes, without writing polling logic, set up Webhooks instead. For a side-by-side comparison of API requests vs. Webhooks, see Choose a Back-End Solution.Next steps
Set Up Authorization
Generate and pass authorize tokens correctly.
Retrieve Account Data
Full detail on the data retrieval and polling flow.
Handled Errors
Understand how Flinks reports and handles errors.
Resume and Reconnect
Re-establish a connection for a returning user.
Webhooks
Receive data automatically instead of polling.