Skip to main content
For e-commerce & DTC

Freight emissions API for e-commerce and DTC

Showing a customer the carbon footprint of their order at checkout is now a conversion lever, not just a disclosure. The lower-emission option gets clicks. The bar to make that work is real-time — the label can't lag behind the rest of the page.

EcoFreight returns per-shipment CO2 in under 50 ms. Drop the call into your checkout, show two or three numbers next to your shipping options, and the difference does the rest. Returns get the same treatment.

The 50 ms checkout problem

Your checkout latency budget is tight. Payment auth eats some. Shipping-rate lookup eats some. Inventory check eats some. EcoFreight is built to fit inside what's left.

p50 under 50 ms

Median round-trip including JSON parse on both ends. Measured against production traffic from US-east and EU-west origins.

Parallel with payment auth

Fire the carbon call in the same batch as your existing pre-purchase calls. No new serial wait — checkout total latency is unchanged.

Cache-friendly

Same inputs produce the same output — pre-compute carbon for top SKU/postcode pairs and skip the call entirely on cache hits.

Returns are half the problem

The return-trip emissions get missed in most "checkout carbon" stories — but for apparel and footwear DTC, returns can hit 30 to 40 percent of orders. That's a meaningful fraction of total freight CO2 sitting outside the headline number.

Worked example

  • Item
    0.6 kg garment shipped 480 km via ground parcel
  • Outbound
    ~0.4 kg CO2e (GLEC v3.2, road, parcel-class consolidated)
  • Return
    ~0.4 kg CO2e for the return leg alone
  • Headline
    The return roughly doubles the freight footprint of a returned order.

What to do with it

Show the return-leg number on the return confirmation page. Some brands use it to seed a "keep it and donate" alternative. Others use it on their sustainability microsite as a transparency signal — "this is what returns actually cost us, and the planet."

Mechanically, the API call is identical to a forward shipment with the origin and destination swapped.

Plug-ins that already work

You don't need a custom integration. Most e-commerce stacks expose the exact webhook surface we need.

Shopify

Call the API from a webhook on order/created, or inline at checkout via a Shop Pay extension. Carbon labels appear next to your shipping options.

Recharge

For subscription brands. Calculate the projected per-cycle emissions and show them on the subscription confirmation page or the customer portal.

Returnly

Hook into the return-create event so the return-leg emissions are computed at the same time the RMA is generated. Surface it on the return confirmation.

Generic REST

Custom storefronts or headless setups call /api/v1/calculate directly. JSON in, JSON out, no SDK lock-in.

How the checkout label should read

Short, specific, comparable. The shopper isn't reading a methodology footnote at checkout — they're choosing between options. Make the difference obvious in two seconds.

Standard delivery
3-5 business days · road, consolidated
1.2 kg CO2e
$4.99
Slower option
7-10 business days · rail, consolidated
~70% less CO2
0.4 kg CO2e
$2.99
Express
Next business day · air
8.6 kg CO2e
$24.99

Mock-up of a checkout pane. Real labels render from your API responses.

Add a carbon label to your next checkout test

Try the calculator with a real order weight and destination, then look at the API docs to see how the same call fits into your Shopify or custom checkout.