Bank account selection

The Create Account Selection API call enables the merchant to create a bank account selection and use the Brite client to allow end users to authenticate and select a bank account. The bank account is created in the Brite system and is commonly used together with withdrawals to ensure that the withdrawal goes out to the correct bank account. 


Initiate a bank account session by calling the sessions.create_bank_account_selection endpoint. 

    "deeplink_redirect": "string",
    "country_id": "string",  // required
    "callbacks": [
            "url": "string",  // required
            "session_state": 2
            "url": "string",  // required
            "transaction_state": 5
    "customer_firstname": "string",
    "customer_lastname": "string",
    "customer_dob": "string",
    "customer_id": "string",
    "customer_street_address": "string",
	"customer_zip": "string", 	
	"customer_city": "string",
	"customer_email": "string",
	"ssn": "string",
    "merchant_reference": "string",
	"locale": "string",
	"redirect_uri": "string",
	"brand_name": "string"  // required for DE

The deeplink_redirect is for mobile devices to redirect back to merchant app after authenticating with third party app. The customer_id is created when a new customer authenticates. If you already have a customer_id you can pass it in the request and if it does not match with the user authenticating the session will be aborted. This is useful to make sure that the expected user is making the deposit.  The merchant_reference is set by the merchant. Approval_required is used to be able to have the option to approve or reject the session after authentication is done. 

					// example response
    "url": "string",
    "token": "string",
    "id": "string"

In the response you will find a URL where the client is hosted. A token for rendering the client using the javascript. And an id for the session. 

Inject the token into the JavaScript client and render the client. After the customer has authenticated successfully in the client Brite sends a STATE_AUTHENTICATION_COMPLETE callback to the url stated for session_state; 2.

					// example request - callback
"transaction_state": 2,
"transaction_id": "string",
"merchant_id": "string"

Call session.get using the session id to get session details.

During the bank account selection session, a user account and bank account are created in Brite. To get the details and identifiers for these after the session is completed, the session.get API method is used. To get the bank account details, bank_account.list can be used.