<!-- ZenPays documentation · https://docs.zenpayz.com/docs/rest-api/endpoints/accounting/wallet-summary -->

# Get Wallet Summary

Get a summary of wallet activity and balances. Additional endpoints are available for monthly analytics and trend analytics.

## Wallet Summary

<EndpointHeader verb="GET" path="/merchant/api/v1/wallet/summary" />

### 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 (200 OK)

```json
{
  "success": true,
  "data": {
    "total_wallets": 3,
    "active_currencies": ["USD", "INR", "EUR"],
    "total_balance_in_base_currency": 6200000,
    "base_currency": "USD",
    "currency_balances": [
      {
        "currency": "USD",
        "available_balance": 250000,
        "total_balance": 270000
      },
      {
        "currency": "INR",
        "available_balance": 5000000,
        "total_balance": 5350000
      }
    ]
  }
}
```

---

## Monthly Analytics

<EndpointHeader verb="GET" path="/merchant/api/v1/wallet/analytics/monthly" />

Retrieve monthly wallet analytics and trends.

### 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 (200 OK)

```json
{
  "success": true,
  "data": {
    "monthly_data": [
      {
        "month": "2026-01",
        "total_credited": 500000,
        "total_debited": 350000,
        "transaction_count": 1200
      }
    ]
  }
}
```

---

## Wallet Analytics

<EndpointHeader verb="GET" path="/merchant/api/v1/wallet/analytics" />

Retrieve wallet analytics with credit/debit trends over time.

### 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: "currency", type: "string", required: true, desc: "ISO 4217 currency code" },
    { name: "startDate", type: "string", desc: "Start date (ISO 8601)" },
    { name: "endDate", type: "string", desc: "End date (ISO 8601)" },
    { name: "granularity", type: "string", desc: "`daily`, `weekly`, or `monthly` (default: `daily`)" },
  ]}
/>

<CodeRail>

## Examples

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

```bash
# Get wallet summary
curl -X GET "https://api.zenpayz.com/merchant/api/v1/wallet/summary" \
  -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"

# Get monthly analytics
curl -X GET "https://api.zenpayz.com/merchant/api/v1/wallet/analytics/monthly" \
  -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"

# Get wallet analytics
curl -X GET "https://api.zenpayz.com/merchant/api/v1/wallet/analytics?currency=USD&granularity=daily" \
  -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
// Wallet summary and wallet analytics endpoints are REST-first in the
// merchant API surface.
// Use direct REST calls:
// GET /merchant/api/v1/wallet/summary
// GET /merchant/api/v1/wallet/analytics/monthly
// GET /merchant/api/v1/wallet/analytics?currency=USD&granularity=daily
```

  </TabItem>
</Tabs>

</CodeRail>
