Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.paybridgenp.com/llms.txt

Use this file to discover all available pages before exploring further.

PayBridge NP supports per-merchant tax configuration on subscription invoices. Nepal VAT is 13%.

Quick start

Enable tax and set your PAN:
curl -X PATCH https://api.paybridgenp.com/v1/billing/settings/tax \
  -H "Authorization: Bearer sk_sandbox_…" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "rateBps": 1300,
    "label": "VAT",
    "registrationNumber": "301XXXXXXX"
  }'
Rate is stored in basis points: 1300 = 13.00%. Label defaults to "VAT" (rendered as "VAT (13.00%)" on invoices).

Snapshot semantics - rate changes don’t rewrite history

When an invoice is generated, PayBridge snapshots the merchant’s tax_rate_bps and tax_registration_number onto the invoice row. If you later change your rate (say, government raises VAT to 15%), historical invoices keep showing 13% - the snapshot is the legal record of what was charged. This matters for reporting and audits. You can see the snapshot on any invoice via GET /v1/billing/invoices/:id - it returns taxRateBps and taxRegistrationNumber independent of the merchant’s current settings.

Math - discount before tax

PayBridge applies discount before tax (Stripe default). Customers pay tax on the discounted price, not the list price:
subtotal       = 500 NPR plan
discount_total = 50 NPR promo
taxable_base   = max(0, 500 - 50) = 450 NPR
tax_total      = round(450 * 1300 / 10000) = 58.50 NPR
amount_due     = 500 - 50 + 58.50 = 508.50 NPR
All integer math internally - amounts stored as paisa (1 NPR = 100 paisa).

What the customer sees

The hosted invoice page and the invoice email show a breakdown:
Subtotal         NPR 500.00
Discount         -NPR 50.00
VAT (13.00%)     +NPR 58.50
─────────────────────────────
Total            NPR 508.50
When taxRegistrationNumber is set, it prints in the invoice footer (e.g. "PAN: 301XXXXXXX").

Disabling tax

Set enabled: false - future invoices are generated with tax_rate_bps = 0 and no tax line item. Historical invoices keep their snapshot.