<!-- ZenPays documentation · https://docs.zenpays.com/docs/rest-api/endpoints/payouts/list-batch-payouts -->

# List Batch Payouts

List all batch payouts for the merchant with optional filters.

<EndpointHeader verb="GET" path="/payment/api/v1/batch-payouts" />

## Request

### Headers

<ParamTable
  label="Header"
  rows={[
    { name: "Authorization", required: true, desc: "`Bearer {api_key}`" },
    { name: "X-Signature", required: true, desc: "HMAC-SHA256 signature" },
    { name: "X-Timestamp", required: true, desc: "ISO 8601 timestamp" },
    { name: "X-Secret-Salt", required: true, desc: "Secret salt for HMAC validation" },
  ]}
/>

### Query Parameters

<ParamTable
  rows={[
    { name: "page", type: "number", desc: "Page number (default: 1)" },
    { name: "limit", type: "number", desc: "Items per page (default: 20)" },
    { name: "status", type: "string", desc: "Filter by status" },
    { name: "fromDate", type: "string", desc: "Start date (ISO format)" },
    { name: "toDate", type: "string", desc: "End date (ISO format)" },
  ]}
/>

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "batches": [
      {
        "batchId": "batch_xxxxx",
        "fileName": "json_batch_batch_xxxxx",
        "status": "completed",
        "totalPayouts": 50,
        "successfulPayouts": 48,
        "failedPayouts": 2,
        "pendingPayouts": 0,
        "totalAmount": 250000,
        "currency": "INR",
        "totalFees": 1250,
        "createdAt": "2024-01-15T10:30:00.000Z",
        "updatedAt": "2024-01-15T11:00:00.000Z",
        "progressPercentage": 100
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 5,
      "totalPages": 1,
      "hasNext": false,
      "hasPrev": false
    }
  }
}
```

<CodeRail>

## Examples

<Tabs groupId="language">
  <TabItem value="curl" label="cURL" default>

```bash
curl "https://api.zenpays.com/payment/api/v1/batch-payouts?status=completed&limit=10" \
  -H "Authorization: Bearer zp_test_xxxxx" \
  -H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
  -H "X-Signature: a1b2c3d4e5f6..." \
  -H "X-Secret-Salt: your_secret_salt"
```

  </TabItem>
  <TabItem value="sdk" label="SDK">

```javascript
const { data } = await zenpays.payouts.listBatches({
  status: 'completed',
  limit: 10,
})

data.forEach(batch => {
  console.log(`${batch.batchId}: ${batch.successfulPayouts}/${batch.totalPayouts} succeeded`)
})
```

  </TabItem>
</Tabs>

</CodeRail>

## Related Endpoints

- [Create Batch Payout](/docs/rest-api/endpoints/payouts/create-batch-payout)
- [Get Batch Payout](/docs/rest-api/endpoints/payouts/get-batch-payout)
