Last updated

Shipping Adapters Overview

Shipping adapters handle delivery selection and logistics in Norce Checkout. They integrate with external shipping providers and Transport Management Systems (TMS) to provide shipping options, track deliveries, and synchronize shipping details with the checkout order.

For general requirements and access details, see How to access Norce Checkout.

API Environments and URLs

All Norce Checkout shipping adapters use the same URL pattern:

EnvironmentURL Pattern
Productionhttps://{slug}.api-se.norce.tech/checkout/{adapter}-adapter
Stagehttps://{slug}.api-se.stage.norce.tech/checkout/{adapter}-adapter
Playgroundhttps://{slug}.api-se.playground.norce.tech/checkout/{adapter}-adapter

Replace {slug} with your unique Norce instance slug and {adapter} with the provider-specific name (e.g., ingrid).

How Shipping Adapters Work

Shipping adapters primarily operate by listening to shipping hooks on the Norce Checkout order. When shipping-related changes occur, the adapter is notified and can update the order accordingly.

Hook-Based Integration

When a shipping adapter is activated for an order, it registers hooks that subscribe to shipping changes:

{
  "subscribeTo": "/shippings",
  "invoke": "https://{adapter}.checkout.internal.norce.tech/api/v1/orders/{orderId}/shipping-changed"
}

This allows the adapter to:

  1. React to shipping selection: When a customer selects a shipping option in the checkout UI, the adapter receives a callback
  2. Update order details: The adapter updates the order's shippings array with delivery details, pricing, and carrier information
  3. Synchronize totals: Shipping costs are reflected in the order total, ensuring payment adapters have accurate amounts

Shipping Data Flow

  1. Customer selects shipping: The checkout UI triggers a shipping change on the order
  2. Hook invoked: The Order Service calls the shipping adapter's registered hook
  3. Provider interaction: The adapter communicates with the external shipping provider/TMS
  4. Order updated: The adapter writes updated shipping details back to the order, including:
    • Carrier and service information
    • Delivery pricing (including VAT)
    • Pickup location details (if applicable)
    • TMS reference for tracking

Integration with Payment Adapters

Some payment adapters (like Klarna Checkout) can also provide shipping options through their own shipping assistants. In these cases, the payment adapter handles shipping selection directly and updates the order's shipping details. Standalone shipping adapters are used when you want dedicated shipping provider integration independent of the payment flow.

Available Shipping Adapters