Payment Links
Payment links via API
Aeropay offers a paymentLink API which generates and sends an Aeropay payment link for your merchant location to a customer's email or phone number.
Request parameters
| Parameter | Required? | Type | Description |
|---|---|---|---|
| phone | phone or email is required | String | The phone number to send the payment link to |
| phone or email is required | String | The email address to send the payment link to | |
| merchantId | Yes | String | The merchant id used to validate the request |
| amount | No | String | Amount value in USD |
| paymentType | No | String | The paymentType: standard, preauth, or subscription. Defaults to standard. |
| subscriptionId | No | String | Subscription offer id if paymentType is 'subscription' |
| transaction_uuid | No | String | Unique uuid (ISO/IEC 9834-8) to identify the transaction. This value can be used to associate Aeropay transactions with your own system. |
Code Example - Request
curl --request POST \
--url https://api.sandbox-pay.aero.inc/v2/paymentLink \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"merchantId": "{{mainMerchantId}}",
"phone": "{USERPHONENUMBER}"
}
'
Build-Your-Own Payment Links
Alternatively, you can build payment links by adding parameters to the base URL, pay.aero.inc. Parameters include your merchant location uuid, transaction amount, and transaction id. Please note, you must generate the UUID according to the standard methods (ISO/IEC 9834-8).
Base URLs:
- Sandbox: https://sandbox-pay.aero.inc/
- Prod: https://pay.aero.inc/
Query Parameters
| Parameter | Required? | Description |
|---|---|---|
m | Yes | Your merchant location UUID. |
t | Recommended | Transaction amount (if omitted, user can enter any amount). |
u | No | Transaction UUID for your system (if omitted, Aeropay generates one and returns it via webhook). |
f | No | For pre-auth payments only. Set to auth for preauthorized transactions. |
Important: Omitting the amount (
tparameter) allows users to enter any amount at checkout. This is typically only used for donation scenarios, or similar, in production.
Examples
Standard Payment Link Structure:
https://pay.aero.inc/?m={merchantLocationUuid}&t={amount}&u={transactionUuid}
Example Standard with amount (recommended):
https://pay.aero.inc/?m=3294913115&t=30.24
Example Standard with amount + your UUID:
https://pay.aero.inc/?m=3294913115&t=30.24&u=123e4567-e89b-12d3-a456-426614174000
Preauth Payment Link Structure:
https://pay.aero.inc/?m={merchantLocationUuid}&t={amount}&u={transactionUuid}&f=auth
Example Preauth:
https://pay.aero.inc/?m=3294913115&t=30.24&u=123e4567-e89b-12d3-a456-426614174000&f=auth
