For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. Use HTTPS protocol.

  2. TLS 1.2 or higher

Reference

Endpoint

POST {Base URL}/tax-calculations

Current Environment Availability

Environment
Is Available?

Sandbox

Yes

Production

Yes

Codapay's APIs support REST web services. By default, the endpoints displayed are RESTful.

Request Parameters

Parameter Name
Data Type
Description
Constraint
Is Required?

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

Parameter Name
Data Type
Description
Constraint
Is Required?

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.

Parameter Name
Data Type
Description

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

Parameter Name
Data Type
Description

zip_code

String

The ZIP code used for tax calculation

calculation

Parameter Name
Data Type
Description

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?