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

# Get Payout Statistics

:::danger[Deprecated — Do Not Use]
This endpoint is **deprecated** and will be removed in a future release. It is no longer maintained and may produce unexpected behavior.

**Use [Payout Intents](/docs/rest-api/endpoints/payout-intents/list-payout-intents) instead.**
:::

Retrieve payout statistics and metrics.

<EndpointHeader verb="GET" path="/merchant/api/v1/payouts/stats" />

## 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: "fromDate", type: "string", default: "30 days ago", desc: "Start date (ISO 8601)" },
    { name: "toDate", type: "string", default: "now", desc: "End date (ISO 8601)" },
    { name: "currency", type: "string", default: "-", desc: "Filter by currency" },
  ]}
/>

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "totalPayouts": 1250,
    "totalVolume": 15000000,
    "totalFees": 31250,
    "successRate": 98.5,
    "averageAmount": 12000,
    "byStatus": {
      "succeeded": 1231,
      "failed": 15,
      "pending": 4
    },
    "byType": {
      "IMPS": 850,
      "NEFT": 300,
      "UPI": 100
    },
    "averageProcessingTime": "45 seconds"
  }
}
```

<CodeRail>

## Examples

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

```bash
curl -X GET "https://api.zenpays.com/merchant/api/v1/payouts/stats?currency=INR" \
  -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 stats = await zenpays.payouts.getStats({ currency: 'INR' });
console.log(`Success rate: ${stats.successRate}%`);
```

  </TabItem>
</Tabs>

</CodeRail>
