Void or refund an Aeropay Transaction.
If a transaction needs to be reversed (return money to the customer) this method will void the payment, or create a payment to the customer from the merchant.
Transactions that are within the same business day can be voided on the spot, where no money is moved in either direction. If that window has closed and the transaction has begun to process, a transaction in the reverse direction will be created.
An amount can be included to handle partial refunds if there was a change in the amount, otherwise the full amount will be refunded.
Refunds will take 2-3 business days to process as usual.
Safe Retry for Refunds (Idempotency-Key): When a merchant retries a refund request (e.g. after a timeout or network error), Aeropay returns the same outcome as the first attempt instead of creating a second refund. Send an idempotency key with the request (e.g. a UUID in the Idempotency-Key header). The first request with that key is processed and its response is stored; later requests with the same key receive the stored response and do not trigger a new refund. The same key cannot be used with a different request body; if it is, the API rejects the request so one key always maps to one logical refund. Idempotency is optional; if no idempotency key is sent, the API does not apply this behavior and does not guarantee protection against duplicate refunds on retries.
NOTE: The id used is a Aeropay Transaction.id and is only for AeroTransactions. Use /v2/preauthTransaction DELETE to cancel a preauthorized transaction.
Error Glossary (click to expand)
| Code | HTTP Status | Message |
|---|---|---|
AP009 | 401 | Unauthorized |
AP011 | 401 | Unauthorized for this transaction |
AP101 | 401 | No authenticated user |
AP310 | 200 | Credit transaction declined |
AP400 | 200 | No bank account linked |
AP700 | 400 | Missing or invalid required parameter |
AP701 | 400 | Improperly formatted parameter |
AP1001 | 200 | Error committing to database |
AP1200 | 200 | Could not create merchant bill transaction |
AP1300 | 200 | Transaction already refunded |
AP1301 | 200 | Transaction already queued for refund |
AP1302 | 200 | Refund amount exceeds original transaction amount |
AP1303 | 200 | Refund amount must be positive |
AP1304 | 200 | Transaction type cannot be refunded |
AP1305 | 200 | RTP transaction cannot be voided - schedule a refund |
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
