LogoLogo
MerchantsHelpSign in
  • Overview
    • Countries & Currencies
    • Glopal Solutions Portfolio
  • Getting started
    • Shopify
      • Glopal Duty & Tax for Shopify
      • Shopify Collaborator Access
    • BigCommerce
    • Magento (Adobe Commerce)
      • Magento 1
      • Magento 2
        • Magento Activation
        • Magento Configuration
        • Magento Database Model
    • Visualsoft
    • PrestaShop
  • Marketing Solutions
    • Acquisition channels
      • Integrate Google Ads
      • Integrate Facebook Ads
    • Feed localization
      • Read domestic items
      • Localize the items
      • Upload the localized items
    • Features / Customization
      • Google Shopping countries coverage
      • Filters
      • Free listings
      • Comparison Shopping Services (CSS)
    • Google Ads
      • Conversion tracking
      • Standard accounts structure
      • Launching and monitoring Google Ads campaigns
    • Facebook
      • Facebook & Instagram Shops
      • Catalog Based Campaigns
      • Conversion and Brand awareness campaigns
      • Facebook conversion tracking
    • Email marketing
  • Localization
    • Site localization
      • Content localization
      • Price localization
      • Site search
      • Checkout
      • User account
    • Site discovery
      • Domains and Routing
      • Search engine optimization
      • Geo-localization
      • Country selector
    • Content distribution
      • Site security
      • Domains (DNS)
      • Traffic Splitting
        • Akamai
        • Cloudflare
        • Nginx
        • Microsoft IIS
        • AWS CloudFront
        • Magento Cloud
      • Third-party CDN
        • Cloudflare
      • Site speed
    • Integrations
      • CSS customizations
      • JavaScript customizations
      • Server-side customizations
      • Exclude from localization
      • Integration examples
        • Hiding Products
        • Newsletter Signup
        • Custom Price Logic
  • Checkout
    • Localized checkout
      • Overview
      • Styling
      • Integration
        • Callback Functions
        • Confirmation Page
        • Checkout Analytics
        • Allowlisting Glopal IPs
      • Price localization
    • Order processing
      • Order creation
        • Plug & Play integration
        • Order API
        • Event webhook
        • Custom Integration
      • Cancellation & refund
      • Returns
      • Buyer's communication
      • Customer account
    • Financials
      • EU VAT
  • DUTY & TAXES
    • Product Classification
    • Duty & Tax Calculation
      • Product Pricing
      • Supported Countries
    • Compliance Checks
      • Prohibited Goods
      • Denied Party Screening
  • SHIPPING
    • Order Creation
    • Label Generation
    • Manifest
    • Tracking
  • Translations
    • Translation Editor
  • MERCHANT ACCOUNT
    • Dashboards
      • SEO dashboard
  • What's New
    • Release Notes
Powered by GitBook
On this page
  1. DUTY & TAXES

Duty & Tax Calculation

PreviousProduct ClassificationNextProduct Pricing

Last updated 4 months ago

The Total Cost Calculator (TCC) is Glopal’s web service engine for calculating total landing costs for international shipping, including shipping costs, customs duties, as well as any additional taxes (VAT, excise taxes,..). The engine supports both forward and reverse calculation of shipping costs, duties, and taxes.

Pre-Integrated Platforms

Native API Integration

The engine is also available as native API service:

The Total Cost Calculator (TCC) is pre-integrated into , and available for the most relevant e-commerce platforms:

Shopify: .

Magento 2:

Salesforce Cloud Commerce: B2C Commerce Cartridge listed on the Salesforce , supporting , , and

Glopal’s Checkout solution
Partner app for Shopify and Shopify Plus
Plugin
AppExchange
SFRA
OpenCommerce API (OCAPI)
Site Genesis

Request quote for an order

post
Header parameters
x-loginstringRequired

Client username (set by Glopal)

Example: usernamePattern: ^[a-z0-9\-]{3,255}$
x-aliasstringOptional

Optional system username to enable separation of authentication credentials by integrated client system. (set by Glopal)

Example: alias-usernamePattern: ^[a-z0-9\-]{3,50}$
x-signaturestringRequired

The authentication signature is created by using the concatenation of the login, the ‘@’ sign and the timestamp, transformed into a HMAC_256 signature using your secret access key.

Example: 40b976b35a08bb951439ea7bbfa0a7bd73dab7c813399a31d9d1a157bc08929bPattern: ^[0-9a-f]{64}$
x-timestampnumber · floatRequired

The authentication timestamp must be a decimal numeric representing the current POSIX time, extended to microsecond accuracy. If the requesting system does not provide high-resolution time, it is advised to use a 6-digit random number. It is important to have the requesting system synchronised with a reliable time source (f.i. a stratum 2 NTP server) to avoid request rejection.

Example: 1680010295.775523Pattern: ^[12]\d{9}\.\d{6}$
x-versionnumber · floatOptionalDefault: 0.68Pattern: (^0\.\d{2}$|^[1-9]\d*\.\d{2}$)
Body
argsall ofRequired
Responses
200
OK
Responseall of
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found
405
Method not allowed
500
Internal server error
503
Service unavailable
post
const timestamp = String(Date.now() / 1000).padEnd(17, '0');
const username = "username";
const signature = CryptoJS.HmacSHA256(
  `${username}@${timestamp}`, "sharedsecret"
  ).toString(CryptoJS.digest)

