Step 3 - Link a bank to the User

Link a bank with Aerosync

Aerosync is a bank aggregator that allows a user to connect with both the largest FIs and local credit unions across the U.S. It supports bank OAuth flows for fast connections and quick balance refresh.

Step 3A - Retrieve an Aerosync widget URL & token

HTTP request

Sandbox - GET https://staging-api.aeropay.com/aggregatorCredentials?aggregator=aerosync
Production - GET https://api.aeropay.com/aggregatorCredentials?aggregator=aerosync

Note the aggregator query parameter setting Aerosync as the aggregator your user will link their bank with.

Code Example - Request

Make a request to Aeropay's GET /aggregatorCredentials endpoint. You'll need to input aerosync as the value for the aggregator query parameter.

curl --request GET  
     --url '<https://staging-api.aeropay.com/aggregatorCredentials?aggregator=aerosync'>  
     --header 'Content-Type: application/json'  
     --header 'accept: application/json'  
     --header 'authorizationToken: Bearer {{token}}'

Code Example - Response

{  
    "success": true,  
    "fastlinkURL": "<https://staging.aerosync.com/">,  
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkNDYzZjhhYwefNmEyLTQzOTctOWIyNC00NWYzZGY2MDcxYjciLCJleHAiOjE2ODY0Mzk4NTYsInVzZXJJZCI6ImU3OTQzMmNiOWFmNTQ2ZTRiMDBiN2NmMDU3ZjdlZWEyIiwidXNlclBhc3N3b3JkIjoiODYxNDg3OGExMzEyNDA2Njg5MDBlN2VkMGNhNDhkNTkiLCJDbGllbnRJZCI6InRlc3QxIiwiQ2xpZW50TmFtZSI6ImNsaWVudDEifQ.XufkfsgGc7CGDy8DZRTOc0e\_-kJYt9puyCAqneX4Ze0",  
    "username": "e79432cb9af546e4b00b7cf057fasea2"  
}

👍

Keep note of the URL and token from the response. You'll need it for the next step.


Step 3B - Load the Aerosync widget

Follow one of the guides to initialize and launch the Aerosync widget within your application. These guides also explain how to interact the widget and it's postMessage events:

📘

For a full integration guide on Aerosync, check out our Guide

Aerosync Developer Implementation Guide

👍

Keep note of the user_id and user_password from the widget's onSuccess() event. You'll use them for the next step.


Step 3C - Connect bank account to Aeropay

Now that a user has connected their bank account with Aerosync - the next step is to link that bank account to Aeropay. You'll need to make a request to Aeropay's POST /linkAccountFromAggregator endpoint.

HTTP request

Sandbox - POST https://staging-api.aeropay.com/linkAccountFromAggregator
Production - POST https://api.aeropay.com/linkAccountFromAggregator

Request parameters

ParameterRequired?TypeDescription
user_idYesStringThe user_id returned representing the bank information from the user
user_passwordYesStringThe user_password returned representing the bank information from the user
aggregatorYesStringaerosync

Code Example - Request

curl --request POST  
     --url <https://staging-api.aeropay.com/linkAccountFromAggregator>  
     --header 'Content-Type: application/json'  
     --header 'accept: application/json'  
     --header 'authorizationToken: Bearer {{token}}'  
     --data '  
{  
  "user_id": "a2c7f83f-4df9-4090-b3bd-ad6fc3003c90",  
  "user_password": "735e33b9-78ec-4887-99d7-a3056997sef3",  
  "aggregator": "aerosync"  
}

Code Example - Response

{  
    "userBankInfo": {  
        "bankAccountId": "15991",  
        "userId": "11622",  
        "bankName": "Aerosync Bank (MFA)",  
        "accountLast4": "5016",  
        "name": "Aerosync Checking",  
        "externalBankAccountId": "",  
        "isSelected": "1",  
        "accountType": "checking",  
        "status": "verified",  
        "createdDate": "1686439169"  
    },  
    "success": true  
}

🚧

We prefer that each individual User has their own bank account.

For couples with joint bank accounts, they can reach out to support at Aeropay to get their shared bank account added to each of their individual Aeropay accounts.

Alternatively, the couple can choose to share a User account.