---
title: "payoutTransaction"
method: POST
path: "/v2/payoutTransaction"
tags: ["Create & Manage Transactions"]
---

# payoutTransaction

`POST /v2/payoutTransaction`

Create a transaction that pays an amount from the logged in merchant to the specified user.

The details of the transaction are returned upon success.

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

| Code | HTTP Status | Message |
|------|-------------|-------------|
| `AP101` | 401 | No authenticated user |
| `AP103` | 200 | Unable to set user reputation level |
| `AP109` | 200 | Delinquent activity on account |
| `AP110` | 200 | User profile incomplete |
| `AP201` | 200 | No merchant found for merchant id |
| `AP203` | 200 | Unable to get location for merchant |
| `AP205` | 200 | Unable to get rewards and fees for merchant |
| `AP206` | 200 | Unable to get merchant account |
| `AP300` | 200 | Unable to connect to bank |
| `AP302` | 200 | Insufficient funds |
| `AP303` | 200 | Transaction missing location |
| `AP304` | 200 | Transaction amount exceeds limit |
| `AP305` | 200 | Account blocked  -  delinquent activity |
| `AP308` | 200 | Invalid amount |
| `AP314` | 200 | Transaction already exists |
| `AP315` | 200 | Payment rejected  -  threshold or suspended bank |
| `AP400` | 200 | No bank account linked |
| `AP401` | 400 | Cannot validate bank account |
| `AP402` | 200 | No bank account for merchant |
| `AP403` | 200 | Bank not supported |
| `AP404` | 200 | Invalid routing number |
| `AP411` | 200 | Invalid account type  -  connect a checking account |
| `AP412` | 200 | Bank account already removed |
| `AP700` | 400 | Missing or invalid required parameter |
| `AP701` | 400 | Improperly formatted parameter |
| `AP900` | 200 | External API error |
| `AP1400` | 400 | Idempotency key reused with different payload |
| `AP1401` | 400 | Request with same idempotency key still processing |
| `AP1402` | 400 | Invalid idempotency key structure |

</details>

## Headers

- `Content-Type` string, required
- `authorization` string, required
- `Idempotency-Key` string, uuid

## Request body

- object
  - `userId` string, required — UserId of Aeropay user to pay to. In UUID format.
  - `amount` object, required — 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.
    - `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
  - `merchantId` integer, required — merchantId
  - `bankAccountId` integer — bankAccountId of selected bank
  - `referenceId` string — Merchant reference id of transaction
  - `rtp` boolean — If RTP is not specified, it will default to an ACH transaction.

## Response `200`

Success or Business Logic Error (AP411)

- union
  - PayoutTransactionResponse
    - `transaction` object
      - `id` string
      - `amount` object
        - `amount` integer
        - `currency` string
      - `status` string
      - `paymentType` string
      - `userId` string
      - `referenceId` string
      - `isRtp` boolean
      - `merchantId` integer
      - `title` string
      - `locationId` integer
      - `userAccountId` integer
  - 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)
