Islamic FinancePopular

Zakat Calculator API

Calculate zakat obligations on cash, gold, silver, stocks, business assets, and more. Uses current market prices when available, with clearly marked cached or estimated prices during upstream outages. Supports GET (simple) and POST (multi-asset) modes.

Endpoint:/api/v1/zakat/calculate
Method:GETPOST
Tier:All Plans

Legacy integrations using /api/v1/islamic-finance/zakat should be updated to /api/v1/zakat/calculate.

Try it out

GET/api/v1/zakat/calculate

Parameters

Used for this request only; it is not saved.

Code

curl
curl -X GET "https://khaleejiapi.dev/api/v1/zakat/calculate?amount=50000&currency=AED" \
-H "Authorization: Bearer your_api_key"

GET Parameters (Simple Mode)

ParameterTypeRequiredDescription
amountnumberRequired*Total wealth amount (alternative to assets JSON)
currencystringOptionalCurrency code (default: AED)
assetsJSONRequired*URL-encoded JSON array of asset objects (alternative to amount)

* Provide either amount or assets

POST Body (Multi-Asset Mode)

FieldTypeRequiredDescription
assets[].typestringRequiredcash, gold, silver, stocks, business, agriculture, mutual_funds, crypto, real_estate
assets[].valuenumberRequiredMonetary value of the asset
assets[].weightnumberOptionalWeight in grams (for gold/silver)
currencystringOptionalCurrency 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, including source (market or fallback), stale (whether the prices are stale), and fetchedAt (ISO 8601 timestamp)

reference

Calculation methodology: nisab basis, gold/silver gram thresholds (85g / 595g)

Rate Limits

PlanRequests/MonthRate Limit
Free1,00010 req/min
Starter10,00060 req/min
Professional100,000300 req/min
Business500,0001,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: "Bearer YOUR_API_KEY" },
});
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: Bearer YOUR_API_KEY" | 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.