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

# Download payment batch

> Retrieve and download submitted payment files along with any associated errors or warnings to review or correct issues. The downloaded file includes a

# Download a payment batch

Retrieve and download submitted payment files along with any associated errors or warnings to review or correct issues. The downloaded file includes additional columns for errors or warnings, allowing you to address issues and re-upload corrected files. You can filter the data by payment statuses or specific order references.

<Note>
  **POST** `/v2/batches/{paymentBatchId}/payments/download`
</Note>

### Request

Use this endpoint to download a file containing all payments submitted within a payment batch.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}/payments/download?accountId=F50091&statuses=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'content-type: text/csv' \
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}/payments/download?accountId=F50091&statuses=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'content-type: text/csv' \
  ```
</CodeGroup>

#### Path parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that this payment is associated with.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

<ParamField body="statuses" type="string">
  A list of statuses to filter by.

  Allowable values: `draft`, `validated`, `confirmed`, `started`, `completed`, `failed`, `cancelled`
</ParamField>

### Response

If the request is successful, you'll receive a `200` OK status, indicating that the file has been successfully generated and returned.

For more detailed information about this request and its response, see API reference.
