commercetools Integration

Live carrier rates for your composable commerce stack — a server-side connector that rates carts through the ShipRateAPI API.

commercetools Connector

Live rates for composable commerce

commercetools is API-first and headless, so there is no checkout callback to hook into. Instead, the ShipRateAPI connector responds to cart updates, forwards the payload to the ShipRateAPI API server-side, and writes the live rates back onto the cart as shipping methods — your storefront renders them with no rate logic of its own.

Composable, API-first

A connector built for commercetools’ headless model — no storefront lock-in. It plugs into your composable stack and rates carts via the API.

Server-side & secure

The connector calls ShipRateAPI from your backend with your API key — it never reaches the browser, exactly as the first-party plugins do.

Rates applied to the cart

Live rates are written back onto the commercetools cart as shipping methods, so your checkout renders them with no custom rate logic of its own.

Product-attribute routing

A shiprate_tags product attribute on your product types is read and forwarded per line item as ShipRateAPI routing tags.

How it works

Four steps from cart update to live rates — every one of them server-side.

1
Cart needs rates

When a cart reaches the shipping step, commercetools triggers the connector with the cart and destination via an API Extension.

2
Connector normalises the payload

The cart and line items are mapped to the standard ShipRateAPI JSON format, including any shiprate_tags product attributes.

3
Rates are fetched server-side

The payload is POSTed to the ShipRateAPI quotes endpoint with your API key and the X-Platform: commercetools header.

4
Rates applied to the cart

The connector writes the returned rates back onto the commercetools cart as shipping methods for your checkout to display.

Requirements

The connector runs as a small Node.js service — deploy it on commercetools Connect or your own infrastructure.

  • A commercetools Composable Commerce project
  • An API client with scopes to read carts and manage shipping methods
  • Node.js 18+ runtime (commercetools Connect or a self-hosted service)

Product-attribute tag routing

Add a shiprate_tags attribute to your commercetools product types and set it on the products you want to route. The connector reads the attribute and forwards the values per line item to ShipRateAPI:

cold-storage, fragile

Use these tags to control which carriers are offered for those products.

Read about Tags & Routing

Set up the commercetools connector

The developer guide covers environment variables, deployment, wiring up the cart extension, and product tagging step by step.

Read the setup guide View on GitHubView pricing