# Payout Report

Payout report as CSV, one row per payment in the window, streamed as it is read.
`start` and `end` bound the window on payment creation time, and `country` picks the corridor; both are required. `status` narrows to the listed statuses. `ids` narrows to specific payments — set `external` to supply the `external_id` values from the original payment requests instead of LeanX ids. An id that matches nothing still gets a row carrying just that id, so the report accounts for every id sent.
Beneficiary account validation is not part of this report.

Endpoint: POST /v3/reports/payout
Version: 3.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `start` (string, required)
    Start of the window, on order creation

  - `end` (string, required)
    End of the window, exclusive

  - `country` (string, required)
    Enum: "BGD", "IND", "PAK", "PHL", "NPL", "EGY", "VNM", "NGA"

  - `status` (any)
    Filter on the effective status — the one the report reports, overrides applied

  - `external` (boolean)
    When true, `ids` holds `external_id` values from the original payment requests rather than LeanX ids

  - `ids` (any)
    Only report these payments. An id that matches nothing still gets a row, carrying just the id.

  - `sorting_order` (string)
    ORDER BY direction with explicit nulls handling.
`ASC` => `ASC NULLS LAST`
`DESC` => `DESC NULLS LAST`
Both place nulls at the end, which should be a sane default
    Enum: "asc", "desc"

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 400:

  - `400` (unknown)
    Bad data in the request

## Response 400 fields (application/problem+json):

  - `type` (string, required)

  - `title` (string, required)

  - `status` (integer, required)

  - `detail` (any)

  - `instance` (any)

## Response 401:

  - `401` (unknown)
    Access token not valid or expired

## Response 401 fields (application/problem+json):

  - `type` (string, required)

  - `title` (string, required)

  - `status` (integer, required)

  - `detail` (any)

  - `instance` (any)

## Response 403:

  - `403` (unknown)
    Access token missing permissions to access the resource

## Response 403 fields (application/problem+json):

  - `type` (string, required)

  - `title` (string, required)

  - `status` (integer, required)

  - `detail` (any)

  - `instance` (any)

## Response 422:

  - `422` (unknown)
    One or more request fields are invalid

## Response 422 fields (application/problem+json):

  - `type` (string, required)

  - `title` (string, required)

  - `status` (integer, required)

  - `detail` (any)

  - `instance` (any)

  - `errors` (array, required)

  - `errors.detail` (string, required)

  - `errors.pointer` (string, required)

  - `errors.code` (any)

  - `errors.input` (any)

## Response 429:

  - `429` (unknown)
    Request rate too high; back off and retry. Where a `retry-after` response header is present it gives the seconds to wait.

## Response 429 fields (application/problem+json):

  - `type` (string, required)

  - `title` (string, required)

  - `status` (integer, required)

  - `detail` (any)

  - `instance` (any)

## Response 500:

  - `500` (unknown)
    Internal server error (contact administrator)

## Response 500 fields (application/problem+json):

  - `type` (string, required)

  - `title` (string, required)

  - `status` (integer, required)

  - `detail` (any)

  - `instance` (any)

