Search
Menu
Edit Template

In-depth Knowledge

Session handling

In this section we cover the sessions that Brite handles. Sessions are created to load the Brite Client and there are five different use cases:

 

  • Deposit
  • Recurring deposit
  • Withdrawal
  • Bank account selection
  • Client Authentication

When the session is created there is a session token returned in the API that is used when loading the client. All of these methods also support callbacks for automatic updates of the current session or transaction status.

Session details

The Brite API also provides functionality to get the session status and information. The session.get API call allows you to get the full information about a session. This will give you the state of the session as well as providing you with a corresponding transaction_id if applicable. The session.state API call enables you to get the state of an ongoing session in the Brite backend. The session states show how the end user is interacting with the Brite client. This will give you the state of the session as well as providing you with a corresponding transaction_id if applicable.

Session timeout

A deposit session is valid for 30min.

Session states

Name
ID
Description
STATE_CREATED
0
Session has been created.
STATE_AUTHENTICATION_STARTED
1
End user has chosen a bank, entered credentials and clicked submit.
STATE_AUTHENTICATION_COMPLETED
2
End user has finished authenticating.
STATE_BANK_ACCOUNT_SELECTION_STARTED
3
End user is shown the bank account selection view.
STATE_BANK_ACCOUNT_SELECTION_COMPLETED
4
End user has chosen the desired bank account for deposit.
STATE_DEPOSIT_STARTED
5
Deposit transaction is created.
STATE_RECIPIENT_APPROVAL_STARTED
6
Only for Swedbank. The end user needs to add Brite to their recipient base.
STATE_RECIPIENT_APPROVAL_COMPLETED
7
Only for Swedbank. The end user has added Brite to their recipient base.
STATE_TRANSACTION_APPROVAL_STARTED
8
The end user needs to sign the transaction.
STATE_TRANSACTION_APPROVAL_COMPLETED
9
The end user has signed the transaction.
STATE_ABORTED
10
Session was aborted for a known reason, see 5.7 Aborted state errors.
STATE_FAILED
11
Session failed for unknown reason or was manually failed by Brite.
STATE_COMPLETED
12
The session flow has been completed.