Methods
| Method | Description |
|---|---|
calculate(request) | Calculate taxes for a transaction |
Calculate taxes
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Transaction amount in smallest currency unit |
currency | string | Yes | Currency code |
customer_id | string | Yes | Customer ID (used to determine tax jurisdiction) |
Response data
CalculateResponse
| Field | Type | Description |
|---|---|---|
tax_amount | number | Calculated tax amount |
total_amount | number | Amount including tax |
tax_rate | number | Applied tax rate |
jurisdiction | string | Tax jurisdiction |
breakdown | array | Itemized tax breakdown |