# Invoice Tax Calculator

PPN added or extracted, plus the buyer's income-tax withholding — to the rupiah that finally changes hands.

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

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `amount` | number | required | The invoice figure. |
| `mode` | string | optional | `base` (default) adds PPN; `inclusive` extracts it. |
| `vat_rate` | number | optional | PPN rate — decimal (0.12, default) or percent (12). |
| `withholding_rate` | number | optional | Buyer's withholding on the gross — decimal (0.02) or percent (2). |

**Example request**

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

**Example response**

```json
{
  "data": {
    "base_amount_idr": 10000000,
    "vat_rate": 0.12,
    "vat_idr": 1200000,
    "gross_amount_idr": 11200000,
    "withholding_rate": 0.02,
    "withholding_idr": 224000,
    "net_payable_idr": 10976000
  },
  "meta": { "request_id": "req_7Q2fK4mZ" }
}
```