Tariffs API for BigCommerce.
Add US duty calculation to a BigCommerce store via the Carts/Checkouts API or a checkout shipping-provider integration. No app install required.
BigCommerce is the heavyweight US ecommerce platform for mid-market merchants. This page covers two ways to wire Tariffs API in: (1) a backend script that calls our resolve endpoint and pushes a custom line item or coupon onto the cart, or (2) a checkout shipping-provider integration that returns duty as part of a shipping option. A first-party BigCommerce app is on the roadmap.
Built for BigCommerce developers.
Two integration paths
Cart-level custom line item is the fastest. Checkout shipping provider is more native but requires Tech Partner enrollment.
Works on Stencil and headless
Whether you're on the default Stencil storefront or a Catalyst/headless build, the integration is server-side, no theme work needed.
Avoid the Zonos premium
Zonos's BigCommerce app is fine if you want their full DDP suite. If you just need duty math at checkout, the REST call is the cheapest path.
Bulk for big carts
Use resolve_batch to handle 50+ SKU carts in a single call. Keeps p95 latency under a second.
Drop it in.
Two snippets: a Node service that handles a BigCommerce cart and pushes a custom item, and a curl example showing the underlying resolve call.
1. Direct call to Tariffs API
bashcurl "https://tariffsapi.com/api/v1/tariffs/resolve?hts=8541.10.00.80&origin=CN" \
-H "Authorization: Bearer $TARIFFSAPI_KEY"
2. Compute duty for a BigCommerce cart (Node)
javascriptimport fetch from "node-fetch"
const BC = "https://api.bigcommerce.com/stores/STORE_HASH/v3"
const BC_TOKEN = process.env.BC_API_TOKEN
const TA_KEY = process.env.TARIFFSAPI_KEY
async function addDutyLine(cartId) {
const cart = await fetch(`${BC}/carts/${cartId}`, {
headers: { "X-Auth-Token": BC_TOKEN, Accept: "application/json" },
}).then(r => r.json())
let dutyTotal = 0
for (const item of cart.data.line_items.physical_items) {
const hts = item.product_options?.find(o => o.name === "hts_code")?.value
const origin = item.product_options?.find(o => o.name === "country_of_origin")?.value
if (!hts || !origin) continue
const res = await fetch(
`https://tariffsapi.com/api/v1/tariffs/resolve?hts=${hts}&origin=${origin}`,
{ headers: { Authorization: `Bearer ${TA_KEY}` } }
)
const data = await res.json()
const rate = data.summary.total_resolved_ad_valorem_rate / 100
dutyTotal += Number(item.list_price) * item.quantity * rate
}
await fetch(`${BC}/carts/${cartId}/items`, {
method: "POST",
headers: { "X-Auth-Token": BC_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
custom_items: [{ name: "US duty", quantity: 1, list_price: dutyTotal.toFixed(2) }],
}),
})
}
One endpoint. Deterministic JSON.
GET /api/v1/tariffs/resolve returns the merged US duty rate (base + Section 301 + 232 + IEEPA + Chapter 99). Cache by [hts, origin] to keep request volume manageable on high-traffic carts.
GET /api/v1/tariffs/resolve?hts=8541.10.00.80&origin=CN
{
"summary": {
"applicable_ad_valorem_rate": 0.0,
"resolved_additional_ad_valorem_rate": 25.0,
"total_resolved_ad_valorem_rate": 25.0
},
"base_tariff": { "percentage_component": 0.0 },
"additional_measures": [
{
"program": "section_301",
"chapter_99_code": "9903.91.05",
"resolved_rate": { "percentage_component": 0.25 }
}
]
}
BigCommerce + Tariffs API
Is there an official BigCommerce app?
Not yet. A BigCommerce App is gated on demand signal from this page. Today, you wire it in via the BigCommerce API as shown above. If you want first-party support, sign up and email us.
Where do I store HTS codes on a BigCommerce product?
Product custom fields are the cleanest path. Create hts_code and country_of_origin custom fields per product, then read them via the Catalog API. Variant-level overrides also supported via SKU custom fields.
Will this work on Catalyst (headless)?
Yes. The integration is server-side and uses BigCommerce's REST APIs, which Catalyst storefronts call too. No storefront-specific work needed.
How does this compare to a Shopify duty app?
BigCommerce's app ecosystem is smaller, which is good and bad: less crowded, less competition, but also fewer plug-and-play options. The REST integration described here is what most BigCommerce mid-market teams already prefer.
- BigCommerce Carts API · accessed 2026-05-14
- BigCommerce product custom fields · accessed 2026-05-14