const response = await fetch('https://ws.xport.glopalservice.com/tcc/calculate_order', {
  method: 'POST',
  headers: {
    "Content-Type": "application/json",
    "x-login": username,
    "x-timestamp": timestamp,
    "x-signature": signature
  },
  body: JSON.stringify({
    "args":{
      "from_country_id": "US",
      "to_country_id": "CA",
      "to_state_id": "QC",
      "delivery_type_id": "X",
      "shipments": [
        {
          "currency": "USD",
          "products": [
            {
              "qty": 2,
              "unitprice": 19.99,
              "description": "Paul Mitchell Tea Tree Special (10.1 Oz) Shampoo & Conditioner Duo Set"
            }
          ]
        }
      ]
    }
  }),
});
const data = await response.json();
{
  "error":0,
  "result":[
    {
      "from_country_id":"FR",
      "to_country_id":"US",
      "to_state_id":"CA",
      "to_post_code":"90210",
      "delivery_type_id":"X",
      "transaction_id":"642edad40de2f361ba4d1684aaf3c53a0afc687b",
      "dutiable_value":84.75,
      "dutiable_value_discount":10,
      "dutiable_value_discount_tax":1.2,
      "dutiable_value_discount_duty":1.23,
      "dutiable_value_discount_net":8.02,
      "dutiable_value_tax_included":100,
      "dutiable_value_tax_charge":4.23,
      "duty_charge":15.25,
      "duty_charge_included":12.12,
      "duty_charge_tax":2.23,
      "currency":"USD",
      "dead_weight":12.34,
      "vol_weight":15.22,
      "weight":15.22,
      "weight_unit":"kg",
      "duty_calculation_rule":"CIF",
      "tax_calculation_rule":"CIF",
      "is_duty_deminimis_applied":0,
      "is_tax_deminimis_applied":0,
      "commission_fee":0.12,
      "incoterms":"DDP",
      "reference":"test123",
      "tax_charge":15.25,
      "tax_charges":[
        {
          "name":"Charge",
          "code":"charge_id",
          "rate":0,
          "type":"dutiable_value",
          "value":0
        }
      ],
      "tax_charge_included":12.12,
      "product_tax_charge":10.03,
      "calculus_shipping_charge":15.33,
      "shipping_charge":13.33,
      "shipping_charge_duty":3.33,
      "shipping_charge_duty_included":1.33,
      "shipping_charge_tax":2.33,
      "shipping_charge_tax_included":2.33,
      "shipping_charge_duty_tax":0.33,
      "merchant_shipping_charge":{
        "currency":"USD",
        "value":5
      },
      "discount":10,
      "discounts":[
        {
          "name":"Charge",
          "code":"charge_id",
          "rate":0,
          "type":"dutiable_value",
          "value":0
        }
      ],
      "extra_charge":33.23,
      "extra_charges":[
        {
          "name":"Charge",
          "code":"charge_id",
          "rate":0,
          "type":"dutiable_value",
          "value":0
        }
      ],
      "transport":{
        "carrier":"DHL",
        "service":"DHL Express"
      },
      "products":[
        {
          "calculus_duty_charge":5.33,
          "calculus_tax_charge":3.49,
          "country_id_of_origin":"FR",
          "documentation_code":"CITES_2000_a",
          "dutiable_value":84.75,
          "dutiable_value_tax_charge":4.23,
          "dutiable_value_tax_included":100,
          "duty_charge":15.25,
          "duty_charge_included":12.12,
          "duty_charge_tax":2.23,
          "duty_deminimis":125,
          "duty_rate":8.25,
          "gtin":"1234567890",
          "hs_code":"429999",
          "merchant_sku":"1234567890",
          "alt_merchant_sku":"AMS1234567890",
          "product_dutiable_value_discount":10,
          "product_dutiable_value_discount_tax":1.2,
          "product_dutiable_value_discount_duty":1.23,
          "product_dutiable_value_discount_net":8.02,
          "product_shipping_charge_duty":3.33,
          "product_shipping_charge_tax":2.33,
          "product_shipping_charge_duty_tax":0.33,
          "prohibition_id":"W12",
          "prohibition_note":"Warning for product type importing to destination country",
          "quantity":100,
          "shipment_id":123456,
          "tax_charge":15.25,
          "tax_charges":[
            {
              "name":"Charge",
              "code":"charge_id",
              "rate":0,
              "type":"dutiable_value",
              "value":0
            }
          ],
          "tax_charge_included":12.12,
          "tax_deminimis":25,
          "tax_rate":20.25,
          "total_charge":150.23,
          "transport":{
            "carrier":"DHL",
            "service":"DHL Express"
          }
        }
      ]
    }
  ]
}
  • Pre-Integrated Platforms
  • Native API Integration
  • POSTRequest quote for an order
Total landed cost calculation for an EU order