Your first Account Check
User Creation
You need to create a user for each customer you want to Account Check.
curl 'https://api.bridgeapi.io/v2/users' \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Content-Type: application/json' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET'
curl 'https://api.bridgeapi.io/v2/users' \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Content-Type: application/json' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-d $'{
"external_user_id": "SUIDHIUHDS8838UD"
}'
Please check the Create a user API reference or our guide on user creation for more details.
User Authentication
The User resource is an abstraction of the end user, you will need to authenticate him in a Server-to-Server way. That means no action from the end user is needed.
curl 'https://api.bridgeapi.io/v2/authenticate' \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Content-Type: application/json' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-d $'{
"user_uuid": "c2a26c9e-dc23-4f67-b887-bbae0f26c415"
}'
curl 'https://api.bridgeapi.io/v2/authenticate' \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Content-Type: application/json' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-d $'{
"external_user_id": "A6JEJIID1919BDS"
}'
The API response contains the access_token
that you must provide in your next authenticated calls, using the bearer authentication scheme with the header Authorization
.
Please check the Authenticate a user API reference for more details.
Bridge Connect
The Bridge Connect is a Bridge hosted page where your customer can connect his bank account.
The following endpoint returns an URL to the hosted page where only banks supporting the Account Check feature will be displayed to your customer:
curl "https://api.bridgeapi.io/v2/connect/items/add" \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-H 'Authorization: Bearer TOP_SECRET_ACCESS_TOKEN' \
-d $'{
"capabilities": ["account_check"]
}'
Please check the Bridge Connect API reference for more details.
Get accounts information
Once the bank connection has been made, the user will be redirected to your callback URL (cf. Out of the Bridge Connect).
Users who close the Bridge Connect tab won't be redirected on your callback URL. Use our Webhooks to know if the item has been created.
Then you can retrieve the accounts information of your user:
curl "https://api.bridgeapi.io/v2/accounts-information" \
-X GET \
-H 'Bridge-Version: 2021-06-01' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-H 'Authorization: Bearer TOP_SECRET_ACCESS_TOKEN'
This endpoint only displays account where first_name
, last_name
and IBAN
are available.
{
"resources": [
{
"item_id": 5869768,
"first_name": "JEAN",
"last_name": "DUPONT",
"accounts": [
{
"id": 27341559,
"name": "Compte Courant de MR DUPONT",
"type": "checking",
"currency_code": "EUR",
"bank_id": 6,
"iban": "FR3312739000309854725191G90"
}
]
}
]
}
For business account, you will find first and last name of the person who owns the bank credentials.
Please check the Get accounts information API reference for more details.
Updated about 1 year ago