Skip to content

Calculate Zakat

Request

Get Zakat calculation results for a stock ticker.

Token is generated from secretKey + time + symbol (path parameter), not a JSON body.

Response body:

FieldTypeDescription
symbolstringStock symbol
valuenumberMarket price of a stock
investment_typestringShort-term or Long-term. Short-term holdings (typically < 1 year) are treated as liquid/cash and zakat is 2.5% of the total amount. Long-term holdings (> 1 year) use the underlying zakatable assets of the company.
zakat_amount_per_sharenumberZakat amount per share
Path
symbolstringrequired

Stock ticker. Defaults to the UAT environment {{symbol}} (AAPL).

Default:"AAPL"
Example:AAPL
Headers
clientIdstringrequired

B2B UAT client ID. Sent as a request header (not Redocly Auth).

Default:"AX6kFk5ywERyXobt"
Example:AX6kFk5ywERyXobt
timestring^\d{14}$required

UTC timestamp yyyyMMddHHmmss used to compute token.

Default:"20260831110225"
Example:20260831110225
tokenstringrequired

Base64(SHA512(secretKey + time + jsonBody)). Must match this operation's request body.

Default:"8JlA17aQxmNWWI77YCijo+XmFEDQFLzzcBGEOHnv6g8VN4BmQqwr7LiGu1zCjhstVkh2ircylrgdGFT+iAdIMA=="
Example:8JlA17aQxmNWWI77YCijo+XmFEDQFLzzcBGEOHnv6g8VN4BmQqwr7LiGu1zCjhstVkh2ircylrgdGFT+iAdIMA==
curl --location 'https://b2b.musaffa.us/b2b/api/demo/musaffa/stocks/calculate_zakat/AAPL' \
--header 'Content-Type: application/json' \
--header 'clientId: AX6kFk5ywERyXobt' \
--header 'time: 20260831110225' \
--header 'token: 8JlA17aQxmNWWI77YCijo+XmFEDQFLzzcBGEOHnv6g8VN4BmQqwr7LiGu1zCjhstVkh2ircylrgdGFT+iAdIMA=='

Responses

Dynamic zakat calculation for the requested symbol

Bodyapplication/json
symbolstring
valuenumber

Market price of a stock

investment_typestring

Short-term or Long-term

zakat_amount_per_sharenumber
Response
{ "symbol": "string", "value": 0, "investment_type": "string", "zakat_amount_per_share": 0 }