Aerosync Integration Guides

1. Get an Aerosync widget URL & token

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

Sample request to GET /aggregatorCredentials:

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}}'

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.

2. Load the Aerosync widget

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

3. 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.

Sample request to POST /linkAccountFromAggregator:

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", // this is the user_id or userId returned from the Aerosync widget
  "user_password": "735e33b9-78ec-4887-99d7-a3056997sef3", // this is the user_password or connectionId returned from the Aerosync widget
  "aggregator": "aerosync"
}
'

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
}