---
title: "preauthTransaction"
method: PATCH
path: "/v2/preauthTransaction/{preauthTransactionId}"
tags: ["Create & Manage Transactions"]
---

# preauthTransaction

`PATCH /v2/preauthTransaction/{preauthTransactionId}`

Update the specified preauthorized transaction. Preauthorized transaction amounts can be increased or decreased. Attributes can also be added for tipping purposes.

**Note:** The updated transaction amount may not exceed the original amount that was preauthorized.

<details>
<summary><strong>Error Glossary</strong> (click to expand)</summary>

| Code | HTTP Status | Message |
|------|-------------|-------------|
| `AP009` | 401 | Unauthorized |
| `AP101` | 401 | No authenticated user |
| `AP300` | 200 | Unable to connect to bank |
| `AP302` | 200 | Insufficient funds |
| `AP310` | 200 | Credit transaction declined |
| `AP312` | 200 | Preauth already captured |
| `AP313` | 200 | Preauth ineligible for capture |
| `AP315` | 200 | Payment rejected  -  threshold or suspended bank |
| `AP700` | 400 | Missing or invalid required parameter |
| `AP701` | 400 | Improperly formatted parameter |
| `AP1000` | 200 | Invalid API |

</details>

## Headers

- `Content-Type` string, required
- `authorization` string, required

## Request body

- object — Body of preauthtransaction patch call
  - `amount` object — Dictionary with currency and amount in pennies. Only USD supported at this time
    - `amount` integer — Payment amount in pennies
    - `currency` string — Currency. Currently only supports USD
  - `attributes` object — Dictionary with attributes. Tip and invoice are standard formats. Custom attributes must follow value/description dictionary formatting.
    - `CUSTOM ATTRIBUTE` object
      - `value` string — Value identifier of custom attribute
      - `description` string — Description of custom attribute
    - `invoice` object
      - `value` string — Value identifier of invoice
      - `description` string — Description of invoice
    - `tip` object
      - `tipAmount` string — Required. Amount of tip, in format XX.XX
      - `label` string — Required. String representation of tip, including $
      - `totalAmount` string — Required. Amount + tip, in format XX.XX. This can be used for reconciliation and to guarantee accurate amount value

## Response `200`

Success or Business Logic Error

- union
  - PreauthTransactionResponse
    - `transaction` object
      - `id` string
      - `amount` object
        - `currency` string
        - `amount` integer
      - `status` string
      - `userId` string
      - `description` string
      - `attributes` object
      - `createdDate` string, date-time
      - `expiryDate` string, date-time
      - `userName` string
      - `userEmail` string, email
      - `merchantId` integer
      - `userAccountId` integer
      - `locationId` integer
      - `referenceId` string
  - 200failure
    - `error` object
      - `code` string
      - `message` string
      - `help` string — Support contact information

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/aero/apis/aeropay-v2-api.md) · [All operations](https://skmtc.net/aero/apis/aeropay-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aero/aeropay-v2-api/revisions/4700c4ceeaad/schema)
