Skip to content

Zakat Rail

Zakat calculation, distribution, and compliance for Islamic finance.

The Zakat Rail provides endpoints for calculating, tracking, and distributing Zakat in compliance with Islamic principles.

/api/v1/zakat
POST /api/v1/zakat/calculate

Calculate Zakat obligation based on assets.

Request Body:

{
"assets": {
"cash": "50000.00",
"gold": "1000.00",
"silver": "500.00",
"tradingGoods": "25000.00",
"investments": "100000.00"
},
"liabilities": {
"debts": "10000.00"
},
"currency": "SAR",
"calculationDate": "2025-01-15",
"nisabType": "gold"
}

Response:

{
"data": {
"calculationId": "zak_abc123",
"totalAssets": "176500.00",
"totalLiabilities": "10000.00",
"netZakatableWealth": "166500.00",
"nisabThreshold": "15000.00",
"isZakatDue": true,
"zakatAmount": "4162.50",
"zakatRate": "0.025",
"currency": "SAR",
"calculationDate": "2025-01-15"
}
}
GET /api/v1/zakat/nisab

Get current Nisab thresholds.

Query Parameters:

ParameterTypeDescription
currencystringCurrency code (default: USD)
datestringDate for rates (default: today)

Response:

{
"data": {
"gold": {
"grams": 85,
"value": "5500.00",
"currency": "USD"
},
"silver": {
"grams": 595,
"value": "450.00",
"currency": "USD"
},
"date": "2025-01-15",
"source": "market_rates"
}
}
POST /api/v1/zakat/distributions

Create a Zakat distribution record.

Request Body:

{
"calculationId": "zak_abc123",
"amount": "4162.50",
"currency": "SAR",
"recipients": [
{
"category": "FUQARA",
"amount": "1000.00",
"description": "Poor and needy"
},
{
"category": "MASAKIN",
"amount": "1000.00",
"description": "Destitute"
}
],
"distributionDate": "2025-01-20"
}
GET /api/v1/zakat/calculations

List Zakat calculations for the tenant.

Query Parameters:

ParameterTypeDescription
pagenumberPage number
perPagenumberItems per page
yearnumberFilter by Hijri year
statusstringFilter by status
POST /api/v1/zakat/assets/classify

Classify assets for Zakat eligibility.

Request Body:

{
"assets": [
{
"type": "STOCK",
"name": "Company Shares",
"value": "50000.00",
"purpose": "TRADING"
}
]
}
CategoryArabicDescription
FUQARAالفقراءThe poor
MASAKINالمساكينThe needy
AMILINالعاملين عليهاZakat administrators
MUALLAFATالمؤلفة قلوبهمThose whose hearts are to be reconciled
RIQABالرقابFreeing captives
GHARIMINالغارمينThose in debt
FI_SABILILLAHفي سبيل اللهIn the cause of Allah
IBN_SABILابن السبيلThe wayfarer
EventDescription
zakat.calculatedZakat calculation completed
zakat.distributedZakat distribution recorded
zakat.nisab.updatedNisab rates updated
CodeDescription
BELOW_NISABNet wealth below Nisab threshold
INVALID_ASSET_TYPEUnrecognized asset type
CALCULATION_FAILEDCalculation error