# 交易與履行

> Hosted checkout, orders, payments, receipts, inventory and shipping on one transaction core.

> Markdown version of https://kanorio.com/zh-Hant/developers/products/orders. Append `.md` to any developer docs URL for this format. Index: https://kanorio.com/llms.txt · MCP: https://app.kanorio.com/api/mcp
>
> Translated from the English original: https://kanorio.com/en/developers/products/orders.md

Status: **Available**

訂單記錄了顧客的購買與付款內容。結帳流程在 Kanorio 的託管結帳頁面上執行，該頁面會處理付款與收據，隨後將顧客導回您的前端。

## 核心物件

- **訂單 (Orders)：** 包含項目明細、總金額、顧客資訊以及付款與履行狀態。
- **交易 (Transactions)：** 針對訂單進行的付款與退款。
- **履行 (Fulfillment)：** 實體商品的運送與數位商品的存取授權。

## API 如何運作

- 將您的購買按鈕連結至託管結帳頁面，並設定 `return_to` 網址。付款完成後，系統會自動授予連結的權益。
- 使用 Management API 讀取訂單，並透過 Customer API 讓顧客查看自己的訂單與收據。
- Webhooks 會回報已付款的訂單、退款與運送狀態變更，並提供可供追蹤的 `operationId`。

退款需從後台執行。權杖絕不會被授予退款權限。

## What the APIs expose

| Capability | Status | API | Elements | Hosted site | Webhooks |
| --- | --- | --- | --- | --- | --- |
| Orders & hosted checkout | Available | Management API `orders.*`; Customer `GET /orders`, `GET /orders/:id` | — | `/orders`, `/data/orders`; system-hosted checkout & `/account/orders` | `ec.order.paid` |
| Merchant-to-customer subscriptions (recurring billing) | Planned | Planned (`subscriptions.*`), a sub-domain of the transaction core; not derived from the site's own Kanorio plan | — | Planned | — |

## API reference

- Management API: [Orders](https://kanorio.com/en/developers/management-api/orders) (2 operations)
- Management API: [Store](https://kanorio.com/en/developers/management-api/store) (1 operations)
- Customer API: [Orders](https://kanorio.com/en/developers/customer-api/orders) (2 operations)

## Webhook events

- `ec.order.paid`: Fired when an order payment succeeds and is captured.
- `ec.shipment.statusChanged`: Fired when a shipment status transitions (in transit, arrived at store, delivered, or exception).
- `ec.order.refunded`: Fired once per successful refund (partial or full, issued from the dashboard, at the payment provider, or by a lost chargeback) with the refunded lines and the order's refund status after it.

Payloads: https://kanorio.com/en/developers/webhooks/events

## Recent changes

- 2026-11-03: Customer API: course, unit and order text in the customer's locale
- 2026-11-02: Products: shipping is decided per variant

Full changelog: https://kanorio.com/en/developers/changelog

## For site owners

Dashboard help: https://kanorio.com/zh-Hant/help/store-orders
