End of the Connect flow

Optional callback

As detailed in the Configure section, you can authorize some redirections domains on your Bridge application.

So when you create your Connect session, you decide if you want to configure a callback url for this session or no.

curl --request POST \
     --url https://api.bridgeapi.io/v3/aggregation/connect-sessions \
     --header 'Bridge-Version: BRIDGE-VERSION' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'Authorization: Bearer TOP_SECRET_ACCESS_TOKEN' \
     --data '
		{
  		"user_email": "[email protected]",
      "callback_url": "https://www.acme.com"
		}
		'
  • If the Connect session has a callback_url, the user will be redirected to your specified redirect URL when he completes or exits the session.
  • If the Connect session hasn't any callback_url, the user will be redirected to a Bridge status page at the end of the session.

In the first case, your url is enriched with some parameters depending on the situation:

  • user_uuid: id of the user
  • item_id: id of the item which has been added or updated
  • success: the status (true or false) of the funnel when the user has left it
  • step: (only when success = false) the step in the funnel where the user has left it by clicking on the redirect or the quit button: highlighted_banks, link_iban_error, sub_banks_list, bank_creds_form, edit_bank_creds_form, sync_in_progress, otp_form, sync_success, sync_error, sync_pending, pro_validation_form or email_validation_form
  • source: connect
  • context: optional context which is an open parameter that you can send through the Bridge Connect
MY_REDIRECT_URL?item_id=ITEM_ID&user_uuid=USER_UUID&success=false&step=sync_pending

Integration recommendations

Option 1 - Simplest approach

If your application uses an asynchronous process to connect or manage banking connections, or if handling callbacks on your front-end is not feasible, do not include a callback_url in your Connect session.

Instead, rely on our Webhooks to monitor when an item has been created or refreshed.

This approach minimizes integration complexity.

Option 2 - Recommended approach

For a seamless end-to-end user experience, include a callback_url in your Connect session.

  • When the user is redirected to your callback URL, extract the item_id parameter and use our API to retrieve the item's data, allowing you to display the connection status in real-time
  • Additionally, listen to our Webhooks to track when an item has been created or refreshed

Note: If the user interrupts the process (e.g., by clicking the "Exit" link in the top-right corner) or if synchronization fails, only the user_uuid will be appended to your app's redirect URL.