> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentaos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List payouts

> The business's payouts, newest first, in the mode of the key. A payout appears as soon as it is created (status `initiated`); a bank payout sent in a batch appears once the batch is funded. The response is `{ "items": [...] }`, not the paginated envelope of the other list endpoints: there is no total. A page can hold fewer than `limit` items while more exist, so ask for the next page until one comes back empty. A failed read answers 500, never an empty list.

> [!NOTE]
>
> Each payout comes with a payout statement and, when `canDownloadSelfBill` is `true`, a self-billed invoice. Use the payout's `id` to [download the statement](https://docs.agentaos.ai/api-reference/payouts/statement.md) and [the invoice](https://docs.agentaos.ai/api-reference/payouts/self-billed-invoice.md). See [Payout statements and self-billed invoices](https://docs.agentaos.ai/payouts/statements.md).

> [!NOTE]
>
> **For a platform:** send the business's id in the [`AgentaOS-Account` header](https://docs.agentaos.ai/api-reference/introduction#acting-for-a-business) to list that business's payouts.

> [!NOTE]
>
> **Webhook:** none.


## OpenAPI

````yaml GET /gateway/mor-settlements
openapi: 3.1.0
info:
  title: AgentaOS Gateway API
  version: 1.0.0
  description: >-
    The AgentaOS REST API: payment links, checkouts, subscriptions, customers,
    invoices, and the unified transactions feed. This is the same API the
    TypeScript SDK (`@agentaos/pay`) and the `agenta` CLI call underneath.


    ## Money model


    - **Decimal currency units (`number`)**: a plain `amount` field (on a create
    body, a Payment Link, a Checkout's `amount_override`, or an Invoice's
    `amount`/`fiat_amount`/`tax_amount`) is in currency units. `49.99` means EUR
    49.99, never cents.

    - **Integer minor units (`number`)**: exactly one field breaks that rule:
    `unitAmountMinor` on a Subscription. It is an integer count of the smallest
    currency unit (`1999` means EUR 19.99), named with a `Minor` suffix
    specifically so it is never confused with a plain `amount`. The `money`
    object on Transactions and the `earnings` object on a retrieved Invoice are
    also integer minor units, computed server-side.

    - **String, on webhooks**: the `amount` inside a webhook payload's `data`
    object is a string (e.g. `"49.99"`), since JSON numbers silently drop
    trailing zeros and this value must round-trip exactly for accounting.


    ## Naming convention


    Most response fields mirror the underlying database column and are
    `snake_case` (`created_at`, `seller_mode`, `buyer_email`, ...). A small
    number of computed convenience fields are camelCase with no snake_case
    equivalent: `checkoutUrl` on Checkouts and Payment Links, `sellerMode` on
    Payment Links specifically, `money` on Transactions, and `earnings` on a
    single retrieved Invoice. Two resources (Subscriptions and Customers) are
    fully camelCase end to end.


    ## Pagination


    Every list endpoint takes `limit` and `offset` and returns `{ items, total,
    hasMore }`. `hasMore` is computed server-side (`offset + items.length <
    total`); never derive it client-side.
  contact:
    name: AgentaOS
    url: https://agentaos.ai
  license:
    name: Proprietary
    url: https://agentaos.ai
servers:
  - url: https://api.agentaos.ai/api/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Payment Links
    description: >-
      Reusable, shareable payment products: a fixed amount and description
      behind one URL.
  - name: Checkouts
    description: >-
      One attempt to collect one payment, standalone or built from a payment
      link. Wire path is `/gateway/sessions`; the SDK and CLI call this resource
      "checkout".
  - name: Subscriptions
    description: >-
      Merchant-side read and management surface for recurring plans. Created
      automatically when a buyer pays a `type: subscription` payment link.
  - name: Customers
    description: 'Read-only surface: everyone who has paid you or been sent an invoice.'
  - name: Invoices
    description: >-
      Every checkout issues an invoice. List, retrieve, void, export, and
      download PDFs/receipts.
  - name: Transactions
    description: >-
      The unified activity feed: every inbound payment and outbound send, across
      every rail, in one list.
  - name: Discount Codes
    description: >-
      Codes a buyer types at checkout on a subscription plan. The code string is
      yours, so two merchants can both run SAVE20. A code may also carry no
      discount at all, so you can see who a referral brought in without giving
      money away. Terms are fixed once created: to change them, archive the code
      and create another.
  - name: Businesses
    description: >-
      For platforms: the businesses you manage, a client's business or another
      app of your own company. To act as one of them on any other endpoint, send
      its id in the `AgentaOS-Account` header. Every field on this resource is
      camelCase on the wire.
  - name: Bank Accounts
    description: >-
      Where payouts go: the bank accounts of a business, as thin references
      (holder, last four digits, the name-check result), never the account
      number. For a platform: with the `AgentaOS-Account` header these act on a
      business you manage, once we have opened bank accounts by API for your
      platform. Adding an account needs a live key.
  - name: Approved sites
    description: The sites allowed to show a business's embedded checkout.
  - name: Payouts
    description: A business's payouts and the two documents that come with each one.
