graduation-capTax Tutorials

How to calculate net and gross values for prices

You can calculate net and gross values for prices through the Calculating net and gross values for pricesarrow-up-right endpoint.

Before you start

Make sure you configured sales tax rates through the Emporix API Tax Service.

circle-exclamation

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
  }
}

Then, send a request to the Calculating net and gross values for pricesarrow-up-right endpoint:

circle-check
rectangle-terminalAPI Referencechevron-right

The calculated net value is returned in the 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:

Then, send a request to the Calculating net and gross values for pricesarrow-up-right endpoint:

rectangle-terminalAPI Referencechevron-right

The calculated gross value is returned in the 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 the Calculating net and gross values for pricesarrow-up-right endpoint.

circle-exclamation

Before you start

Make sure you configured sales tax rates through the Emporix API Tax Service.

circle-exclamation

Calculate the price

To calculate a gross price between countries based on its applicable tax classes, put the following data in the request body:

Then, send a request to the Calculating net and gross values for pricesarrow-up-right endpoint:

rectangle-terminalAPI Referencechevron-right

The calculated gross price is returned in the output.grossPrice field.

Last updated

Was this helpful?