# PPh 21 Tax Calculator

The employee income tax an employer withholds — the monthly TER rate straight off the PMK 168/2023 table, alongside the true annual computation it prepays.

- Method: `GET`
- Path: `/v1/tax/pph21`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `monthly_gross` | number | required | Monthly gross pay, before any deduction. |
| `ptkp_status` | string | required | `TK/0`-`TK/3` not married, `K/0`-`K/3` married; the number is dependants. |
| `months_worked` | integer | optional | Months worked this tax year, for the annual pro-rating. |

**Example request**

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

**Example response**

```json
{
  "data": {
    "monthly": { "ter_category": "A", "ter_rate": 0.08, "withholding_idr": 1400000 },
    "annual": {
      "months_worked": 8,
      "biaya_jabatan_idr": 4000000,
      "net_income_idr": 136000000,
      "annualised_income_idr": 204000000,
      "ptkp_idr": 54000000,
      "taxable_income_idr": 150000000,
      "brackets": [
        { "rate": 0.05, "taxed_idr": 60000000, "tax_idr": 3000000 },
        { "rate": 0.15, "taxed_idr": 90000000, "tax_idr": 13500000 }
      ],
      "tax_full_year_idr": 16500000,
      "tax_prorated_idr": 11000000
    }
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ"
  }
}
```