Contracts
Contracts
Section titled “Contracts”Understanding Islamic financial contracts in the platform.
Contract Lifecycle
Section titled “Contract Lifecycle”stateDiagram-v2 direction LR
[*] --> Draft: 📝 Create Draft --> Active: ✅ Approve Draft --> Rejected: ❌ Reject Active --> Mature: 📅 Complete Term Active --> Suspended: ⚠️ Issue Found Suspended --> Active: 🔄 Resolve Mature --> Settled: 💰 Final Payment Mature --> Closed: 📋 Close Settled --> Closed: 📁 Archive Closed --> [*]
note right of Draft: Shariah compliance review note right of Active: Contract in force note right of Suspended: Under investigation
classDef green fill:#1a5f4a,color:#fff,stroke:#1a5f4a classDef blue fill:#1565c0,color:#fff,stroke:#1565c0 classDef orange fill:#e65100,color:#fff,stroke:#e65100 classDef red fill:#c62828,color:#fff,stroke:#c62828 classDef gray fill:#455a64,color:#fff,stroke:#455a64
class Draft blue class Active green class Mature green class Settled green class Suspended orange class Rejected red class Closed grayContract Types
Section titled “Contract Types”Murabaha (Cost-Plus Sale)
Section titled “Murabaha (Cost-Plus Sale)”const murabaha = await iof.contracts.create({ type: "MURABAHA", counterparty: { id: "cpty_123" }, terms: { assetDescription: "Commercial vehicle", purchasePrice: 50000, markup: 5000, totalPrice: 55000, tenure: 36, // months paymentFrequency: "monthly", },});Ijarah (Leasing)
Section titled “Ijarah (Leasing)”const ijarah = await iof.contracts.create({ type: "IJARAH", counterparty: { id: "cpty_456" }, asset: { id: "asset_789" }, terms: { rentalAmount: 1500, paymentFrequency: "monthly", duration: 24, maintenanceResponsibility: "lessor", },});Musharakah (Partnership)
Section titled “Musharakah (Partnership)”const musharakah = await iof.contracts.create({ type: "MUSHARAKAH", partners: [ { id: "partner_1", capitalContribution: 60000 }, { id: "partner_2", capitalContribution: 40000 }, ], terms: { profitSharingRatio: { partner_1: 50, partner_2: 50 }, lossSharingRatio: { partner_1: 60, partner_2: 40 }, projectDuration: 12, },});Contract Operations
Section titled “Contract Operations”Create
Section titled “Create”const contract = await iof.contracts.create({ ... });Retrieve
Section titled “Retrieve”const contract = await iof.contracts.retrieve("contract_123");Update
Section titled “Update”const updated = await iof.contracts.update("contract_123", { status: "active",});const contracts = await iof.contracts.list({ type: "MURABAHA", status: "active", limit: 20,});Compliance Checks
Section titled “Compliance Checks”All contracts are validated:
const validation = await iof.contracts.validate("contract_123");// {// valid: true,// checks: [// { rule: "shariah_compliance", passed: true },// { rule: "jurisdiction", passed: true }// ]// }Next Steps
Section titled “Next Steps”- Contracts API - Full API reference
- Compliance - Compliance rules