All Tools

Customs Duty & Landed Cost API

Integrate live import duty, VAT, GST, and landed cost estimations into your shopping cart checkout using our REST API.

📊 Customs Databases Reference: Simulated estimates are modeled based on regulatory tax schedules published by US CBP, India CBIC, UK HMRC, Canada CBSA, and Australia ABF.

Silo 8• Updated June 2026

Integrate live import duty, VAT, GST, and landed cost estimations into your shopping cart checkout using our REST API.

# Customs Duty & Landed Cost API for E-Commerce Developers

Building a seamless cross-border e-commerce checkout requires providing international shoppers with complete cost transparency. Displaying unexpected delivery fees or leaving customers to pay surprise customs invoices upon arrival leads to cart abandonment, rejected parcels, and payment chargebacks. The Tariff Duty Calculator Developer API enables e-commerce platforms, SaaS checkout applications, ERP systems, and logistics providers to embed real-time import duty, VAT, GST, and total landed cost estimations directly into their shopping cart checkouts.

API Overview & Key Functionality

Our RESTful API delivers enterprise-grade trade compliance data with ultra-low latency (<100ms response times), enabling merchants to offer Amazon-style Import Fees Deposits and Delivered Duty Paid (DDP) pricing.

Primary Capabilities:

  • Global Country Coverage: Supports customs duty and consumption tax calculation for 175+ destination countries across 97 HTS chapters.
  • Automated HS Code Classification: Accepts plain-text product titles or keywords and returns matching 6-digit and 10-digit Harmonized Tariff Schedule (HTS) codes.
  • Trade Surcharge Tracking: Automatically incorporates active trade enforcement surcharges, including US Section 301 tariffs, Section 122 reciprocal duties, Section 232 steel/aluminum rates, and EU €3 per-item fees.
  • Multi-Currency Settlement: Converts prices dynamically into 45+ global fiat currencies using live institutional exchange rates.

Integration Architecture & Implementation Models

Importers and e-commerce platforms utilize our Developer API across three primary operational architectures:

  1. Shopify & WooCommerce Checkout Plugins: Display itemized "Duties & Import Taxes" at checkout, pre-collecting funds from buyers to ship orders DDP.
  2. ERP & Warehouse Order Management: Automatically generate commercial invoice data and tariff declarations for outbound international fulfillment.
  3. Cross-Border Marketplaces: Calculate pre-paid customs deposits for multi-vendor orders originating from international fulfillment hubs.

Sample Calculation Parameters & Schema Fields

When sending HTTP requests to the calculation endpoint, developers supply product and routing attributes:

  • origin_country (ISO-2): Country code of manufacturing or shipment dispatch (e.g., "CN" for China or "US" for United States).
  • destination_country (ISO-2): Country code of final customer delivery address (e.g., "GB", "DE", "IN", "BR").
  • shipping_channel: Speficies "postal" vs "express_courier" to trigger flat postal floor logic vs ad-valorem brokerage logic.
  • items array: Contains sku, title, declared_price, quantity, and optional hs_code parameters.

The API response payload returns a complete financial breakdown:

  • base_duty: Statutory tariff percentage amount.
  • surcharges: Section 301/122 trade dispute tariffs.
  • import_vat_gst: Destination consumption tax.
  • total_landed_cost: Gross total for customer checkout authorization.

Enterprise Security & SLA Safeguards

Our Developer API is engineered to meet enterprise infrastructure standards:

  • High-Availability Global Edge Routing: Requests are routed through multi-region Cloudflare and AWS edge deployments, guaranteeing sub-100ms response times worldwide.
  • Encryption & Compliance: Full TLS 1.3 data encryption in transit, with SOC-2 Type II certification and strict GDPR compliance data handling.
  • Automated Fallback Engine: If national tariff databases experience temporary outages, our machine-learning model serves cached historical rate structures to prevent checkout interruptions.
  • Rate Limit Safeguards: Enterprise endpoints support burst capacities up to 1,000 requests per second with automatic DDoS mitigation and intelligent rate limiting.

SDK Availability & Code Samples

We maintain official client libraries to simplify developer integration across major programming environments:

  • Node.js / TypeScript: Install via npm install @tariff-duty/sdk
  • Python / Django: Install via pip install tariff-duty-sdk
  • PHP / Laravel: Install via composer require tariffduty/sdk
  • Go / Golang: Import github.com/tariffduty/sdk-go

Developer Onboarding & Rate Limits

Getting started with the Tariff Duty Calculator API requires three simple steps:

  1. Create Developer Account: Register on our developer portal to obtain your Sandbox and Production API keys.
  2. Test in Sandbox Environment: Utilize test API keys to simulate calculations across high-tariff destinations (such as Brazil, India, US, and EU).
  3. Select SLA Plan: Choose from Tiered developer plans:
  • Free Tier: Up to 1,000 queries/month (ideal for testing and small stores).
  • Pro Tier: 50,000 queries/month with 99.9% uptime SLA and real-time exchange rate updates.
  • Enterprise Tier: Unlimited API queries, dedicated webhook endpoints, and custom HTS mapping support.

Frequently Asked Questions

How fast is the API response time?

Our global CDN edge infrastructure delivers API responses in under 80 milliseconds, ensuring zero impact on your checkout loading speed or conversion rates.

Does the API handle the July 1, 2026 EU €3 parcel fee?

Yes. The API automatically detects sub-€150 postal shipments destined for EU member states and incorporates the mandatory €3 flat customs fee per SKU into the calculation payload.

Can the API auto-assign HS codes if I don't store them in my database?

Yes. If you omit the hs_code parameter in your request body, our machine-learning classification model will analyze the title and category parameters to assign the most accurate 6-digit HTS code automatically.

What SDKs are available for integration?

We maintain official open-source SDK libraries for Node.js, Python, PHP, Ruby, and Java, available via npm, PyPI, and Packagist.