Guides

Taxes

Tax rates applied to invoices, by default or per customer, plan or charge.

Create a tax rate

curl -X POST https://api.pimabill.com/api/taxes \
  -H "Authorization: Bearer sk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "VAT",
    "code": "vat_18",
    "rate": 18,
    "description": "Uganda VAT",
    "appliedByDefault": true
  }'

rate is a percentage. A tax with appliedByDefault: true applies to every invoice unless something more specific says otherwise.

Which taxes apply

The most specific assignment wins, checked in this order:

  1. Charge: taxes on a usage charge (POST /api/taxes/charge/{chargeId})
  2. Plan: taxes on a plan (POST /api/taxes/plan/{planId})
  3. Customer: taxes for one customer (POST /api/taxes/customer/{customerId}), for example a different rate in another country
  4. Default: every tax with appliedByDefault

Assign with { "taxId": "tax_123" } in the body, list with GET on the same path, and remove with DELETE .../{taxId}. To exempt a customer, give them their own assignment (such as a 0% tax) so the defaults no longer apply.

Taxes are calculated after coupons and add-ons, and before prepaid wallet credit is used.

Copyright © 2026