Overview
Understand what a connection is, the statuses it moves through, and what to do in each one.
A connection links one of your users to their bank, or another financial institution, through the user's consent. A user can have several connections, and each connection holds its own accounts and transactions.
- How it starts: the
PSD2connection mode starts the bank's open banking consent process. Start with Creating your first connection. - When to read data: once the status is
ACTIVEorCOMPLETED, with a token for the connection owner'suserId. - How it ends: the consent expires, the user revokes it, a newer connection replaces it, or you delete it.
To choose the providers, the data and the return URL, see Connection options.
Status lifecycle
A connection first gets the user's consent, then collects data while the consent lasts. Final statuses are in the grey Ends boxes: the connection never leaves them. CONNECTED and ACTIVE are green in the first diagram because they continue in the second.
Getting consent
---
config:
flowchart:
nodeSpacing: 28
rankSpacing: 44
wrappingWidth: 400
---
flowchart TD
create(["POST /connections"]) --> INACTIVE
INACTIVE -->|user selects a bank| FETCHING
FETCHING -->|approved| CONNECTED
FETCHING -->|more signatories needed| PARTIALLY_AUTHORIZED
FETCHING -->|bank error| ERROR
CONNECTED -->|access setup failed| ERROR
ERROR -->|selects a bank again| FETCHING
PARTIALLY_AUTHORIZED -->|all signatories approved| ACTIVE
FETCHING --> ends
PARTIALLY_AUTHORIZED --> ends
ACTIVE ~~~ ends
ERROR ~~~ ends
ends["<b>Ends</b><br>REJECTED: declined at the bank<br>EXPIRED: not approved in time<br>REVOKED: revoked at the bank<br>SUSPENDED_BY_PROVIDER: bank suspended it<br>UNKNOWN: unrecognized bank status"]
classDef api fill:#ffffff,stroke:#6b7280,color:#374151
classDef next fill:#dcfce7,stroke:#15803d,color:#14532d
classDef ended fill:#f3f4f6,stroke:#6b7280,color:#374151
class create api
class CONNECTED,ACTIVE next
class ends ended
FETCHINGmeans the user chose a bank and the consent request is waiting there for approval. No data is collected in this status.ERRORbefore any data is collected means the bank refused the consent request or returned an error, or getting the bank's token or consent details failed after approval. The user can select a bank again.- For a business account,
PARTIALLY_AUTHORIZEDwaits for the other signatories. See Business accounts.
If the user picks another bank or never approves
- If the user goes back and picks a bank again, a new consent request is created and the status stays
FETCHING. - If the user never approves, the connection stays
FETCHINGuntil a scheduled refresh on a later day, at least 4 hours after it was created, marks itEXPIRED.
After consent
---
config:
flowchart:
nodeSpacing: 28
rankSpacing: 44
wrappingWidth: 320
---
flowchart TD
CONNECTED -->|first collection| run
PARTIALLY_AUTHORIZED -->|all signatories approved| run
run(["Collection run"]) --> collected["<b>Data collected</b><br>COMPLETED: refreshData false<br>ACTIVE: refreshData true<br>FETCHING_ERROR: reading data failed<br>ERROR: token or storage error"]
collected -->|scheduled refresh| run
run --> endsRun["<b>Ends</b><br>EXPIRED: consent expired<br>REVOKED: revoked at the bank"]
collected --> endsData["<b>Ends</b><br>REPLACED: newer connection<br>TERMINATED_BY_USER: deleted"]
classDef run fill:#ffffff,stroke:#6b7280,stroke-dasharray:4 3,color:#374151
classDef ended fill:#f3f4f6,stroke:#6b7280,color:#374151
class run run
class endsRun,endsData ended
Collection run, the dashed shape, is not a status. The status does not change while a collection runs, only when it ends.- A successful run ends in
COMPLETEDwhen the connection hasrefreshData=false(a one-time consent at the bank) and inACTIVEwhen it hasrefreshData=true(a recurring consent). This holds for the first collection and for every refresh. FETCHING_ERRORmeans reading data from the bank failed, for all accounts or some of them.ERRORmeans the bank refused the access token, or storing the data failed.- A scheduled refresh runs once a day by default for
ACTIVE,COMPLETEDandFETCHING_ERROR, and forERRORonce data has been collected. It checks the consent first. If the consent is past its expiry date or no longer valid at the bank, the connection ends asEXPIRED, orREVOKEDif the user revoked it at the bank.
Replaced and deleted connections
REPLACED: a newer connection in your organization for the same bank customer at the same bank started its first collection.CONNECTEDandPARTIALLY_AUTHORIZEDconnections can be replaced too.- Deleting a connection sets
TERMINATED_BY_USERonly fromACTIVE,COMPLETED,FETCHING_ERROR, orERRORafter data was collected. In any other status the connection is removed and its status does not change. See Deleting a connection.
To see which of these changes send a webhook, see Connection webhooks in order.
Connection states
Read the latest connection with GET /connections/{connectionId}. The REST response uses id and status; connection webhooks use connectionId and connectionStatus.
Read and synchronize account data only in ACTIVE or COMPLETED, with a token for the connection owner's userId. These are the normal states after a successful collection. Before you replace local data, check the freshness caveat below.
| Status | Meaning and next action |
|---|---|
INACTIVE | Created and waiting for the user. Open the returned connectUrl. |
CONNECTED | The consent is approved and collection runs in the background. Check collection progress. |
FETCHING | The user chose a bank and the consent request is waiting there for approval. No data is collected in this status. Keep your integration pending. If the user never approves, the connection later becomes EXPIRED. |
PARTIALLY_AUTHORIZED | More account owners must approve. Wait for the bank's consent process. See Business accounts. |
COMPLETED | A collection succeeded on a connection with refreshData=false, a one-time consent. Read the data and its freshness. The scheduled refresh still checks the consent and can collect again or end it. |
ACTIVE | A collection succeeded on a connection with refreshData=true, a recurring consent, so the data is refreshed periodically. Also set just before the first collection when all signatories of a business account approve. Check freshness and data. |
ERROR, CREDENTIALS_ERROR | Connection or authentication failed. Inspect error before deciding whether the user must reconnect. |
FETCHING_ERROR | Collection hit an error. Inspect error; the available data may be incomplete. |
REJECTED | The consent was rejected. Explain the outcome to the user before offering a new consent journey. |
EXPIRED, REVOKED | The consent ended. A new consent is needed to regain access. |
REPLACED | Another connection replaced this one. Use the replacement connection. |
SUSPENDED_BY_PROVIDER | The bank suspended the consent. Check with the bank or Open Finance before retrying. |
TERMINATED_BY_USER | Deleted through the connection API, including deletion by your application. This connection can no longer be used. |
UNKNOWN | The bank reported a consent status that could not be mapped. This connection will not progress. Create a new connection, and contact support if it happens again. |
Check data separately from consentThe browser return and
ACTIVEalone don't prove the data is ready. Check the collection timestamps and the data endpoints. An old timestamp doesn't confirm that a new refresh has finished, andFETCHING_ERRORcan leave partial data.
The timing of additional approvals and of automatic refreshes depends on the bank and on your configuration.
Next steps
Updated 2 days ago
