Tax Quickstart
Activate tax calculation and apply it to a payment.
Tax automatically calculates the applicable VAT or sales tax based on the transaction's country. This guide shows you how to activate Tax and apply a calculation to a payment.
Beta product — live only
Tax is currently in beta and only evaluates live transactions — there is no sandbox mode. Contact support if your country isn't yet covered.
1. Activate Tax
In Tax → Settings (or PUT /tax/settings), set enabled: true, your default_country,
whether pricing is inclusive of tax, and your tax_id_type/registration_number.
2. Calculate the tax
curl https://api.wajub.com/tax/calculate \
-H "Authorization: sk.xxxx" \
-d '{ "amount": 10000, "currency": "XAF", "country": "CM" }'
# → calculation.total = 11925 (amount to actually charge the customer)3. Charge the tax-inclusive total
There is no tax parameter on POST /payments — compute the total via /tax/calculate
first, then create the payment for that final amount:
curl https://api.wajub.com/payments \
-H "Authorization: pk_test.xxxx" \
-d '{
"amount": 11925,
"currency": "XAF",
"email": "client@example.com"
}'Country resolution
Pass country explicitly to /tax/calculate for reliability — there is no automatic inference
from a phone number or IP for this endpoint.
Was this page helpful?