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

ParameterRequired?TypeDescription
phonephone or email is requiredStringThe phone number to send the payment link to
emailphone or email is requiredStringThe email address to send the payment link to
merchantIdYesStringThe merchant id used to validate the request
amountNoStringAmount value in USD
paymentTypeNoStringThe paymentType: standard, preauth, or subscription. Defaults to standard.
subscriptionIdNoStringSubscription offer id if paymentType is 'subscription'
transaction_uuidNoStringUnique 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:

Query Parameters

ParameterRequired?Description
mYesYour merchant location UUID.
tRecommendedTransaction amount (if omitted, user can enter any amount).
uNoTransaction UUID for your system (if omitted, Aeropay generates one and returns it via webhook).
fNoFor pre-auth payments only. Set to auth for preauthorized transactions.

🚧

Important: Omitting the amount (t parameter) 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