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

# Get Batch Payout

Retrieve the status and progress of a batch payout.

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

## Request

### Path Parameters

<ParamTable
  rows={[
    { name: "batchId", type: "string", required: true, desc: "Batch payout ID" },
  ]}
/>

### 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" },
  ]}
/>

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "batchId": "batch_xxxxx",
    "status": "processing",
    "totalPayouts": 50,
    "successfulPayouts": 35,
    "failedPayouts": 3,
    "pendingPayouts": 12,
    "progressPercentage": 76,
    "totalAmount": 250000,
    "currency": "INR",
    "totalFees": 1250,
    "processingStats": {}
  }
}
```

### Error Responses

<ErrorTable
  rows={[
    { code: "BATCH_NOT_FOUND", status: "404", message: "Batch payout doesn't exist" },
    { code: "UNAUTHORIZED", status: "401", message: "Invalid API key" },
  ]}
/>

<CodeRail>

## Examples

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

```bash
curl "https://api.zenpays.com/payment/api/v1/batch-payouts/batch_xxxxx" \
  -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 batch = await zenpays.payouts.getBatch('batch_xxxxx')
console.log(`Progress: ${batch.progressPercentage}%`)
console.log(`Successful: ${batch.successfulPayouts}/${batch.totalPayouts}`)
```

  </TabItem>
</Tabs>

</CodeRail>

## Related Endpoints

- [Create Batch Payout](/docs/rest-api/endpoints/payouts/create-batch-payout)
- [Batch Payout Items](/docs/rest-api/endpoints/payouts/batch-payout-items)
- [List Batch Payouts](/docs/rest-api/endpoints/payouts/list-batch-payouts)
