Zakat Calculator API
Calculate zakat obligations on cash, gold, silver, stocks, business assets, and more. Uses live gold and silver prices for accurate nisab thresholds. Supports GET (simple) and POST (multi-asset) modes.
/api/v1/zakat/calculateTry it out
/api/v1/zakat/calculateParameters
Code
curl -X GET "https://khaleejiapi.dev/api/v1/zakat/calculate?amount=50000¤cy=AED" \ -H "Authorization: Bearer your_api_key"GET Parameters (Simple Mode)
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | number | Required* | Total wealth amount (alternative to assets JSON) |
| currency | string | Optional | Currency code (default: AED) |
| assets | JSON | Required* | URL-encoded JSON array of asset objects (alternative to amount) |
* Provide either amount or assets
POST Body (Multi-Asset Mode)
| Field | Type | Required | Description |
|---|---|---|---|
| assets[].type | string | Required | cash, gold, silver, stocks, business, agriculture, mutual_funds, crypto, real_estate |
| assets[].value | number | Required | Monetary value of the asset |
| assets[].weight | number | Optional | Weight in grams (for gold/silver) |
| currency | string | Optional | Currency code (default: AED) |
Response Fields
calculation
Core result: totalWealth, nisabThreshold, eligible flag, zakatRate (2.5%), zakatDue, and currency
breakdown[]
Per-asset breakdown: type, value, zakatDue, rate, and explanatory note
metalPrices
Live gold and silver prices per gram used for nisab calculation with source and timestamp
reference
Calculation methodology: nisab basis, gold/silver gram thresholds (85g / 595g)
Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 1,000 | 10 req/min |
| Starter | 10,000 | 60 req/min |
| Professional | 100,000 | 300 req/min |
| Business | 500,000 | 1,000 req/min |
Debugging & Support
Include X-Request-ID when contacting support
Every response from KhaleejiAPI includes an X-Request-ID header — a unique identifier that lets our support team pull the exact log entry for your request within seconds. Always share it when reporting an unexpected error or unexpected result.
How to capture it
JavaScript / fetch
const res = await fetch("https://khaleejiapi.dev/api/v1/...", {
headers: { Authorization: "******" },
});
const requestId = res.headers.get("x-request-id");
console.log("Request ID:", requestId);
// → e.g. "req_01j9xkz4vp8..."cURL
curl -si "https://khaleejiapi.dev/api/v1/..." \ -H "Authorization: ******" | grep -i x-request-id # → x-request-id: req_01j9xkz4vp8...
Browser DevTools
Open DevTools (F12) → Network tab → click the failing request → scroll to the Response Headers section → copy the value next to x-request-id.
For a full list of error codes and guidance on common issues, see the Troubleshooting guide.