Session handling

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

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

NameIDDescription
STATE_CREATED0Session has been created.
STATE_AUTHENTICATION_STARTED1End user has chosen a bank, entered credentials and clicked submit.
STATE_AUTHENTICATION_COMPLETED2End user has finished authenticating.
STATE_BANK_ACCOUNT_SELECTION_STARTED3End user is shown the bank account selection view.
STATE_BANK_ACCOUNT_SELECTION_COMPLETED4End user has chosen the desired bank account for deposit.
STATE_DEPOSIT_STARTED5Deposit transaction is created.
STATE_RECIPIENT_APPROVAL_STARTED6Only for Swedbank. The end user needs to add Brite to their recipient base.
STATE_RECIPIENT_APPROVAL_COMPLETED7Only for Swedbank. The end user has added Brite to their recipient base.
STATE_TRANSACTION_APPROVAL_STARTED8The end user needs to sign the transaction.
STATE_TRANSACTION_APPROVAL_COMPLETED9The end user has signed the transaction
STATE_ABORTED10Session was aborted for a known reason, see 5.7 Aborted state errors.
STATE_FAILED11Session failed for unknown reason or was manually failed by Brite.
STATE_COMPLETED12The session flow has been completed.

Table of contents