Skip to content

Commerce App ​

The Commerce app provides cart and promotion management for Hantera. To integrate with e-commerce Storefronts, check out Hantera Storefront SDK. It uses ticket actors as the underlying data model — each cart is a ticket with type cart.

What It Provides ​

HTTP Ingresses ​

Public HTTP endpoints for storefront integration:

CategoryEndpoints
CartCreate cart, get cart, SSE events
ItemsAdd item, remove item, set quantity
DetailsSet address, email, phone
FieldsSet/remove custom fields
CouponsAdd/remove coupons
ConfigurationList cart profiles

See API Reference for full endpoint documentation.

Cart Rendering Pipeline ​

Every cart mutation returns a rendered cart — a normalized representation with computed prices, totals, shipping, and tax. The rendering pipeline:

  1. Previews the cart with a complete message (triggers order creation rules)
  2. Queries the resulting order for totals and line items
  3. Maps the data into a flat, storefront-friendly structure

Promotion Engine ​

The Commerce app includes a promotion engine that applies promotions to orders during order creation. Promotions are user-managed rules in the portal — each promotion selects a type, configures its parameters, and optionally requires a coupon code. All promotion logic is provided by apps through promotion types.

Custom Hooks ​

The Commerce app fires the OnCartMutation custom hook after every successful render, enabling other apps to react to cart state changes.

Cart Profiles ​

Cart profiles configure currency, default country, and allowed countries per storefront channel. Configured via the Commerce app settings in the portal.

Architecture ​

Getting Started ​

  1. Install the Commerce app on your Hantera instance
  2. Configure a cart profile (currency, country settings)
  3. Use the API or Storefront SDK from your storefront

© 2026 Hantera AB. Org. no.: 559242-9582