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

# List payout batches

> Requires `payout-batches:read`. See [Payout batches behavior](/developer-documentation/api/finance) and [common API rules](/developer-documentation/api/overview). Pass pagination=cursor for {data, nextCursor}; omitting it returns the legacy latest-50 array. The legacy id query selects one batch. X-Program-Id selects the program in both cursor and legacy response modes.

Requires `payout-batches:read`. See the [payout batches guide](https://www.referly.so/docs/developer-documentation/api/finance.md) for behavior and examples.


## OpenAPI

````yaml GET /payout-batches
openapi: 3.0.3
info:
  title: Referly API
  description: >-
    REST API for affiliates, referrals, sales, links, coupons, programs, groups,
    commission plans, commissions, adjustments, balances, payouts, analytics and
    webhooks. Send Authorization: Bearer <YOUR_API_KEY>. Keys have resource
    permissions and optional expiry. Requests default to the key’s original
    program; operational endpoints also support X-Program-Id for a program
    created by that exact key. See the authentication and operational API guides
    for scope, pagination, errors and retry behavior.
  version: 1.0.0
servers:
  - url: https://www.referly.so/api/v1
security:
  - bearerAuth: []
paths:
  /payout-batches:
    get:
      tags:
        - payout-batches
      summary: List payout batches
      description: >-
        Requires `payout-batches:read`. See [Payout batches
        behavior](/developer-documentation/api/finance) and [common API
        rules](/developer-documentation/api/overview). Pass pagination=cursor
        for {data, nextCursor}; omitting it returns the legacy latest-50 array.
        The legacy id query selects one batch. X-Program-Id selects the program
        in both cursor and legacy response modes.
      operationId: get_payout_batches
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: pagination
          in: query
          required: false
          schema:
            type: string
            enum:
              - cursor
            description: >-
              Required to opt into paginated data/nextCursor; omit for legacy
              latest-50 array.
        - name: id
          in: query
          required: false
          schema:
            type: string
        - name: X-Program-Id
          in: header
          required: false
          description: >-
            Select the key's original program or a program provisioned by this
            exact key. Other owned programs remain inaccessible.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Success. Monetary amounts use program currency; see companion
            documentation for resource fields.
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      type: object
                  - type: object
              examples:
                paginated:
                  summary: pagination=cursor
                  value:
                    data:
                      - id: batch_2f88a163
                        createdAt: '2026-09-30T02:00:00.000Z'
                        updatedAt: '2026-09-30T02:00:00.000Z'
                        status: READY
                        periodStart: '2026-09-01T00:00:00.000Z'
                        periodEnd: '2026-09-30T23:59:59.000Z'
                        affiliateProgramId: prog_acme_partners
                        paidMethod: INTEGRATION
                        payoutMethod: WISE
                        rewardType: CASH
                        externalBatchId: null
                        failedReason: null
                        manuallyPaidAt: null
                        isReferlyPayouts: false
                        payouts:
                          - id: pay_7c1e4b90
                            affiliateId: aff_9f2c1e42
                            affiliateProgramId: prog_acme_partners
                            amount: 342.75
                            currency: USD
                            status: PENDING
                            paymentMethod: WISE
                            rewardType: CASH
                            nonCashRewardType: null
                            periodStart: '2026-09-01T00:00:00.000Z'
                            periodEnd: '2026-09-30T23:59:59.000Z'
                            createdAt: '2026-09-30T02:00:00.000Z'
                            payoutBatchId: batch_2f88a163
                            failedReason: null
                            externalId: null
                            manuallyPaid: false
                            paidAt: null
                            vatRate: 0
                            vatAmount: 0
                            amountLockedAt: null
                            referlyChargeId: null
                            commissions:
                              - id: 4821
                                commissionEarned: 42.5
                              - id: 4903
                                commissionEarned: -12.5
                    nextCursor: null
                legacy:
                  summary: default (no pagination param)
                  value:
                    - id: batch_2f88a163
                      createdAt: '2026-09-30T02:00:00.000Z'
                      updatedAt: '2026-09-30T02:00:00.000Z'
                      status: READY
                      periodStart: '2026-09-01T00:00:00.000Z'
                      periodEnd: '2026-09-30T23:59:59.000Z'
                      affiliateProgramId: prog_acme_partners
                      paidMethod: INTEGRATION
                      payoutMethod: WISE
                      rewardType: CASH
                      externalBatchId: null
                      failedReason: null
                      manuallyPaidAt: null
                      isReferlyPayouts: false
                      payouts:
                        - id: pay_7c1e4b90
                          affiliateId: aff_9f2c1e42
                          affiliateProgramId: prog_acme_partners
                          amount: 342.75
                          currency: USD
                          status: PENDING
                          paymentMethod: WISE
                          rewardType: CASH
                          nonCashRewardType: null
                          periodStart: '2026-09-01T00:00:00.000Z'
                          periodEnd: '2026-09-30T23:59:59.000Z'
                          createdAt: '2026-09-30T02:00:00.000Z'
                          payoutBatchId: batch_2f88a163
                          failedReason: null
                          externalId: null
                          manuallyPaid: false
                          paidAt: null
                          vatRate: 0
                          vatAmount: 0
                          amountLockedAt: null
                          referlyChargeId: null
                          commissions:
                            - id: 4821
                              commissionEarned: 42.5
                            - id: 4903
                              commissionEarned: -12.5
        '400':
          description: Malformed JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: invalid_json
                  message: Invalid JSON body
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Invalid, expired or revoked API key
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '403':
          description: Scope or entitlement denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: insufficient_scope
                  message: Requires payout-batches:read
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '404':
          description: Not found within this program
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Resource not found
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '409':
          description: State or idempotency conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: concurrent_request
                  message: Concurrent operation; retry the same request
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '413':
          description: Body too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: body_too_large
                  message: Request body must be at most 64 KiB
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: validation_error
                  message: Invalid request parameters
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '429':
          description: Rate limit exceeded; observe Retry-After
          content:
            application/json:
              schema:
                $ref: f48d42e5-fe37-407f-b348-be8b1adae0be
              example:
                error: Too many requests. Please slow down.
                retryAfter: 42
        '500':
          description: Internal failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: internal_error
                  message: Request failed
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
        '502':
          description: Webhook provider failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: webhook_provider_error
                  message: The webhook provider request failed
                  requestId: 5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human readable description of what went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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