# Zakat Calculator

Zakat on wealth, with the nisab priced against today's gold rather than a figure copied into a config file last year.

- Method: `GET`
- Path: `/v1/zakat`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `cash` | number | optional | Cash, current accounts, savings. |
| `gold_grams` | number | optional | Gold held, in grams. Valued at today's price. |
| `trade_goods` | number | optional | Trade goods and inventory, in rupiah. |
| `receivables` | number | optional | Money owed to you. |
| `liabilities` | number | optional | Debts due now. |
| `nisab` | string | optional | `gold` (85g) or `silver` (595g). |

**Example request**

```bash
curl https://api.diraz.ae/v1/zakat \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "currency": "IDR",
    "nisab": {
      "basis": "gold",
      "grams": 85,
      "gold_price_per_gram_idr": 2721000,
      "threshold_idr": 231285000
    },
    "assets": {
      "cash": 300000000,
      "gold_value": 0,
      "trade_goods": 0,
      "receivables": 0,
      "total": 300000000
    },
    "liabilities": 0,
    "net_wealth": 300000000,
    "due": true,
    "zakat_idr": 7500000,
    "shortfall_idr": 0,
    "assumptions": ["This is a calculation, not a fatwa. Where scholars differ, consult one."]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-18T16:32:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-18T17:10:15.000Z"
  }
}
```