Tax And Duty

Calculate tax and duty for an order

Brands can send information to this endpoint to receive landed costs (duties & taxes), in their desired currency for an order.

This API supports all landed cost calculations for any physical products from any country to any country, with a few exceptions:

  • Domestic tax calculations (except for Canada, Australia)
  • US inbound taxes
post/tax-and-duty

Request

  • Base URL: https://api-stg.passportshipping.com/custom/v1
  • URL: https://api-stg.passportshipping.com/custom/v1/tax-and-duty
  • Auth: none declared

Request body

referencestring

Unique identifier for the request.

presentment_currencystring

The currency to which all amounts should be converted to. If not provided, will default to the store currency configured during onboarding.

shipping_ratenumber required

Cost of shipping in store currency. If Free Shipping, can pass 0.

insurancenumber

Insurance amount applicable in store currency.

Example request

{
  "reference": "ORDER12345",
  "presentment_currency": "EUR",
  "address_from": {
    "street1": "123 Main St",
    "street2": "Apt 4B",
    "city": "Los Angeles",
    "state": "CA",
    "zip": "90045",
    "country": "US"
  },
  "address_to": {
    "street1": "81 Bay Street",
    "city": "Toronto",
    "state": "ON",
    "zip": "M5J0E7",
    "country": "CA"
  },
  "items": [
    {
      "description": "Black T-Shirt",
      "hs_code": "9505900000",
      "sku": "TSHIRT123",
      "quantity": 2,
      "value": 24.68,
      "weight": 1,
      "origin": "US"
    }
  ]
}

Response

(OK) Tax and duty calculated successfully

request_idstring required

Unique identifier for tracking the API request.

currencystring required

The currency in which all returned prices are converted.

Example response

{
  "request_id": "682302a7-6c05-438f-ae8e-9b8cffc054b2",
  "currency": "EUR",
  "rates": [
    {
      "duty": 6,
      "total": 16,
      "formatted": {
        "tax": "€0",
        "duty": "€6"
      },
      "duty_tax_breakdown": [
        {
          "sku": "TSHIRT123",
          "description": "Black T-Shirt",
          "duty": 6
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.