v1

latestOpenAPI 3.0.02026-07-263118119.8 KB
Create & Manage Transactions

preauthTransaction

Create a preauthorized transaction for the user specified by the authorization token.

The response contains a transaction object. The id within this transaction object is used to identify this preauthorized transaction.

Preauthorized transactions do not have a default expiration, but can be configurable by merchant.

<details> <summary><strong>Error Glossary</strong> (click to expand)</summary>
CodeHTTP StatusMessage
AP009401Unauthorized
AP101401No authenticated user
AP103200Unable to set user reputation level
AP109200Delinquent activity on account
AP110200User profile incomplete
AP201200No merchant found for merchant id
AP203200Unable to get location for merchant
AP205200Unable to get rewards and fees for merchant
AP300200Unable to connect to bank
AP302200Insufficient funds
AP303200Transaction missing location
AP304200Transaction amount exceeds limit
AP306200Insufficient balance
AP307200Payment declined - try a lower amount
AP308200Invalid amount
AP310200Credit transaction declined
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
AP411200Invalid account type - connect a checking account
AP412200Bank account already removed
AP700400Missing or invalid required parameter
AP701400Improperly formatted parameter
AP1000200Invalid API
AP1400400Idempotency key reused with different payload
AP1401400Request with same idempotency key still processing
AP1402400Invalid idempotency key structure
</details>
post/v2/preauthTransaction

Headers

Content-Typestring required
authorizationstring required

A userForMerchant scoped token.

Idempotency-Keystring uuid

Optional UUID value to ensure idempotent transaction.

Request body

bankAccountIdinteger required

bankAccountId of selected bank

merchantIdinteger required

MerchantId

referenceIdstring

Merchant reference id of transaction

Example request

{
  "bankAccountId": "0",
  "merchantId": "1748",
  "amount": {
    "amount": 1234,
    "currency": "USD"
  },
  "referenceId": "123-123-1234"
}

Response

Success

OR

Example response

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