Aeronetwork Users (Pay v2.0 API)
Newer versions of Aerosync SDKs will require a user identifier, aeropassuseruuid, generated using the following API.
In order to make use of Aeropay's user network and Aerosync's Aeronetwork SDKs, you'll need to first create users via API and access each user's aeropassuseruuid. Today, you can create users using Aeropass's POST /user endpoint to create a user's aeropassuseruuid. Note, you'll need to use your Aeropay-specific token credentials to make this call.
Step 1 - Generate the Aeropay Merchant Token
The POST /v2/token endpoint is used to authenticate API integrators for every Aeropay endpoint. The token scope determines who is acting on the system: merchant, user, or userForMerchant (white labeled user). The scope will determine what endpoints are available.
All tokens have a time to live (TTL) of 30 minutes.
HTTP request
Sandbox - POST https://api.sandbox-pay.aero.inc/v2/token
Production - POST https://api.aeropay.com/v2/token
Request parameters
| Parameter | Required? | Type | Description |
|---|---|---|---|
| apiKey | Yes | String | API Key or user email |
| apiSecret | Yes | String | API Secret or user password |
| scope | Yes | String | Type of token requested |
| id | Only for merchant & userForMerchant scope | String | Merchant Id |
| userId | Only for userForMerchant scope | String | Id of user |
HTTP status and error codes
| HTTP status | Error Code | Meaning | Resolution | Message |
|---|---|---|---|---|
| 400 | AP002 | API credentials are invalid | Confirm correct api key, api secret, and environment | Invalid API key or secret key |
| 400 | AP700 | Scope is invalid | User either merchant or userForMerchant scope | Invalid scope |
| 400 | AP700 | Scope is not provided | User either merchant or userForMerchant scope | Missing required Parameter: 'scope' |
| 400 | AP700 | Missing apiSecret | Make sure to define a valid string for apiSecret | Missing required Parameter: 'apiSecret' |
| 400 | AP700 | Missing apiKey | Make sure to define a valid string for apiKey | Missing required Parameter: 'apiKey' |
| 400 | AP700 | Missing userId | Make sure to define a valid userId (for userForMerchant token) | Missing required Parameter: 'userId' |
Code Example - Request
curl --request POST \
--url https://api.sandbox-pay.aero.inc/v2/token \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '
{
"scope": "merchant",
"apiKey": "api-key-ab1341-asdflk3",
"apiSecret": "api-secret-ab1341-asdflk3",
"id": "1456"
}
'Code Example - Response
{
"TTL": 1800,
"token": "eyJ0eXAiOiJKN7YiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoIjoiNDgiLCJzdWIiOiJtZXJjaGFudCIsImp0aSI6ImZhNGY2NzRmLTJkOTEtNGExNS05OTk3LTc1NWI2ZTYyZDhkYiIsImV4cCI6MTY5NDAzNTc2MSwidXNlcm5hbWUiOiJ1cy1lYXN0LTE6M2NlMjBiZDUtNzg03ZCRMjY5LWExM2UtZmM1MzIyMTk0NTAxIn0.3B1sdyVNpTW644RtpoGmQnRlp9PKGjrk91YUi0Uq2Os"
}Step 2 - Create the User
HTTP request
Sandbox - POST https://api.sandbox-pay.aero.inc/v2/user
Production - POST https://api.aeropay.com/v2/user
Request parameters
Parameter | Required? | Type | Description |
|---|---|---|---|
firstName | Yes | String | The User's first name as shown on their government ID Min xx characters Max xx characters |
lastName | Yes | String | The User's last name as shown on their government ID Min xx characters Max xx characters |
phoneNumber | Yes | String | The User's phone number Must be in international format (+11234567890) Landline, VOIP, or prepaid phone numbers are invalid in production. |
Yes | String | The User's email address Must be a valid email address |
Code Example - Request
curl --request POST \
--url https://api.sandbox-pay.aero.inc/v2/user \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{token}}' \
--data '
{
"firstName": "Jane",
"lastName": "Doe",
"phoneNumber": "+11234567890",
"email": "[email protected]"
}Code Example - Response
{
"user": {
"id": "49681f36-bbe0-4038-b024-a5d86584255a",
"firstName": "Jane",
"lastName": "Doe",
"type": "consumer",
"email": "[email protected]",
"phoneNumber": "+11234567890",
"createdDate": "2025-06-24T20:24:21+00:00"
},
"mfaType": "sms" // if sms or email, MFA code was sent to user to be verified. If null, skip to Step 4
}
mfaTypeCheck the mfaType parameter to see if an MFA code was sent. Possible values are 'sms', 'email', or null, determined by merchant settings.
If null, no MFA code was sent.
If 'sms' or 'email', the user will need to complete an MFA challenge to proceed.
Step 3 - Confirm User Identity
In the case the user you've created already exists in the Aeropay ecosystem, you will receive an response from POST /v2/user indicating that the user you created has previously used Aeropay. Aeropay will send an OTP code to the user's phone registered with their pre-existing Aeropay account. This MFA code has a TTL of 15 minutes.
You will have to verify the user's identity with POST /v2/confirmUser. The POST /v2/confirmUser API can be used to verify the user's identity by requiring the user to enter an MFA code sent to the phone on file with Aeropay. Note: Aeropay handles sending of these MFA codes.
HTTP request
Sandbox - POST https://api.sandbox-pay.aero.inc/v2/confirmUser
Production - POST https://api.aeropay.com/v2/confirmUser
Request parameters
| Parameter | Required? | Type | Description |
|---|---|---|---|
| userId | Yes | String | The User's Aeropay userid |
| code | Yes | String | MFA code provided by user. |
Code Example - Request
curl --request POST \
--url https://api.sandbox-pay.aero.inc/v2/confirmUser \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{token}}' \
--data '
{
"merchantId": "12345", /// merchantId
"userId": "123123", // userId of user
"code": "234153", // MFA code provided by user via phone
}Code Example - Response
{
"user": {
"id": "49681f36-bbe0-4038-b024-a5d86584255a",
"firstName": "Jane",
"lastName": "Doe",
"type": "consumer",
"email": "[email protected]",
"phone": "+11234567890",
"createdDate": "2025-06-24T20:24:21+00:00",
"userStatus": "Active"
}
}
Store the Aeropay userId in your databaseOnly once the user has been verified successfully should you save the Aeropay userId in your database. The next time this user comes to make a transaction, follow the Returning User guide.
Step 4 - Retrieve the User Details
Aeropay recommends saving the user.id and demographic information in your own database, but the user's actively-linked bank accounts must be fetched before making a transaction. To fetch the user's linked bank accounts, use the GET /v2/bankAccounts endpoint. The GET /v2/user API can be used to fetch all relevant user information by searching on the user's Aeropay userid.
HTTP request (bankAccounts)
Sandbox - GET https://api.sandbox-pay.aero.inc/v2/bankAccounts
Production - GET https://api.aeropay.com/v2/bankAccounts
Request parameters
This endpoint does not require query parameters. The user's bank accounts are retrieved based on the authorization token provided.
Code Example - Request
curl --request GET \
--url https://api.sandbox-pay.aero.inc/v2/bankAccounts \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{userForMerchant token}}'Code Example - Response
{
"bankAccounts": [
{
"bankAccountId": 1139036,
"bankName": "Aerosync Bank (MFA)",
"accountLast4": "3535",
"name": "Aerosync Checking",
"isSelected": true,
"accountType": "checking",
"status": "verified",
"createdDate": "2025-12-01T18:52:37+00:00"
},
{
"bankAccountId": 1139682,
"bankName": "Aerosync Bank (oAuth)",
"accountLast4": "1329",
"name": "Aerosync Checking",
"isSelected": false,
"accountType": "checking",
"status": "verified",
"createdDate": "2025-12-11T21:50:22+00:00"
}
]
}HTTP request (user)
Sandbox - GET https://api.sandbox-pay.aero.inc/v2/user
Production - GET https://api.aeropay.com/v2/user
Code Example - Request
curl --request GET \
--url https://api.sandbox-pay.aero.inc/v2/user \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{user or userForMerchant token}}'Code Example - Response
{
"user": {
"id": "49681f36-bbe0-4038-b024-a5d86584255a",
"firstName": "Jane",
"lastName": "Doe",
"type": "consumer",
"email": "[email protected]",
"phoneNumber": "+11234567890",
"createdDate": "2025-06-24T20:24:21+00:00",
"userStatus": "Active"
}
}Updated about 18 hours ago