Indonesia · Finance · 1 endpoint
Take-Home Pay Calculator
Gross to net in one call — BPJS Ketenagakerjaan, BPJS Kesehatan, and PPh 21 TER off the gross, and the rupiah that actually lands in the account.
- Status
- Operational
- Price
- 1 credit / request
- Rate limit
- 300 / 60s
- Cache
- None
- Requests
- 0
Endpoint
How to call it
GET/v1/payroll/thp
Code
Request — cURL
v1
curl https://api.diraz.co.id/v1/payroll/thp \
-H "Authorization: Bearer drz_live_…"For AI agents
Callable through the MCP server with the same key:
call_api {"endpoint":"thp-calculator","params":{"monthly_gross":"10000000","ptkp_status":"TK/0","ward_class":"1"}}Parameters
- monthly_grossnumber · required
- Monthly gross pay (gaji + tunjangan tetap).
- ptkp_statusstring · required
- As the PPh 21 calculator takes it: `TK/0`-`K/3`.
- ward_classinteger · optional
- BPJS Kesehatan ward class 1-3 for the employee share.Default: 1
- risk_classinteger · optional
- BPJS Ketenagakerjaan JKK risk class I-V.Default: I
Example response
200 OK
JSON
{
"data": {
"monthly_gross_idr": 10000000,
"deductions": {
"jht_idr": 370000,
"jp_idr": 200000,
"bpjs_kesehatan_idr": 100000,
"pph21_idr": 200000
},
"total_deductions_idr": 870000,
"take_home_pay_idr": 9130000
},
"meta": {
"request_id": "req_7Q2fK4mZ"
}
}- deductions.jht_idr / jp_idr
- Employee shares: JHT 3.7% uncapped, JP 2% on wages up to the pension ceiling.
- deductions.bpjs_kesehatan_idr
- The employee's 1% share, capped at the wage ceiling.
- deductions.pph21_idr
- The month's TER withholding.
- take_home_pay_idr
- Gross minus every deduction — the number the employee cares about.
- employer_contributions
- The employer's side of every program, JKK and JKM included — the full cost of the hire.
Errors
When something goes wrong
Every failure carries a stable machine-readable code and the same meta.request_id a success carries — quote it and we can find your request. Errors are never billed.
401 Unauthorized
JSON
{
"error": {
"code": "UNAUTHORIZED",
"message": "The API key is invalid, expired, or revoked."
},
"meta": {
"request_id": "req_7Q2fK4mZ"
}
}- UNAUTHORIZEDHTTP 401
- Missing, malformed, expired, or revoked API key.
- FORBIDDENHTTP 403
- The key is valid but lacks the scope this product needs.
- VALIDATION_ERRORHTTP 422
- A query parameter is the wrong type or out of range.
- RATE_LIMITEDHTTP 429
- Rate limit exhausted. `Retry-After` says how long to wait.
- SERVICE_UNAVAILABLEHTTP 503
- No data recent enough to serve. Carries `Retry-After`, and is never billed.
Health
Is it up?
- Take-Home Pay Calculator
1/1 passing