---
updatedAt: 2026-08-03T20:01:00.000Z
agentTools:
  projectIndex: https://dev.aero.inc/llms.txt
---

# Step 5 - Update a Preauth Transaction

# Update a Preauth Transaction

Now that you have created a preauthorized transaction, you may update the payment or tip amount if changes need to be made to the transaction before capture. Preauthorized transactions will expire after 72 hours if not captured with `POST /v2/capturePreauthTransaction`, or can be canceled by calling `DELETE /v2/preauthTransaction`.

If necessary, time to expiration can be configured on a merchant by merchant basis.

This step will go over how to update the details of a preauthorized transaction.

You will need to retrieve the user to check for their linked bank account. Refer to the previous step to learn more.

## Step 5A - Update the Preauth Transaction

### HTTP request

**Sandbox** - `PATCH https://api.sandbox-pay.aero.inc/v2/preauthTransaction`<br />**Production** - `PATCH https://api.aeropay.com/v2/preauthTransaction`

### Path parameters

| Parameter            | Required? | Type   | Description                               |
| :------------------- | :-------- | :----- | :---------------------------------------- |
| preauthTransactionId | Yes       | String | The uuid of the preauthorized transaction |

### Body parameters

| Parameter  | Required? | Type   | Description                    |
| :--------- | :-------- | :----- | :----------------------------- |
| amount     | No        | String | The updated transaction amount |
| attributes | No        | Object | See `Attributes Object`        |

#### Attributes Object

| Parameter | Required? | Type   | Description      |
| :-------- | :-------- | :----- | :--------------- |
| key       | No        | String | See `Key Object` |

#### Key Object

| Parameter   | Required? | Type   | Description             |
| :---------- | :-------- | :----- | :---------------------- |
| value       | No        | String | `tip` if entering a tip |
| description | No        | String | See example request     |

### Code Example - Request

```asp curl
curl --request PATCH \
     --url https://api.sandbox-pay.aero.inc/v2/preauthTransaction/53024f75-f7d1-45b7-8e4d-4449fed355ab \
     --header 'Content-Type: application/json' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}' \
     --data '
{
    "amount": {
        "currency": "USD",
        "amount": 101
    },
    "attributes": {
      "key": {
        "value": "KEY VALUE",
        "description": "KEY DESCRIPTION"
      }
    }
}'
```

### Code Example - Response

```json
{
    "transaction": {
        "id": "53024f75-f7d1-45b7-8e4d-4449fed355ab",
        "amount": {
            "currency": "USD",
            "amount": 101
        },
        "status": "live",
        "userId": "d5e17cbf-92ad-44e7-b483-19dba7adaaa4",
        "description": "Online Transaction",
        "attributes": {
          "key": {
            "value": "KEY VALUE",
            "description": "KEY DESCRIPTION"
          }	
        },
        "createdDate": "2026-01-02T12:00:56+00:00",
        "expiryDate": "2026-01-04T12:00:56+00:00",
        "userName": "Begos Andres",
        "userEmail": "begona.andresm@aeropay.com",
        "merchantId": 1057,
        "userAccountId": 1717,
        "locationId": 1147
    }
}
```

***

## Step 5B - Cancel the Preauth Transaction (optional)

A preauth transaction may also be optionally canceled.

### HTTP request

**Sandbox** - `DELETE https://api.sandbox-pay.aero.inc/v2/preauthTransaction`<br />**Production** - `DELETE https://api.aeropay.com/v2/preauthTransaction`

### Path parameters

| Parameter | Required? | Type   | Description                                |
| :-------- | :-------- | :----- | :----------------------------------------- |
| id        | Yes       | String | The uuid of the preauthorized transaction. |

### Error Codes

| HTTP Status | Error Code | Meaning                                     | Resolution                                                          | Message                                                                                           |
| :---------- | :--------- | :------------------------------------------ | :------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------ |
| 401         | AP009      | Not authorized to update transaction        | Check id parameter is accurate                                      | Unauthorized                                                                                      |
| 200         | AP300      | Unable to connect to user bank account      | Confirm bank connection was not removed. Reconnect bank if persists | We're having issues connecting to your bank. Please reconnect or contact <support@aeropay.com>.   |
| 200         | AP302      | User has insufficient funds for transaction | Add funds to account                                                | Available balance does not meet requirement - contact <support@aeropay.com> for more information. |
| 200         | AP700      | Missing required parameter                  | Provide 'id' parameter                                              | Missing Required Parameter 'id'                                                                   |

### Code Example - Request

```asp curl
curl --request DELETE \
     --url 'https://api.sandbox-pay.aero.inc/v2/preauthTransaction/1253024f75-f7d1-45b7-8e4d-4449fed355ab34' \
     --header 'Content-Type: application/json' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}'
```

### Code Example - Response

```json
{
    "transaction": {
        "id": "53024f75-f7d1-45b7-8e4d-4449fed355ab",
        "amount": {
            "currency": "USD",
            "amount": 101
        },
        "status": "canceled",
        "userId": "d5e17cbf-92ad-44e7-b483-19dba7adaaa4",
        "description": "Online Transaction",
        "attributes": {
        	 "key": {
              "value": "KEY VALUE",
              "description": "KEY DESCRIPTION"
      }
        },
        "createdDate": "2026-01-02T12:00:56+00:00",
        "expiryDate": "2026-01-04T12:00:56+00:00",
        "userName": "Begos Andres",
        "userEmail": "begona.andresm@aeropay.com",
        "merchantId": 1057,
        "userAccountId": 1717,
        "locationId": 1147
    }
}
```