Tax Service Tutorials
How to calculate net and gross values for prices
You can calculate net and gross values for prices through theBefore you start
Make sure you configured sales tax rates through the Emporix API Tax Service.
info
For instructions, check out How to add your first product.
Convert a gross price to a net price
To calculate a price's net value based on its gross value, put the following data in the request body:
{
"input": {
"targetLocation": {
"countryCode": "DE" // country code indicated in the Tax Service
},
"targetTaxClass": "STANDARD", // tax class code defined in the Tax Service
"includesTax": true, // the original price is expressed as a gross value
"price": "1.99" // gross value
}
}
Loading...
output.netPrice
field.Convert a net price to a gross price
To calculate a price's gross value based on its net value, put the following data in the request body:
{
"input": {
"targetLocation": {
"countryCode": "DE" // country code indicated in the Tax Service
},
"targetTaxClass": "STANDARD", // tax class defined in the Tax Service
"includesTax": false, // the original price is expressed as a net value
"price": "1.99" // net value
}
}
Loading...
output.grossPrice
field.How to calculate gross values between countries
You can calculate a gross price in one country to a gross price in another country through theattention
This tutorial presents how to calculate gross prices between countries based on specific values.
To learn how to calculate gross prices between countries based onPrice
objects, check out How to calculate gross prices between countries.Before you start
Make sure you configured sales tax rates through the Emporix API Tax Service.
info
For instructions, check out How to add your first product.
Calculate the price
To calculate a gross price between countries based on its applicable tax classes, put the following data in the request body:
{
"input": {
"sourceLocation": {
"countryCode": "DE" // code of the country for which the original gross price is defined (indicated in the Tax Service)
},
"sourceTaxClass": "STANDARD", // tax class applied to the original gross price (defined in the Tax Service)
"targetLocation": {
"countryCode": "AT" // code of the country for which the gross price should be calculated (indicated in the Tax Service)
},
"targetTaxClass": "STANDARD", // tax class that should be applied to the calculated gross price (defined in the Tax Service)
"includesTax": true, // the original price is expressed as a gross value
"price": "1.99" // original gross price
}
}
Loading...
output.grossPrice
field.