paths:
  /gateway/mor-settlements:
    get:
      tags:
        - Payouts
      summary: List payouts
      description: >-
        The business's payouts, newest first, in the mode of the key. A payout
        appears as soon as it is created (status `initiated`); a bank payout
        sent in a batch appears once the batch is funded. The response is `{
        "items": [...] }`, not the paginated envelope of the other list
        endpoints: there is no total. A page can hold fewer than `limit` items
        while more exist, so ask for the next page until one comes back empty. A
        failed read answers 500, never an empty list.
      operationId: listPayouts
      parameters:
        - name: limit
          in: query
          required: false
          description: Payouts per page.
          schema:
            type: integer
            default: 50
            minimum: 1
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: The payouts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutList'
              example:
                items:
                  - id: 8c3e5a1d-2f4b-4e6a-9d7c-1b2a3c4d5e6f
                    statementRef: PS-2026-0004
                    statementRefDisplay: PS-2026-0004
                    sbiRef: null
                    sbiRefDisplay: Not yet issued
                    leg: net
                    currency: EUR
                    amountMinor: 125000
                    transferFeeMinor: 52
                    receivedMinor: 123698
                    totalFeesMinor: 1302
                    status: paid
                    createdAt: '2026-10-15T06:00:00.000Z'
                    canDownloadSelfBill: true
                    wallet: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: A business you do not manage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_yours:
                  value:
                    statusCode: 403
                    message: You cannot act as this business.
                    timestamp: '2026-10-31T12:00:00.000Z'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    Offset:
      name: offset
      in: query
      required: false
      description: Number of items to skip, for the next page.
      schema:
        type: integer
        default: 0
        minimum: 0
  schemas:
    PayoutList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Payout'
    Error:
      type: object
      description: >-
        Every non-2xx response is JSON in this shape. Every response (success or
        error) also carries an `x-request-id` response header; send that header
        on your request to have your own id echoed back, otherwise the server
        mints one. On errors the same id is repeated in the `requestId` body
        field.
      properties:
        statusCode:
          type: integer
          description: Same as the HTTP status code.
        code:
          type: string
          description: >-
            Present on some refusals: a stable machine-readable reason, e.g.
            `live_key_required`.
        message:
          description: >-
            Human-readable. A validation failure (400) returns an array of
            per-field messages instead of one string.
          anyOf:
            - type: string
            - type: array
              items:
                type: string
        errors:
          type: array
          description: >-
            Present on 400 validation failures: one entry per invalid field. The
            flat human-readable strings stay in `message` for back-compat; this
            is the machine-readable, per-field view.
          items:
            type: object
            properties:
              field:
                type: string
                description: >-
                  Name of the invalid field, dot-notated for nested properties
                  (e.g. `checkoutFields.0.type`).
              message:
                type: string
                description: Validation messages for that field, joined with `, `.
            required:
              - field
              - message
        requestId:
          type: string
          description: >-
            Correlation id, identical to the `x-request-id` response header.
            Include it when contacting support. On success it is available on
            the header only, not the body.
        timestamp:
          type: string
          format: date-time
        error:
          type: string
          description: >-
            The HTTP status name, for example `Bad Request`. Present on most
            errors.
      required:
        - statusCode
        - message
        - timestamp
    Payout:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The payout id. Use it to download the two documents.
        statementRef:
          type:
            - string
            - 'null'
          description: >-
            The payout statement number, for example `PS-2026-0001`. `null`
            until the statement is first downloaded. If the number cannot be
            issued at that moment, that PDF carries a temporary reference and a
            later download issues the number.
        statementRefDisplay:
          type: string
          description: The statement number, or `Not yet issued`.
        sbiRef:
          type:
            - string
            - 'null'
          description: >-
            The self-billed invoice number, for example `SBI-2026-0001`. `null`
            until the invoice is first downloaded, or when this payout has no
            invoice.
        sbiRefDisplay:
          type:
            - string
            - 'null'
          description: >-
            The invoice number, or `Not yet issued`. `null` when this payout has
            no invoice.
        leg:
          type: string
          enum:
            - net
            - reserve_release
            - shares
          description: >-
            `net`: the business's own sales. `reserve_release`: a reserve
            released. `shares`: only shares of other businesses' sales (platform
            fees).
        currency:
          type: string
          description: Uppercase currency code, `EUR` or `USD`.
        amountMinor:
          type: integer
          description: The amount the balance paid out, in minor units, before fees.
        transferFeeMinor:
          type:
            - integer
            - 'null'
          description: >-
            The bank transfer fee, in minor units. `null` when not known yet,
            and on a stablecoin payout.
        receivedMinor:
          type:
            - integer
            - 'null'
          description: >-
            What reaches the payout account, in minor units. A bank payout:
            `null` until the transfer fee is known. A stablecoin payout: the
            amount promised while it is on its way, then what landed. `null`
            when the payout failed or came back.
        totalFeesMinor:
          type:
            - integer
            - 'null'
          description: >-
            All fees on this payout, in minor units. `amountMinor -
            totalFeesMinor = receivedMinor`. `null` exactly when `receivedMinor`
            is `null`.
        status:
          type: string
          description: >-
            For example `initiated`, `submitted`, `paid`, `failed` or
            `returned`.
        createdAt:
          type: string
          format: date-time
        canDownloadSelfBill:
          type: boolean
          description: >-
            `true` when this payout has a self-billed invoice. `false` for a
            payout of platform fees only, and for a payout that failed or came
            back.
        rail:
          type: string
          description: >-
            How the payout was sent. `wallet` is a stablecoin payout; any other
            value is a bank payout.
        wallet:
          oneOf:
            - $ref: '#/components/schemas/PayoutWallet'
            - type: 'null'
    PayoutWallet:
      type: object
      description: Where a stablecoin payout went. Present only when `rail` is `wallet`.
      properties:
        networkLabel:
          type: string
          description: The chain, for example `Base`.
        destinationLabel:
          type: string
          description: >-
            The wallet as the dashboard names it, for example `your wallet on
            Base`.
        addressLast6:
          type: string
          description: The last 6 characters of the wallet address.
        targetMinor:
          type: integer
          description: >-
            The amount promised to the wallet, in minor units. This is also the
            self-billed invoice total for this payout.
        corridorFeeMinor:
          type: integer
          description: The stablecoin delivery fee, in minor units.
        receivedMinor:
          type:
            - integer
            - 'null'
          description: >-
            What landed in the wallet, in minor units. `null` until the transfer
            receipt is in.
        receivedTokenDisplay:
          type:
            - string
            - 'null'
          description: What landed, in the token, for example `98.00 USDC`.
        txHash:
          type:
            - string
            - 'null'
          description: The on-chain transaction hash.
        receiptUrl:
          type:
            - string
            - 'null'
          description: A link to the transfer receipt.
  responses:
    Unauthorized:
      description: Missing or invalid `x-api-key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Invalid API key
            timestamp: '2026-08-06T12:00:00.000Z'
    TooManyRequests:
      description: >-
        Too many requests: at most 60 a minute to one route from one IP address,
        and fewer on some routes (the route says so). Wait a minute, then retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 429
            message: Too many tries in a row. Wait a minute, then try again.
            timestamp: '2026-10-31T12:00:00.000Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your secret key, from app.agentaos.ai -> Settings -> Developers -> API
        Keys. The key's prefix is both its identity and its environment:
        `sk_test_...` (sandbox, free, no verification) or `sk_live_...` (real
        money, requires business verification). A missing or invalid key returns
        401.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.