Developer API

FaraidPro REST API

Integrate the FaraidPro Islamic inheritance (Faraid) calculator into your own platform, legal software, or fintech application.

Base URL

https://www.faraidpro.com/api/v1

Estate API

POST /estates computes the full estate — funeral, debts and bequests (capped at one third), shares with rule ids and evidence, asset allocation with settlements, and a PDF link that expires after one hour. Also POST /estates/batch (up to 500), GET /estates/{id}, GET /estates/{id}/pdf, POST /webhooks and GET /usage. Use an fp_test_ key to try it without using your quota (PDFs are watermarked), and send an Idempotency-Key header to retry safely.

Public test suite (classical cases, live engine results)OpenAPI 3.1 specificationPostman collection

Authentication

The API is available for Pro and Business plan subscribers. All API requests require a Bearer token in the Authorization header.

Authorization: Bearer fp_live_xxxxxxxxxxxxxxxxx

Rate Limits

PlanRequests / minRequests / month
Pro6010,000
Business300100,000
EnterpriseUnlimitedUnlimited

Calculate Faraid

Calculate inheritance shares for a specific madhab, optionally with jurisdiction overlays.

POST /api/v1/calculate

Request Body

{
  "estateValue": 1000000,
  "currency": "MYR",
  "madhab": "shafii",
  "debts": 0,
  "funeralExpenses": 5000,
  "wasiyyah": 10000,
  "wasiyyahToHeirs": 0,
  "wasiyyahHeirsConsent": false,
  "country": "MY",
  "jurisdiction": "malaysia",
  "nationalLawMode": true,
  "heirs": [
    { "type": "wife", "count": 1 },
    { "type": "son", "count": 2 },
    { "type": "daughter", "count": 1 }
  ]
}

jurisdiction optional — "malaysia" | "uk". Applies regional deductions before Faraid.

country optional — ISO code (e.g., "MY", "PK", "UK"). Used for post-processing overlays.

nationalLawMode optional — Enables country-specific legal modifications.

heirs[].type — 40 positions: spouses, children and grandchildren (son-line and daughter-line), parents and grandparents (both sides), siblings of all three kinds and their children, uncles, aunts and cousins. The full list is in the OpenAPI schema. In the Sunni schools the daughter-line, maternal and female-line relatives are distant kindred (dhawū al-arḥām) and inherit only when no ʿaṣaba or non-spouse fixed-share heir exists. Under "madhab": "jafari" every position is a regular heir of its class: children of a deceased child, sibling or uncle stand in that relative's place (ruleId: "j.represent"), assuming one deceased relative per group; maternal uncles and aunts take 1/3.

Success Response (200 OK)

{
  "success": true,
  "data": {
    "version": "1.0.0",
    "madhab": "shafii",
    "distributableEstate": 689500,
    "jurisdictionDeductions": [
      {
        "name": "Harta Sepencarian",
        "amount": 295500,
        "description": "Matrimonial property (30%)"
      }
    ],
    "heirResults": [
      {
        "type": "wife",
        "count": 1,
        "amount": 86187.5,
        "percentage": 12.5,
        "finalShare": { "n": 1, "d": 8 }
      },
      ...
    ],
    "auditTrail": [...]
  }
}

Jurisdiction Overlays

When a jurisdiction is specified, the engine applies regional deductions before Faraid distribution.

JurisdictionDeductionDescription
"malaysia"Harta Sepencarian (30%)Matrimonial property claim assigned to surviving spouse before Faraid
"uk"UK IHT (40%)Inheritance Tax on estate above £325,000 Nil Rate Band

When nationalLawMode is true, post-processing overlays (e.g., Pakistan MFLO orphaned grandchild rules, Egypt Wasiyyah Wajibah, Iran Article 946) are also applied based on the country code.

Calculate Standard Intestacy

Calculate statutory distribution for UK Intestacy, US Generic Community Property, or Custom split rules.

POST /api/v1/calculate-standard

Request Body

{
  "estateValue": 500000,
  "currency": "GBP",
  "jurisdiction": "uk_england",
  "debts": 10000,
  "funeralExpenses": 5000,
  "heirs": [
    { "type": "spouse", "count": 1 },
    { "type": "child", "count": 2 }
  ]
}

Success Response (200 OK)

{
  "success": true,
  "data": {
    "version": "1.0.0",
    "jurisdiction": "uk_england",
    "distributableEstate": 485000,
    "results": [
      {
        "type": "spouse",
        "amount": 403500,
        "percentage": 83.2,
        "description": "Statutory legacy + 50%"
      },
      {
        "type": "child",
        "count": 2,
        "amount": 81500,
        "percentage": 16.8
      }
    ],
    "auditTrail": [...]
  }
}

Compare All Madhabs

Run calculation across all 5 schools simultaneously and compare results side-by-side.

POST /api/v1/compare

Request Body

{
  "estateValue": 1000000,
  "currency": "USD",
  "jurisdiction": "uk",
  "heirs": [
    { "type": "daughter", "count": 1 },
    { "type": "brother", "count": 1 }
  ]
}

Success Response (200 OK)

{
  "success": true,
  "data": {
    "hanafi":  { "distributableEstate": ..., "heirResults": [...] },
    "maliki":  { "distributableEstate": ..., "heirResults": [...] },
    "shafii":  { "distributableEstate": ..., "heirResults": [...] },
    "hanbali": { "distributableEstate": ..., "heirResults": [...] },
    "jafari":  { "distributableEstate": ..., "heirResults": [...] }
  }
}

Zakat Gold/Silver Rates

Fetch current Nisab thresholds based on live gold and silver prices.

GET /api/v1/zakat/rates

Success Response (200 OK)

{
  "gold_price_per_gram": 92.45,
  "silver_price_per_gram": 1.12,
  "nisab_gold": 7871.25,
  "nisab_silver": 700.56,
  "currency": "USD",
  "updated_at": "2026-05-22T00:00:00Z"
}

Error Handling

All errors follow a consistent JSON structure:

{
  "success": false,
  "error": "Unsupported madhab: xyz",
  "code": "INVALID_MADHAB"
}
HTTP CodeMeaning
400Invalid request body or missing required fields
401Missing or invalid API key
429Rate limit exceeded
500Internal calculation engine error

Quick Start (cURL)

curl -X POST https://www.faraidpro.com/api/v1/calculate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fp_live_YOUR_KEY" \
  -d '{
    "estateValue": 1000000,
    "currency": "USD",
    "madhab": "hanafi",
    "heirs": [
      { "type": "wife", "count": 1 },
      { "type": "son", "count": 2 }
    ]
  }'

Jaʿfarī with branches — the children of two deceased daughters, entered as separate branches so each daughter's share passes to her own children:

curl -X POST https://www.faraidpro.com/api/v1/calculate   -H "Content-Type: application/json"   -H "Authorization: Bearer fp_live_YOUR_KEY"   -d '{
    "estateValue": 1200000,
    "currency": "USD",
    "madhab": "jafari",
    "heirs": [
      { "type": "husband", "count": 1 },
      { "type": "sonOfDaughter", "count": 1, "branch": "Fatima" },
      { "type": "daughterOfDaughter", "count": 2, "branch": "Zaynab" }
    ]
  }'

Result: husband 1/4; Fatima's son 3/8; Zaynab's daughters 3/8 together (ruleId: "j.represent", each row echoes its branch). Without the branch ids the three grandchildren would be read as one daughter's children.