# Hanzo Commerce - Headless Commerce API

> Build modern commerce experiences with Hanzo Commerce APIs.

Headless E-commerce Platform

# Hanzo Commerce

Products, carts, checkout, orders and returns behind an API, with no storefront attached. You write the front end; this keeps the catalogue, takes the payment and remembers what happened. Card numbers are tokenized somewhere else, so the store never holds one.

[Get Started](https://docs.hanzo.ai/docs/commerce)[Console](https://console.hanzo.ai)

## What it keeps track of

The nouns a shop is made of, each one addressable and none of them assuming what your site looks like.

### Carts

A cart is a real object with its own id, so someone can leave and come back, and you can look at what they left in it.

### Products and variants

A product holds the description; a variant holds the size, the colour and the price. Stock is tracked on the variant, which is the thing people actually buy.

### Authorize and capture

Two steps, not one. Hold the money when the order is placed and take it when the box ships, which is what your accountant and your customer both expect.

### Coupons and discounts

Applied to a cart or to an invoice, and recorded as their own line. The reason a total came out lower survives the transaction.

### Prices per store

One catalogue can answer differently for different stores. The product does not have to be duplicated to be priced twice.

### Subscriptions

Plans, prices and renewals sit in the same service as the orders, so a customer who buys once and subscribes once is one customer with one history.

### Orders, refunds and returns

The whole life of an order, including the parts nobody demos. A return is a first-class object rather than a note in a support ticket.

### Many stores, one install

Stores are scoped by organisation, so an agency or a marketplace runs several without running several copies of this.

### It never sees a card

Card numbers are tokenized in a separate service and this one only ever holds the token. That is a smaller thing to secure, and a much smaller thing to be audited on.

### Your data, per tenant

Each organisation&#x27;s records live in its own store. Isolation is a file boundary rather than a WHERE clause somebody has to remember to write.

## The endpoints

Grouped by what they are about. Every one of them is scoped to your organisation by the token you call with, so multi-tenancy is not something you implement on top.

Commerce

Identity

Marketing

Payments

Platform

### Hanzo Commerce API Endpoints

/cart

List all carts for the current session/user

/cart/{id}

Get details for a specific cart

/cart/{id}/set

Update cart items and quantities

/cart/{id}/discard

Remove a cart

/checkout/capture/{id}

Capture payment for a previously authorized checkout

/checkout/charge

Process a direct checkout charge

/checkout/authorize

Authorize payment for later capture

/collection/{id}

Get a specific product collection

/collection

List all product collections

/coupon

List all available coupons

/coupon/{id}

Get details for a specific coupon

/discount

List all available discounts

/discount/{id}

Get details for a specific discount

/order/{id}

Get a specific order

/order

List all orders

/order/{id}/refund

Process a refund for an order

/order/{id}/payments

View payment details for an order

/order/{id}/capture

Capture payment for a previously authorized order

/product

List all products

/product/{id}

Get a specific product

/return/{id}

Get details for a specific return

/return

List all returns

/review

List all product reviews

/review/{id}

Get a specific product review

/store/{id}

Get a specific store

/store

List all stores

/site/{siteid}/deploy

Deploy a site/storefront

/store/{id}/product/{key}

Get a specific product in a store

/store/{id}/variant/{key}

Get a specific variant in a store

/variant/{id}

Get a specific product variant

/variant

List all product variants

## When to reach for it

Four shapes that fit. If none of them is yours, a hosted shop is probably the easier answer.

### A storefront you designed

You have a front end you like and do not want a theme system telling you how it works. This gives you the catalogue, the cart and the checkout as calls, and stays out of the rendering.

Learn more

1

### One catalogue, several stores

A brand with regional shops, or an agency running stores for clients. Stores are scoped by organisation and can price the same product differently.

Learn more

2

### Selling a subscription and a thing

Hardware with a plan, or a course with a membership. Orders and subscriptions are in one service, so the customer has one history rather than two accounts.

Learn more

3

### Taking payment inside your own product

You are not building a shop, you are charging for what you already made. Use the checkout, the invoices and the meters, and ignore the rest.

Learn more

4

## Who takes the money

The processor is a setting, not an architecture. Each one gets its own webhook endpoint, so adding a second — or leaving the first — is a change here rather than a change in your checkout.

### Payment Gateways

- Stripe
- PayPal
- Adyen
- Square
- Braintree
- Klarna
- Affirm
- Apple Pay

### Marketing & CRM

- Mailchimp
- Klaviyo
- HubSpot
- Salesforce
- Segment
- Meta Pixel
- Google Analytics
- Customer.io

### Shipping & Fulfillment

- ShipStation
- ShipBob
- EasyPost
- FedEx
- UPS
- USPS
- DHL
- AfterShip

### Accounting & ERP

- QuickBooks
- Xero
- NetSuite
- SAP
- Avalara
- TaxJar
- Sage
- Microsoft Dynamics

## What you are running

Worth knowing before you put your revenue behind it.

### One Go binary

A single container with no queue, no cache tier and no companion services to stand up beside it. Run it locally the same way it runs in production.

### A store per organisation

Tenants are separated by where their data lives rather than by a column, so one tenant&#x27;s query cannot reach another&#x27;s rows.

### Outside the card boundary

Card numbers are tokenized by a separate service. This one is connected to that boundary without being inside it, which is the whole point of drawing one.

### Identity from Hanzo IAM

Sign-in, organisations and tokens come from IAM. There is no second user table here to fall out of step with the first.

### Mounts into the cloud binary

It runs on its own or as a subsystem inside the unified Hanzo Cloud binary. Same code, same routes, one fewer process to operate.

### Open source

MIT or Apache-2.0, your choice. Read how your money is handled instead of taking our word for it.

## Create a product, then sell it

The whole thing runs from one container. Point your front end at it and take an order.

### Start Selling

Launch your store with our easy-to-use platform

[Get Started](https://console.hanzo.ai)

### Documentation

Explore our guides and API references

[View Docs](https://docs.hanzo.ai/docs/commerce)

### For Developers

Integrate our APIs into your applications

[API Reference](https://docs.hanzo.ai/docs)

### Need a Custom Solution?

Our team of experts can help you design and implement a tailored e-commerce solution for your unique business needs.

[Contact Sales](https://hanzo.ai/contact)

## Get started with Commerce

[Read the docs](https://docs.hanzo.ai/docs/commerce)[View on GitHub](https://github.com/hanzoai)

## Open source

License: Apache-2.0[hanzoai](https://github.com/hanzoai)

## Get Commerce

Headless commerce + AI recommendations

[Deploy to Cloud](https://console.hanzo.ai/deploy)
