# 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.

- Method: `GET`
- Path: `/v1/payroll/thp`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `monthly_gross` | number | required | Monthly gross pay (gaji + tunjangan tetap). |
| `ptkp_status` | string | required | As the PPh 21 calculator takes it: `TK/0`-`K/3`. |
| `ward_class` | integer | optional | BPJS Kesehatan ward class 1-3 for the employee share. |
| `risk_class` | integer | optional | BPJS Ketenagakerjaan JKK risk class I-V. |

**Example request**

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

**Example response**

```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"
  }
}
```