# Commerce

URL: https://docs.hanzo.ai/docs/openapi/commerce

> Selling: checkout, subscriptions, invoices, spend alerts, payment webhooks and the storefront catalog.

Also for this capability: **API** · [CLI](https://docs.hanzo.ai/docs/cli/commerce) · [MCP](https://docs.hanzo.ai/docs/mcp-tools/commerce) · [SDKs](https://docs.hanzo.ai/docs/sdks)

Selling: checkout, subscriptions, invoices, spend alerts, payment webhooks and the storefront catalog.

> [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|                |                                        |
| -------------- | -------------------------------------- |
| **Base URL**   | `https://api.hanzo.ai`                 |
| **Operations** | 164                                    |
| **Auth**       | `Authorization: Bearer $HANZO_API_KEY` |

## Specification

> **HIP-1220 · Commerce — The Merchant Half** — Draft · [read the specification →](https://github.com/hanzoai/hips/blob/7ed737180339cd05b5f2935eafe7f7b83d2449a2/HIPs/hip-1220-commerce-the-merchant-half.md)

`/v1/commerce` is selling: checkout, subscriptions, invoices, spend alerts,
payment webhooks, the storefront and its catalog, carts, priced SKUs and the
typed payment door. It is `hanzoai/cloud` `apps/commerce`, which mounts the
`hanzoai/commerce` module natively on the cloud's own router — one router, one
specificity space, zero handler adaptation (`apps/commerce/mount.go:3-14`).

This HIP states the target surface — one root for every merchant noun — and the
boundary with `billing`, the customer money door HIP-0018 declares: commerce is
the merchant half and the store it owns; billing is the address a customer's
money questions are answered at.

### Motivation

The app answers at eight top-level roots today (`manifest/apps.go:116`), which
puts a cart, a storefront and a payment in three different generated client
classes for one subsystem. HIP-0139 §7.1's default closes that: an app with one
store is one capability, however many nouns it answers for.

### Specification

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted
as in RFC 2119.

#### §1 One root

Every route commerce serves MUST be under `/v1/commerce`:

- `/v1/commerce/cart` — the shopper's basket (from `/v1/cart`; HIP-1002).
- `/v1/commerce/catalog` — the merchant catalog rows in commerce's store,
  merging the SuperAdmin CRUD now at `/v1/catalog/*`.
- `/v1/commerce/payments` — the typed payment door (from `/v1/payments`;
  HIP-1005).
- `/v1/commerce/plans` — plan ROWS in commerce's datastore (from
  `/v1/plans/{entries,seed}`). The `/v1/plans` root is the plans capability's;
  these rows are not that catalog and take commerce's prefix.
- `/v1/commerce/store` — storefronts, listings, checkout (from `/v1/store`;
  HIP-1006).
- the tenant-admin surface, from `/_/commerce` — HIP-0139 §3.3, nothing outside
  `/v1`; same audience, same binary. This half of the fold lands in the
  `hanzoai/commerce` module, which registers those routes (one module release).

Where the router still serves the old spellings, the pairs are the `commerce`
lines in cloud's `openapi/misfiled.txt`, and each closes by fold, never alias.

#### §2 The billing boundary

Commerce MUST NOT serve `/v1/billing`. That address is billing's (HIP-0018),
answered over the plane; commerce keeps the store and publishes the plane
operations — balance, the prepaid gate, credit, usage, transactions, spend and
scope rules (`apps/commerce/mount.go:204-210`) — that the money door and every
metered surface debit through. One store, one publisher, one address that is
somebody else's.

#### §3 The store it owns

Per-tenant merchant and money stores under `<DataDir>/commerce`
(`apps/commerce/mount.go:319-323`), encrypted under the process master key when
the sqlcipher codec is linked. The at-rest posture is decided in exactly one
function (`apps/commerce/mount.go:161-170`): a production build refuses to open
money data unencrypted, and a pure-Go dev build gets the module's documented
unencrypted dev store rather than no money plane at all.

The customer ledger of record is NOT here: `EmbedConfig.Ledger` injects
`apps/finance`, so a credit minted by a settled charge lands in the one ledger
(`apps/commerce/mount.go:6-8`).

#### §4 Tenant

The paying org is read from the validated principal (HIP-0026) and never from a
request field — a field is caller-supplied, and an org read from one is a
cross-tenant write the caller asserted for itself
(`apps/commerce/payments.go:25-30`). A card payment taken here can only credit
the caller's own org.

#### §5 Price, and the screen on the mint

The surface is free, in those words: `Price: cloud.Free`
(`plugin/commerce/main.go:21`) — it is the path to payment itself. The meter
downstream of the edge is the one §2 publishes.

Both doors that mint spendable balance from a settled charge — the browser
top-up and the typed payment op — MUST wrap their handler, not their route, with
the one risk screen (`apps/commerce/mount.go`, the credit-screen note;
`apps/commerce/risk.go`): a typed op is projected four ways and only the handler
is the point all four run through.

#### §6 Events and observability

No `commerce.<noun>.<verb>` events reach the platform bus, so a customer's
webhooks (HIP-1310) receive nothing from it directly. A settled charge is
stated once, as the analytics event `order_completed` through the same capture
core `POST /v1/event` reaches (`apps/commerce/emit.go:24-31`, `:58`, `:80`) —
counted by the same lenses, forwarded by the same destinations fan-out. The
emit is detached and bounded: a conversion row is expendable, a settled payment
is not. Beyond the request span every route gets, it emits nothing.

#### §7 Typed and declared

The operations this repo owns are typed: payments, invoices, cart, the health
probe and the plane ops. The embedded module's surface is declared with prose
beside the live route (`apps/commerce/describe.go:3-14`), which cannot add an
operation, only explain one that exists. Each declared route is a typing the
module still owes — the honest typed op exports a value-taking core from the
module first — not a route that can never be typed
(`apps/commerce/mount.go`, the module-handler note).

#### §8 Stage and upstream

The stage is `ga` — the manifest row declares none, and absent is `ga`
(HIP-0139 §8).

It derives from `hanzoai/commerce` (pinned v1.50.58 in cloud's `go.mod:18`),
dual-licensed MIT / Apache-2.0. The whole module survives in HEAD — routes,
datastore, middleware — embedded in-process. PAN-touching paths relay to the
out-of-process Payments/Vault; this binary holds tokens and intent ids only
and is not in PCI-DSS scope (`apps/commerce/mount.go:16-19`).

### Rationale

The alternative to the fold is a split into cart, store, payments and catalog
capabilities. All of them read and write commerce's one datastore, so the split
is four apps on one store — the defect HIP-0139 §7.2 refuses by name. The nouns
stay; they become path segments of the app that owns their rows.

### Security Considerations

The wrong implementation hands an attacker the mint. A screen mounted on the
router instead of the handler leaves the same authorized deposit reachable
unscreened through the tool projection; an org taken from a request field turns a card
payment into a cross-tenant credit; a per-config at-rest posture lets a
production build quietly write plaintext money data where the per-build
decision in §3 refuses to boot.

## Four surfaces

| Surface  | Reaches this capability as                       | Coverage                                                    |
| -------- | ------------------------------------------------ | ----------------------------------------------------------- |
| **REST** | `commerce` at its own prefix                     | 164 operations                                              |
| **CLI**  | `hanzo commerce …`                               | 146 of 164 — the CLI pins the document on its own clock     |
| **SDK**  | `CommerceApi` in every published client          | 157 of 164 — the clients are generated at their own release |
| **MCP**  | tool `commerce` on `https://api.hanzo.ai/v1/mcp` | 5 operations                                                |

## Quickstart

```bash
export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys
```

Then the first call — a read that needs nothing but the key. `GET /v1/commerce/org`, operation `get_commerce_org`:

**CLI**

```bash
hanzo commerce org
```

**SDK**

**.ts**

```ts
import { Configuration, CommerceApi } from 'hanzoai';

const api = new CommerceApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getCommerceOrg();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import CommerceApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = CommerceApi(client).get_commerce_org()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.CommerceAPI.GetCommerceOrg(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, commerce_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = commerce_api::get_commerce_org(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.CommerceApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new CommerceApi(client).getCommerceOrg();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/commerce/org \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **commerce** through the `commerce` tool, which names its 5 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_commerce_health"
         }
       }
     }'
```

## Endpoints

| Endpoint                                                                                                                                                                             | What it does                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| [`POST /v1/commerce/cart/{id}/discard`](https://docs.hanzo.ai/docs/openapi/commerce/discardcart)                                                                                     | Discard a cart the shopper abandoned                                                               |
| [`POST /v1/commerce/cart/{id}/item`](https://docs.hanzo.ai/docs/openapi/commerce/setcartitem)                                                                                        | Set one item's quantity in a cart; zero removes it                                                 |
| [`GET /v1/commerce/cart/{id}`](https://docs.hanzo.ai/docs/openapi/commerce/getcart)                                                                                                  | Read one cart with its lines and totals                                                            |
| [`POST /v1/commerce/cart`](https://docs.hanzo.ai/docs/openapi/commerce/opencart)                                                                                                     | Open a cart for a shopper to fill                                                                  |
| [`POST /v1/commerce/catalog/models/refresh`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-catalog-models-refresh)                                                       | Refresh the model catalog by reading the upstream provider                                         |
| [`POST /v1/commerce/catalog/models`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-catalog-models)                                                                       | Land a syncer's view of the model catalog: upstream costs and machine facts                        |
| [`GET /v1/commerce/catalog`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-catalog)                                                                                       | The public product catalog projection for a brand                                                  |
| [`GET /v1/commerce/collection/{collectionid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-collection-by-collectionid)                                                  | Fetch one collection                                                                               |
| [`POST /v1/commerce/collection/{collectionid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-collection-by-collectionid)                                                | Method-override tunnel for a collection — for clients that cannot send PUT, PATCH or DELETE        |
| [`PUT /v1/commerce/collection/{collectionid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-collection-by-collectionid)                                                  | Replace a collection outright                                                                      |
| [`PATCH /v1/commerce/collection/{collectionid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-collection-by-collectionid)                                              | Change part of a collection                                                                        |
| [`DELETE /v1/commerce/collection/{collectionid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-collection-by-collectionid)                                            | Delete a collection, keeping a recoverable copy                                                    |
| [`GET /v1/commerce/collection`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-collection)                                                                                 | List your org's collections, as a page                                                             |
| [`POST /v1/commerce/collection`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-collection)                                                                               | Create a collection                                                                                |
| [`GET /v1/commerce/currencies`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-currencies)                                                                                 | The reference currency list the price and settings pickers render                                  |
| [`GET /v1/commerce/disclosure/{disclosureid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-disclosure-by-disclosureid)                                                  | Fetch one disclosure                                                                               |
| [`POST /v1/commerce/disclosure/{disclosureid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-disclosure-by-disclosureid)                                                | Method-override tunnel for a disclosure — for clients that cannot send PUT, PATCH or DELETE        |
| [`PUT /v1/commerce/disclosure/{disclosureid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-disclosure-by-disclosureid)                                                  | Replace a disclosure outright                                                                      |
| [`PATCH /v1/commerce/disclosure/{disclosureid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-disclosure-by-disclosureid)                                              | Change part of a disclosure                                                                        |
| [`DELETE /v1/commerce/disclosure/{disclosureid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-disclosure-by-disclosureid)                                            | Delete a disclosure, keeping a recoverable copy                                                    |
| [`GET /v1/commerce/disclosure`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-disclosure)                                                                                 | List your org's disclosures, as a page                                                             |
| [`POST /v1/commerce/disclosure`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-disclosure)                                                                               | Create a disclosure                                                                                |
| [`GET /v1/commerce/discount/{discountid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-discount-by-discountid)                                                          | Fetch one discount                                                                                 |
| [`POST /v1/commerce/discount/{discountid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-discount-by-discountid)                                                        | Method-override tunnel for a discount — for clients that cannot send PUT, PATCH or DELETE          |
| [`PUT /v1/commerce/discount/{discountid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-discount-by-discountid)                                                          | Replace a discount outright                                                                        |
| [`PATCH /v1/commerce/discount/{discountid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-discount-by-discountid)                                                      | Change part of a discount                                                                          |
| [`DELETE /v1/commerce/discount/{discountid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-discount-by-discountid)                                                    | Delete a discount, keeping a recoverable copy                                                      |
| [`GET /v1/commerce/discount`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-discount)                                                                                     | List your org's discounts, as a page                                                               |
| [`POST /v1/commerce/discount`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-discount)                                                                                   | Create a discount                                                                                  |
| [`GET /v1/commerce/health`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-health)                                                                                         | Answers ok whenever the commerce subsystem is mounted.                                             |
| [`GET /v1/commerce/movie/{movieid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-movie-by-movieid)                                                                      | Fetch one movie                                                                                    |
| [`POST /v1/commerce/movie/{movieid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-movie-by-movieid)                                                                    | Method-override tunnel for a movie — for clients that cannot send PUT, PATCH or DELETE             |
| [`PUT /v1/commerce/movie/{movieid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-movie-by-movieid)                                                                      | Replace a movie outright                                                                           |
| [`PATCH /v1/commerce/movie/{movieid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-movie-by-movieid)                                                                  | Change part of a movie                                                                             |
| [`DELETE /v1/commerce/movie/{movieid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-movie-by-movieid)                                                                | Delete a movie, keeping a recoverable copy                                                         |
| [`GET /v1/commerce/movie`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-movie)                                                                                           | List your org's movies, as a page                                                                  |
| [`POST /v1/commerce/movie`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-movie)                                                                                         | Create a movie                                                                                     |
| [`GET /v1/commerce/note/{noteid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-note-by-noteid)                                                                          | Fetch one note                                                                                     |
| [`POST /v1/commerce/note/{noteid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-note-by-noteid)                                                                        | Method-override tunnel for a note — for clients that cannot send PUT, PATCH or DELETE              |
| [`PUT /v1/commerce/note/{noteid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-note-by-noteid)                                                                          | Replace a note outright                                                                            |
| [`PATCH /v1/commerce/note/{noteid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-note-by-noteid)                                                                      | Change part of a note                                                                              |
| [`DELETE /v1/commerce/note/{noteid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-note-by-noteid)                                                                    | Delete a note, keeping a recoverable copy                                                          |
| [`GET /v1/commerce/note`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-note)                                                                                             | List your org's notes, as a page                                                                   |
| [`POST /v1/commerce/note`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-note)                                                                                           | Create a note                                                                                      |
| [`GET /v1/commerce/org`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-org)                                                                                               | The public org configuration a checkout page boots from                                            |
| [`GET /v1/commerce/product/{productid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-product-by-productid)                                                              | Fetch one product                                                                                  |
| [`POST /v1/commerce/product/{productid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-product-by-productid)                                                            | Method-override tunnel for a product — for clients that cannot send PUT, PATCH or DELETE           |
| [`PUT /v1/commerce/product/{productid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-product-by-productid)                                                              | Replace a product outright                                                                         |
| [`PATCH /v1/commerce/product/{productid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-product-by-productid)                                                          | Change part of a product                                                                           |
| [`DELETE /v1/commerce/product/{productid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-product-by-productid)                                                        | Delete a product, keeping a recoverable copy                                                       |
| [`GET /v1/commerce/product`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-product)                                                                                       | List your org's products, as a page                                                                |
| [`POST /v1/commerce/product`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-product)                                                                                     | Create a product                                                                                   |
| [`GET /v1/commerce/return/{returnid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-return-by-returnid)                                                                  | Fetch one return                                                                                   |
| [`POST /v1/commerce/return/{returnid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-return-by-returnid)                                                                | Method-override tunnel for a return — for clients that cannot send PUT, PATCH or DELETE            |
| [`PUT /v1/commerce/return/{returnid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-return-by-returnid)                                                                  | Replace a return outright                                                                          |
| [`PATCH /v1/commerce/return/{returnid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-return-by-returnid)                                                              | Change part of a return                                                                            |
| [`DELETE /v1/commerce/return/{returnid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-return-by-returnid)                                                            | Delete a return, keeping a recoverable copy                                                        |
| [`GET /v1/commerce/return`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-return)                                                                                         | List your org's returns, as a page                                                                 |
| [`POST /v1/commerce/return`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-return)                                                                                       | Create a return                                                                                    |
| [`GET /v1/commerce/saleschannel/{saleschannelid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-saleschannel-by-saleschannelid)                                          | Fetch one sales channel                                                                            |
| [`POST /v1/commerce/saleschannel/{saleschannelid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-saleschannel-by-saleschannelid)                                        | Method-override tunnel for a sales channel — for clients that cannot send PUT, PATCH or DELETE     |
| [`PUT /v1/commerce/saleschannel/{saleschannelid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-saleschannel-by-saleschannelid)                                          | Replace a sales channel outright                                                                   |
| [`PATCH /v1/commerce/saleschannel/{saleschannelid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-saleschannel-by-saleschannelid)                                      | Change part of a sales channel                                                                     |
| [`DELETE /v1/commerce/saleschannel/{saleschannelid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-saleschannel-by-saleschannelid)                                    | Delete a sales channel, keeping a recoverable copy                                                 |
| [`GET /v1/commerce/saleschannel`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-saleschannel)                                                                             | List your org's sales channels, as a page                                                          |
| [`POST /v1/commerce/saleschannel`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-saleschannel)                                                                           | Create a sales channel                                                                             |
| [`GET /v1/commerce/stocklocation/{stocklocationid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-stocklocation-by-stocklocationid)                                      | Fetch one stock location                                                                           |
| [`POST /v1/commerce/stocklocation/{stocklocationid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-stocklocation-by-stocklocationid)                                    | Method-override tunnel for a stock location — for clients that cannot send PUT, PATCH or DELETE    |
| [`PUT /v1/commerce/stocklocation/{stocklocationid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-stocklocation-by-stocklocationid)                                      | Replace a stock location outright                                                                  |
| [`PATCH /v1/commerce/stocklocation/{stocklocationid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-stocklocation-by-stocklocationid)                                  | Change part of a stock location                                                                    |
| [`DELETE /v1/commerce/stocklocation/{stocklocationid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-stocklocation-by-stocklocationid)                                | Delete a stock location, keeping a recoverable copy                                                |
| [`GET /v1/commerce/stocklocation`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-stocklocation)                                                                           | List your org's stock locations, as a page                                                         |
| [`POST /v1/commerce/stocklocation`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-stocklocation)                                                                         | Create a stock location                                                                            |
| [`POST /v1/commerce/store/{storeid}/authorize/{orderid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-authorize-by-orderid)                           | Authorize an order that already exists, holding the funds without settling them                    |
| [`POST /v1/commerce/store/{storeid}/authorize`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-authorize)                                                | Authorize a new order against a storefront, holding the funds without settling them                |
| [`GET /v1/commerce/store/{storeid}/bundle/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-by-storeid-bundle-by-key)                                           | Fetch a bundle as this storefront sells it                                                         |
| [`POST /v1/commerce/store/{storeid}/capture/{orderid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-capture-by-orderid)                               | Capture a previously authorized order and settle the payment                                       |
| [`POST /v1/commerce/store/{storeid}/charge`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-charge)                                                      | Authorize and capture a new order in one call                                                      |
| [`POST /v1/commerce/store/{storeid}/checkout/authorize/{orderid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-authorize-by-orderid)         | Authorize an existing order, holding the funds — the checkout spelling                             |
| [`POST /v1/commerce/store/{storeid}/checkout/authorize`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-authorize)                              | Authorize a new order against a storefront, holding the funds — the checkout spelling              |
| [`POST /v1/commerce/store/{storeid}/checkout/capture/{orderid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-capture-by-orderid)             | Capture a previously authorized order and settle it — the checkout spelling                        |
| [`POST /v1/commerce/store/{storeid}/checkout/charge`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-charge)                                    | Authorize and capture a new order in one call — the checkout spelling                              |
| [`POST /v1/commerce/store/{storeid}/checkout/paypal/cancel/{payKey}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-paypal-cancel-by-paykey)   | PayPal cancel by pay key — refuses, exactly as the unprefixed address does                         |
| [`POST /v1/commerce/store/{storeid}/checkout/paypal/confirm/{payKey}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-paypal-confirm-by-paykey) | PayPal confirm by pay key — refuses, exactly as the unprefixed address does                        |
| [`POST /v1/commerce/store/{storeid}/checkout/paypal/pay`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-checkout-paypal-pay)                            | Start a PayPal authorization for a new order — the checkout spelling                               |
| [`GET /v1/commerce/store/{storeid}/listing/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-by-storeid-listing-by-key)                                         | Fetch one listing override, by item id or by its slug or SKU                                       |
| [`POST /v1/commerce/store/{storeid}/listing/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-listing-by-key)                                       | Add a listing override under a new key                                                             |
| [`PUT /v1/commerce/store/{storeid}/listing/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-store-by-storeid-listing-by-key)                                         | Upsert a listing override                                                                          |
| [`PATCH /v1/commerce/store/{storeid}/listing/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-store-by-storeid-listing-by-key)                                     | Confirm a listing override exists and re-save the store                                            |
| [`DELETE /v1/commerce/store/{storeid}/listing/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-store-by-storeid-listing-by-key)                                   | Remove a listing override                                                                          |
| [`GET /v1/commerce/store/{storeid}/listing`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-by-storeid-listing)                                                      | The storefront's whole listing override map                                                        |
| [`POST /v1/commerce/store/{storeid}/paypal/cancel/{payKey}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-paypal-cancel-by-paykey)                     | PayPal cancel by pay key — refuses, because a pay key alone does not identify the order            |
| [`POST /v1/commerce/store/{storeid}/paypal/confirm/{payKey}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-paypal-confirm-by-paykey)                   | PayPal confirm by pay key — refuses, because a pay key alone does not identify the order           |
| [`POST /v1/commerce/store/{storeid}/paypal/pay`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-paypal-pay)                                              | Start a PayPal authorization for a new order                                                       |
| [`GET /v1/commerce/store/{storeid}/product/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-by-storeid-product-by-key)                                         | Fetch a product as this storefront sells it                                                        |
| [`POST /v1/commerce/store/{storeid}/trial`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid-trial)                                                        | Start this store's no-card trial on the entry plan                                                 |
| [`GET /v1/commerce/store/{storeid}/variant/{key}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-by-storeid-variant-by-key)                                         | Fetch a variant as this storefront sells it                                                        |
| [`GET /v1/commerce/store/{storeid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-by-storeid)                                                                      | Fetch one storefront                                                                               |
| [`POST /v1/commerce/store/{storeid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-by-storeid)                                                                    | Method-override tunnel for clients that cannot send PUT, PATCH or DELETE                           |
| [`PUT /v1/commerce/store/{storeid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-store-by-storeid)                                                                      | Replace a storefront outright                                                                      |
| [`PATCH /v1/commerce/store/{storeid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-store-by-storeid)                                                                  | Change part of a storefront                                                                        |
| [`DELETE /v1/commerce/store/{storeid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-store-by-storeid)                                                                | Delete a storefront, keeping a recoverable copy                                                    |
| [`GET /v1/commerce/store/access`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-access)                                                                             | Whether a store is entitled to trade, and why                                                      |
| [`GET /v1/commerce/store/current`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store-current)                                                                           | Resolve your org's active storefront without naming an id                                          |
| [`POST /v1/commerce/store/token`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store-token)                                                                             | Mint your org's least-privilege storefront read key                                                |
| [`GET /v1/commerce/store`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-store)                                                                                           | List your org's storefronts as a page                                                              |
| [`POST /v1/commerce/store`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-store)                                                                                         | Create a storefront                                                                                |
| [`GET /v1/commerce/submission/{submissionid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-submission-by-submissionid)                                                  | Fetch one submission                                                                               |
| [`POST /v1/commerce/submission/{submissionid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-submission-by-submissionid)                                                | Method-override tunnel for a submission — for clients that cannot send PUT, PATCH or DELETE        |
| [`PUT /v1/commerce/submission/{submissionid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-submission-by-submissionid)                                                  | Replace a submission outright                                                                      |
| [`PATCH /v1/commerce/submission/{submissionid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-submission-by-submissionid)                                              | Change part of a submission                                                                        |
| [`DELETE /v1/commerce/submission/{submissionid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-submission-by-submissionid)                                            | Delete a submission, keeping a recoverable copy                                                    |
| [`GET /v1/commerce/submission`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-submission)                                                                                 | List your org's submissions, as a page                                                             |
| [`POST /v1/commerce/submission`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-submission)                                                                               | Create a submission                                                                                |
| [`GET /v1/commerce/subscriber/{subscriberid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-subscriber-by-subscriberid)                                                  | Fetch one subscriber                                                                               |
| [`POST /v1/commerce/subscriber/{subscriberid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-subscriber-by-subscriberid)                                                | Method-override tunnel for a subscriber — for clients that cannot send PUT, PATCH or DELETE        |
| [`PUT /v1/commerce/subscriber/{subscriberid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-subscriber-by-subscriberid)                                                  | Replace a subscriber outright                                                                      |
| [`PATCH /v1/commerce/subscriber/{subscriberid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-subscriber-by-subscriberid)                                              | Change part of a subscriber                                                                        |
| [`DELETE /v1/commerce/subscriber/{subscriberid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-subscriber-by-subscriberid)                                            | Delete a subscriber, keeping a recoverable copy                                                    |
| [`GET /v1/commerce/subscriber`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-subscriber)                                                                                 | List your org's subscribers, as a page                                                             |
| [`POST /v1/commerce/subscriber`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-subscriber)                                                                               | Create a subscriber                                                                                |
| [`GET /v1/commerce/tokentransaction/{tokentransactionid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-tokentransaction-by-tokentransactionid)                          | Fetch one token transaction                                                                        |
| [`POST /v1/commerce/tokentransaction/{tokentransactionid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-tokentransaction-by-tokentransactionid)                        | Method-override tunnel for a token transaction — for clients that cannot send PUT, PATCH or DELETE |
| [`PUT /v1/commerce/tokentransaction/{tokentransactionid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-tokentransaction-by-tokentransactionid)                          | Replace a token transaction outright                                                               |
| [`PATCH /v1/commerce/tokentransaction/{tokentransactionid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-tokentransaction-by-tokentransactionid)                      | Change part of a token transaction                                                                 |
| [`DELETE /v1/commerce/tokentransaction/{tokentransactionid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-tokentransaction-by-tokentransactionid)                    | Delete a token transaction, keeping a recoverable copy                                             |
| [`GET /v1/commerce/tokentransaction`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-tokentransaction)                                                                     | List your org's token transactions, as a page                                                      |
| [`POST /v1/commerce/tokentransaction`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-tokentransaction)                                                                   | Create a token transaction                                                                         |
| [`GET /v1/commerce/transfer/{transferid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-transfer-by-transferid)                                                          | Fetch one transfer                                                                                 |
| [`POST /v1/commerce/transfer/{transferid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-transfer-by-transferid)                                                        | Method-override tunnel for a transfer — for clients that cannot send PUT, PATCH or DELETE          |
| [`PUT /v1/commerce/transfer/{transferid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-transfer-by-transferid)                                                          | Replace a transfer outright                                                                        |
| [`PATCH /v1/commerce/transfer/{transferid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-transfer-by-transferid)                                                      | Change part of a transfer                                                                          |
| [`DELETE /v1/commerce/transfer/{transferid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-transfer-by-transferid)                                                    | Delete a transfer, keeping a recoverable copy                                                      |
| [`GET /v1/commerce/transfer`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-transfer)                                                                                     | List your org's transfers, as a page                                                               |
| [`POST /v1/commerce/transfer`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-transfer)                                                                                   | Create a transfer                                                                                  |
| [`GET /v1/commerce/variant/{variantid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-variant-by-variantid)                                                              | Fetch one variant                                                                                  |
| [`POST /v1/commerce/variant/{variantid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-variant-by-variantid)                                                            | Method-override tunnel for a variant — for clients that cannot send PUT, PATCH or DELETE           |
| [`PUT /v1/commerce/variant/{variantid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-variant-by-variantid)                                                              | Replace a variant outright                                                                         |
| [`PATCH /v1/commerce/variant/{variantid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-variant-by-variantid)                                                          | Change part of a variant                                                                           |
| [`DELETE /v1/commerce/variant/{variantid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-variant-by-variantid)                                                        | Delete a variant, keeping a recoverable copy                                                       |
| [`GET /v1/commerce/variant`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-variant)                                                                                       | List your org's variants, as a page                                                                |
| [`POST /v1/commerce/variant`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-variant)                                                                                     | Create a variant                                                                                   |
| [`GET /v1/commerce/wallet/{walletid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-wallet-by-walletid)                                                                  | Fetch one wallet                                                                                   |
| [`POST /v1/commerce/wallet/{walletid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-wallet-by-walletid)                                                                | Method-override tunnel for a wallet — for clients that cannot send PUT, PATCH or DELETE            |
| [`PUT /v1/commerce/wallet/{walletid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-wallet-by-walletid)                                                                  | Replace a wallet outright                                                                          |
| [`PATCH /v1/commerce/wallet/{walletid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-wallet-by-walletid)                                                              | Change part of a wallet                                                                            |
| [`DELETE /v1/commerce/wallet/{walletid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-wallet-by-walletid)                                                            | Delete a wallet, keeping a recoverable copy                                                        |
| [`GET /v1/commerce/wallet`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-wallet)                                                                                         | List your org's wallets, as a page                                                                 |
| [`POST /v1/commerce/wallet`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-wallet)                                                                                       | Create a wallet                                                                                    |
| [`GET /v1/commerce/watchlist/{watchlistid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-watchlist-by-watchlistid)                                                      | Fetch one watchlist                                                                                |
| [`POST /v1/commerce/watchlist/{watchlistid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-watchlist-by-watchlistid)                                                    | Method-override tunnel for a watchlist — for clients that cannot send PUT, PATCH or DELETE         |
| [`PUT /v1/commerce/watchlist/{watchlistid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-watchlist-by-watchlistid)                                                      | Replace a watchlist outright                                                                       |
| [`PATCH /v1/commerce/watchlist/{watchlistid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-watchlist-by-watchlistid)                                                  | Change part of a watchlist                                                                         |
| [`DELETE /v1/commerce/watchlist/{watchlistid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-watchlist-by-watchlistid)                                                | Delete a watchlist, keeping a recoverable copy                                                     |
| [`GET /v1/commerce/watchlist`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-watchlist)                                                                                   | List your org's watchlists, as a page                                                              |
| [`POST /v1/commerce/watchlist`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-watchlist)                                                                                 | Create a watchlist                                                                                 |
| [`GET /v1/commerce/webhook/{webhookid}`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-webhook-by-webhookid)                                                              | Fetch one webhook                                                                                  |
| [`POST /v1/commerce/webhook/{webhookid}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-webhook-by-webhookid)                                                            | Method-override tunnel for a webhook — for clients that cannot send PUT, PATCH or DELETE           |
| [`PUT /v1/commerce/webhook/{webhookid}`](https://docs.hanzo.ai/docs/openapi/commerce/put-commerce-webhook-by-webhookid)                                                              | Replace a webhook outright                                                                         |
| [`PATCH /v1/commerce/webhook/{webhookid}`](https://docs.hanzo.ai/docs/openapi/commerce/patch-commerce-webhook-by-webhookid)                                                          | Change part of a webhook                                                                           |
| [`DELETE /v1/commerce/webhook/{webhookid}`](https://docs.hanzo.ai/docs/openapi/commerce/delete-commerce-webhook-by-webhookid)                                                        | Delete a webhook, keeping a recoverable copy                                                       |
| [`GET /v1/commerce/webhook`](https://docs.hanzo.ai/docs/openapi/commerce/get-commerce-webhook)                                                                                       | List your org's webhooks, as a page                                                                |
| [`POST /v1/commerce/webhook`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-webhook)                                                                                     | Create a webhook                                                                                   |
| [`POST /v1/commerce/webhooks/{provider}`](https://docs.hanzo.ai/docs/openapi/commerce/post-commerce-webhooks-by-provider)                                                            | Payment-provider webhook intake for settlement and subscription lifecycle events                   |

---

[All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
