Reverse Landed Cost API

Learn how our Reverse Landed Cost API helps you sell at all-inclusive prices while declaring the correct value to customs.

Developer documentation for the Reverse Landed Cost API is available here.

The Reverse Landed Cost API works backwards from a price that already includes duties and taxes. Send the all-inclusive price your customer pays, and the API returns the true base price with each component stripped out, so you can show simple, no-surprises pricing at checkout and still declare an accurate value on your commercial invoice.

Key features

  • Exact inverse of the Landed Cost Calculator - The base price returned is the one that, run through the Landed Cost Calculator API, reproduces the inclusive price you submitted. Every rule the forward calculation applies is honoured: de minimis thresholds, customs unions, minimum and maximum measure-based duties, minimum collected duty and low-value regimes.
  • Choose what's included - Tell us exactly which components are built into your price: duty, sales tax (VAT/GST), excise, additional taxes & charges, duty, tax, or all of them.
  • Price once, sell in many markets - If your prices were set using another country's rates (for example, one EU-wide price with German VAT built in), tell us which country's duty and tax rates are embedded and we'll strip out those amounts.
  • Itemised breakdown - Responses include the base price, duty, sales tax, excise and additional charges for every line item, plus order totals and the destination HS code.
  • Penny-perfect results - Each component is rounded to two decimal places and the base price is the remainder, so the components always add back up to the price you submitted.
  • Auto-classification of products - Classify items using product titles or partial HS codes, or use the product taxonomy and classification IDs for maximum accuracy.

Getting started

Plan & API Keys

Once you have a plan that includes reverse landed cost calculations, you can retrieve your API key:

  1. Login to your Dutify account.
  2. Navigate to Account → API Access.
  3. Copy your API key from the top of the page.
    Send your key in the X-API-KEY header with every request.

Endpoints

Here is a snapshot of the endpoints you will need to get started. Full documentation is here.

  • Reverse Landed Cost
    • POST /api/v1/reverse_landed_cost - Strip duties and taxes out of all-inclusive prices and return the base price.
  • Other useful endpoints
    • GET /api/v1/usage - Check your remaining reverse calculations for the current billing period.
    • GET /api/v1/countries - Retrieves a list of supported countries.
    • GET /api/v1/currencies - Retrieves a list of all supported currencies.
    • GET /api/v1/product_classifications - Retrieves the product taxonomy tree.

How it works

For each line item, send the all-inclusive price of a single unit as unit_inclusive_amount, and use reverse_amount_detail to tell us what that price already contains.

typeComponents stripped out of the price
dutyImport duty
sales_taxSales tax (VAT/GST), including any state or province taxes
exciseExcise duty
additional_tax_and_chargesAdditional taxes and charges, e.g. Australia's Import Processing Charge or the US Merchandise Processing Fee
duty_taxDuty + sales tax
allDuty, sales tax, excise, and additional taxes & charges

By default, the import country's rates are used. If your price was built using another country's rates, set duty_rate_country (which also governs excise and additional charges) and/or sales_tax_rate_country.

Example request

A UK retailer selling a cotton t-shirt to Australia at an all-inclusive A$45, with GST built in:

{
  "data": {
    "export_country_code": "GB",
    "import_country_code": "AU",
    "shipping_amount": 10,
    "shipping_currency_code": "AUD",
    "mode_of_transport": "postal",
    "import_type": "private",
    "line_items": [
      {
        "product_id": "TSHIRT-001",
        "product_title": "Men's cotton t-shirt",
        "origin_country_code": "GB",
        "unit_inclusive_amount": 45,
        "quantity": 1,
        "reverse_amount_detail": {
          "type": "sales_tax"
        }
      }
    ]
  }
}

What you get back

All amounts are returned in the import country currency.

  • Order totals - base_price_total, duty_total, sales_tax_total, excise_total, additional_tax_and_charges_total, combined_duties_total and inclusive_total.
  • Line items - For each product: the base_price to declare on your commercial invoice, the amount and rate of each component stripped out, the destination hs_code and the reverse_types that were applied.
  • Calculation notes - Explanations of thresholds, rates and any adjustments, such as a line pinned at a de minimis threshold.
🚧

shipping_amount is never part of the inclusive price. It is charged separately, but we include it in the customs value where the destination assesses duty on a CIF basis.

Example implementation: ecommerce

An ecommerce retailer that shows international customers a single, all-inclusive price and ships DDP.

  1. Pricing
    1. Set local, tax-inclusive prices for each market (e.g. €49.99 in the EU, A$79 in Australia), so customers see one price with no surprises at checkout.
  2. Classification
    1. Use your product titles and or HS codes to classify as part of the request.
    2. Or, pre-classify your product catalog using our product taxonomy by using api/v1/product_classifications to retrieve and store a product_classification_id for each SKU.
  3. Order placed
    1. When an international order is placed, send each line's inclusive price to api/v1/reverse_landed_cost with reverse_amount_detail set to the components built into your pricing (e.g. all for full DDP pricing).
  4. Shipping
    1. Declare the returned base_price on the commercial invoice, remit the stripped-out duty and tax, and sync the full destination HS code to your 3PL provider for smoother customs clearance.

Example implementation: logistics

A shipping platform or 3PL that receives orders from merchants who already sell at duty and tax inclusive prices.

  1. Order import
    1. When orders sync from a merchant's store, capture the price the customer paid and which components the merchant includes in their pricing.
  2. Calculation
    1. Send the order to api/v1/reverse_landed_cost to get the base price and an itemised breakdown of duties and taxes for each line.
  3. Customs documentation
    1. Pre-fill the commercial invoice and customs declaration with the base price and full destination HS code, and display any calculation notes to the merchant before the shipment is booked.

FAQs

What counts as an API call?

Each POST request to /api/v1/reverse_landed_cost uses one reverse calculation credit. This is a separate monthly allowance from your landed cost calculations. Check reverse_landed_cost in the /api/v1/usage response to see how many you have left.

What's the difference between this and the Landed Cost Calculator API?

The Landed Cost Calculator API starts with a base price and adds duties and taxes on top. The Reverse Landed Cost API starts with an all-inclusive price and works backwards to the base price. Use the forward calculation if you charge duty and tax at checkout, and the reverse calculation if they're already built into your prices.

Will the components always add up to my inclusive price?

Yes, in almost every case. Each component is rounded to two decimal places and the base price is the remainder, so base price + duty + sales tax + excise + additional taxes equals the amount you submitted.

The exception is a price that falls just either side of a de minimis threshold, where no base price can produce that exact total. In this case the base price is set to the highest value consistent with what customs will actually charge, and a calculation note explains the difference.

Why doesn't the duty amount equal the duty rate × base price?

duty_rate_percent is the statutory ad valorem rate. The amount may differ where a minimum or maximum measure-based duty, de minimis threshold or minimum collected duty applies. Check the calculation notes for details.

Should shipping be included in my inclusive price?

No. Send shipping separately as shipping_amount. Where the destination assesses duty on a CIF basis, we include it in the customs value automatically.


Did this page help you?