v1

latestOpenAPI 3.0.02026-07-263118119.8 KB
Create & Manage Transactions

transaction

Create an Aeropay Transaction Object where funds will move from a user to a merchant.

The userForMerchant token specifies the paying user. The merchant being paid is specified by the merchantId in the request body. The user's default bank account will be selected if no bankAccountId is specified.

Attributes are AeroPay formatted data that you may wish to include with your transaction. For example, an invoice number or the tracking of a tip amount.

NOTE: Tip amounts will be added to the 'amount' value.

<details> <summary><strong>Error Glossary</strong> (click to expand)</summary>
CodeHTTP StatusMessage
AP101401No authenticated user
AP103200Unable to set user reputation level
AP109200Delinquent activity on account
AP110200User profile incomplete
AP114200Account restricted by merchant
AP201200No merchant found for merchant id
AP203200Unable to get location for merchant
AP205200Unable to get rewards and fees for merchant
AP206200Unable to get merchant account
AP300200Unable to connect to bank
AP302200Insufficient funds
AP303200Transaction missing location
AP304200Transaction amount exceeds limit
AP306200Insufficient balance
AP307200Payment declined - try a lower amount
AP308200Invalid amount
AP314200Transaction already exists
AP315200Payment rejected - threshold or suspended bank
AP400200No bank account linked
AP401400Cannot validate bank account
AP402200No bank account for merchant
AP403200Bank not supported
AP404200Invalid routing number
AP411200Invalid account type - connect a checking account
AP412200Bank account already removed
AP700400Missing or invalid required parameter
AP701400Improperly formatted parameter
AP1400400Idempotency key reused with different payload
AP1401400Request with same idempotency key still processing
AP1402400Invalid idempotency key structure
</details>
post/v2/transaction

Headers

Content-Typestring required
authorizationstring required

A userForMerchant scoped token.

Idempotency-Keystring uuid

Optional UUID value to ensure idempotent transaction.

Request body

bankAccountIdinteger

default bank account for the user will be used if not specified

merchantIdinteger required

MerchantId

referenceIdstring

Merchant reference id of transaction

Example request

{
  "attributes": {
    "invoice": {
      "value": "Value",
      "description": "Description"
    },
    "tip": {
      "tipAmount": "1.00",
      "label": "$1.00",
      "totalAmount": "2.00"
    }
  }
}

Response

Success or Business Logic Error

OR

Example response

{
  "error": {
    "help": "Contact support@aeropay.com for help.",
    "code": "AP700",
    "message": "Missing required Parameter: 'email'"
  }
}