Recipe: Tax-exempt customer handling
Automatically detect and exempt qualifying customers from sales tax using Meridian's validation endpoint and customer metadata.
Overview
Meridian exposes a POST /v1/tax/validate endpoint. Pass the customer's exemption certificate ID and jurisdiction; the API returns a boolean verdict and an expiration timestamp.
Step 1 — Store exemption metadata
Attach tax_exempt_id and tax_jurisdiction to the customer object in Meridian. These fields persist across sessions and are included in every checkout webhook payload.
Step 2 — Validate at checkout
Before finalizing an invoice, call the validation endpoint. If the response is valid: true, set the tax rate to zero and record the exemption reason on the invoice for audit trails.
Step 3 — Handle expiry
The API returns an expires_at field. Schedule a re-validation before that date. If a certificate has lapsed, Meridian automatically falls back to the standard tax rate and fires a tax_exemption.expired webhook.
Pro tip: Use Meridian's idempotency keys when calling the validation endpoint to safely retry without double-counting exemption checks.