Skip to content
All APIs

Take-Home Pay Calculator

Indonesia · Finance · 1 endpoint

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.

Base URL

https://api.diraz.ae
1 requestsNo cache1 credit / request

Endpoint

GET/v1/payroll/thp

Snippet

Request — cURL

v1

curl https://api.diraz.ae/v1/payroll/thp \
  -H "Authorization: Bearer drz_live_…"

Query 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

v1

{
  "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

401 Unauthorized

v1

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "The API key is invalid, expired, or revoked."
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ"
  }
}

Every failure carries a stable machine-readable code before the human message, and the same meta.request_id the successful responses carry. Quote it and we can find your exact request.

Errors are free

Nothing on this page is billed. You are charged for a 2xx and nothing else — a rejected key, a bad parameter, a rate limit, or an outage on our side all cost you zero. Retry without watching the meter.

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.
Total requests1
CacheNone
Status
Operational
Category
Finance
Scope
market:read
Rate limit
300 requests / 60s per key
Pricing
1 credit / request
Request a keyView as Markdown
  • Take-Home Pay Calculator

1/1 passing