Calculate tax
Calculates the applicable taxes for a given country/area and returns the tax breakdown and updated price
Pre-requisite
When integrating with Codapay's API, ensure you adhere to the following standards:
Use HTTPS protocol.
TLS 1.2 or higher
Reference
Endpoint
POST {Base URL}/tax-calculations
Current Environment Availability
Sandbox
Yes
Production
Yes
Request Parameters
amount_value
Integer
The amount value of the charge
Yes
amount_currency
String
The currency of the charge
Only the currency of the specified country
Yes
country_code
String
The country code for tax calculation
Must be a valid ISO 3166-1 alpha-2 country code
Yes
tax_code
String
The tax code of the product
Currently the supported tax codes are
CD010001 - Digital goods: Games-Streaming / electronic download
Yes
address
JSON Object
The zip code details used for tax calculation. Required when country_code = US or CA
No
is_exclusive
Boolean
Whether the amount sent is exclusive of tax or not. It is by default considered that the amount sent is exclusive of tax.
No
address
zip_code
String
The ZIP code used for tax calculation
Must be a valid zip code
No
province_code
String
The province code used for tax calculation
Two letter province code . Only supported for Canada
No
Response Parameters
Samples can be found here.
id
String
Unique identifier for the tax calculation
amount_value
Integer
The amount of the charge
amount_currency
String
The currency of the charge
country_code
String
The country code for tax calculation
tax_code
String
The tax code used for tax calculation
address
JSON Object
The address details used for tax calculation
is_exclusive
Boolean
Indicates whether the amount sent is exclusive of tax. By default, it is considered exclusive of tax
calculation
JSON Object
The result of tax calculation
status_code
String
The status code for tax calculation
address
zip_code
String
The ZIP code used for tax calculation
calculation
taxable_amount
String
The amount subject to tax
tax_amount
String
The amount of tax calculated
total_amount
String
The sum of the taxable amount and the tax amount.
tax_rate
String
The rate of tax applied
Last updated
Was this helpful?