# 订单取消

**Webhook** orders/cancelled

未完成订单取消时触发。

需要 `order` [访问权限](/zh-CN/docs/app/building-blocks/authentication/access-scopes)。最低支持版本：`202007`。

## 请求头

- `X-Shoplazza-Topic` string

  触发本次推送的事件，例如 orders/create

  **示例：** `orders/create`
- `X-Shoplazza-Hmac-Sha256` string

  请求体的 HMAC-SHA256 签名（base64 编码），使用应用的 Client Secret 生成，用于验证请求来自 Shoplazza
- `X-Shoplazza-Shop-Domain` string

  产生该事件的店铺域名

  **示例：** `example.myshoplaza.com`
- `X-Shoplazza-Api-Version` string

  序列化 payload 使用的 API 版本

  **示例：** `2025-06`
- `X-Shoplazza-Deduplication-ID` string

  本次推送的去重 ID，同一事件重发时保持不变，用于幂等去重

## 请求体

**数据结构 | 示例**

- `order` object

  - `id` string

    订单 ID
  - `number` string

    订单号
  - `note` string

    商家针对该订单输入的自定义备注
  - `financial_status` string

    订单支付状态。取值：waiting（待支付）、paying（支付处理中）、authorized（已授权）、partially\_paid（部分支付）、paid（已支付）、failed（支付失败）、refunding（退款中）、refund\_failed（退款失败）、refunded（已退款）、partially\_refunded（部分退款）、cancelled（已取消）
  - `status` string

    订单状态。取值：opened（进行中）、placed（已成交/支付成功）、finished（已完成，或支付后取消的终态）、cancelled（未支付即取消）
  - `cancel_reason` string

    订单取消原因
  - `canceled_at` string

    订单取消时间
  - `payment_method` string

    订单使用的支付方式（如 apple\_pay、credit\_card、online）
  - `fulfillment_status` string

    订单物流状态。取值：initialled（未进入履约）、waiting（待发货）、partially\_shipped（部分发货）、shipped（已发货）、partially\_finished（部分完成）、finished（已完成）、cancelled（已取消）、returning（退货中）、partially\_returned（部分退货）、returned（已退货）
  - `customer_note` string

    顾客在结账时填写的备注信息
  - `buyer_accepts_marketing` boolean

    顾客是否同意接收营销推广信息
  - `currency` string

    订单的货币代码
  - `tags` string

    商家或系统为订单添加的自定义标签
  - `sub_total` string

    订单中所有商品行的价格总和
  - `total_discount` string

    订单总折扣金额，包含商品折扣、运费折扣和支付折扣
  - `total_tax` string

    订单商品税总额，不含运费税
  - `total_shipping` string

    订单总运费
  - `total_price` string

    顾客支付的最终金额，包含税费、折扣、小费、附加费和运费
  - `duty_total` string

    关税税费总额
  - `total_tip_received` string

    订单收到的小费总额
  - `discount_applications` string

    已应用折扣的详情（JSON 字符串）
  - `discount_code` string (deprecated)

    订单使用的折扣码。（已废弃：请改为解析 `discount_applications` 获取）
  - `code_discount_total` string (deprecated)

    折扣码带来的优惠总额。（已废弃：请改从 `discount_applications` 提取）
  - `line_item_discount_total` string (deprecated)

    商品项级折扣总额。（已废弃：请改从 `discount_applications` 提取）
  - `applied_gift_cards` string (deprecated)

    结账过程中应用的礼品卡。（已废弃：不建议使用）
  - `created_at` string

    订单创建时间（如 2018-11-02T12:30:10Z）
  - `updated_at` string

    订单更新时间
  - `customer_deleted_at` string

    订单关联顾客的删除时间
  - `deleted_at` string

    订单删除时间
  - `placed_at` string

    订单支付时间
  - `closed_at` string

    订单关闭时间
  - `browser_ip` string

    浏览器 IP 地址
  - `landing_site` string

    顾客首次访问的落地页 URL
  - `last_landing_url` string

    最后一次访问落地页 URL
  - `config` string

    订单配置快照（JSON 字符串），含市场信息与结账页配置
  - `checkout_url` string

    订单结账页面的 URL（含店铺域名）
  - `refer_info` string

    访问来源信息（JSON 字符串）
  - `sales_platform` string

    销售渠道
  - `order_type` integer

    订单类型
  - `product_tax_included` boolean

    商品价格是否已含税
  - `additional_total` string

    附加费用总额，数字字符串（如 "9.99"）
  - `shipping_tax_total` string

    订单运费税总额
  - `shipping_tax_type` integer

    运费税类型
  - `test` boolean (deprecated)

    是否为测试订单。（已废弃：不建议使用，请自行判定）
  - `total_paid` string

    顾客为订单支付的总金额
  - `real_total_paid` string

    实际支付总金额
  - `refund_price` string (deprecated)

    最近一次发起的退款金额（仅退款事件返回）。（已废弃：勿用）
  - `refund_status` string (deprecated)

    最近一次退款的退款方式（仅退款事件返回）。（已废弃：勿用）
  - `total_refund_price` string

    已成功处理的退款总金额（如 "9.99"）
  - `total_refund_discount` string (deprecated)

    累计已退款优惠（仅退款事件返回）。（已废弃：勿用）
  - `total_refund_tax` string (deprecated)

    累计已退款税费（仅退款事件返回）。（已废弃：勿用）
  - `customer` object

    下单顾客信息。非订单快照数据，可能随该顾客下一次下单而变化

    - `id` string

      顾客 ID
    - `first_name` string

      名
    - `last_name` string

      姓
    - `email` string

      电子邮件地址
    - `phone` string

      电话号码
    - `order_count` integer

      顾客下单数量
    - `total_spent` string

      顾客总消费金额
    - `created_at` string

      顾客记录创建时间
    - `updated_at` string

      顾客记录最后更新时间
  - `shipping_address` object

    收货地址

    - `first_name` string

      收件人的名
    - `last_name` string

      收件人的姓
    - `name` string

      收件人姓名
    - `address1` string

      地址行（如 Suite 1234）
    - `address2` string

      第二地址行
    - `city` string

      城市（如 SAN JOSE）
    - `area` string

      地区（如 Bay area）
    - `province` string

      省份（如 New Mexico）
    - `province_code` string

      省份代码（如 NM）
    - `country` string

      国家（如 United States）
    - `country_code` string

      国家代码（如 US）
    - `zip` string

      邮政编码（如 87036）
    - `phone` string

      电话号码（如 +86 1231231234）
    - `phone_area_code` string

      区号（如 +86）。`shipping_address` 中存在
    - `company` string

      公司名称（如 ABC Limited）
    - `latitude` string

      配送地址的纬度（如 22.54）
    - `longitude` string

      配送地址的经度（如 114.06）
    - `email` string

      电子邮件地址
    - `extra_info` object

      特殊物流信息：`extra_info.cpf`（个人税号）、`extra_info.tax_text`（税务文本）、`extra_info.short_address`（短地址）；`extra_info.addition` 为商家自定义字典

      - `cpf` string

        个人税号（CPF）
      - `tax_text` string

        税务文本
      - `short_address` string

        简略地址
      - `addition` object

        商家自定义字典，键不固定
  - `billing_address` object

    账单地址

    - `first_name` string

      收件人的名
    - `last_name` string

      收件人的姓
    - `name` string

      收件人姓名
    - `address1` string

      地址行（如 Suite 1234）
    - `address2` string

      第二地址行
    - `city` string

      城市（如 SAN JOSE）
    - `area` string

      地区（如 Bay area）
    - `province` string

      省份（如 New Mexico）
    - `province_code` string

      省份代码（如 NM）
    - `country` string

      国家（如 United States）
    - `country_code` string

      国家代码（如 US）
    - `zip` string

      邮政编码（如 87036）
    - `phone` string

      电话号码（如 +86 1231231234）
    - `phone_area_code` string

      区号（如 +86）。`shipping_address` 中存在
    - `company` string

      公司名称（如 ABC Limited）
    - `latitude` string

      配送地址的纬度（如 22.54）
    - `longitude` string

      配送地址的经度（如 114.06）
    - `email` string

      电子邮件地址
    - `extra_info` object

      特殊物流信息：`extra_info.cpf`（个人税号）、`extra_info.tax_text`（税务文本）、`extra_info.short_address`（短地址）；`extra_info.addition` 为商家自定义字典

      - `cpf` string

        个人税号（CPF）
      - `tax_text` string

        税务文本
      - `short_address` string

        简略地址
      - `addition` object

        商家自定义字典，键不固定
  - `line_items` object[]

    购买商品列表

    *   Array \[

    - `id` string

      订单商品项 ID
    - `product_id` string

      商品 ID
    - `variant_id` string

      子款式 ID
    - `product_title` string

      已购商品名称
    - `variant_title` string

      子款式标题，例如 "Blue, Size M"
    - `product_handle` string

      商品的 URL handle
    - `product_url` string

      商品页面 URL
    - `sku` string

      SKU
    - `spu` string

      标准商品单元（SPU）
    - `quantity` integer

      已购该商品的数量
    - `price` string

      售价
    - `compare_at_price` string

      划线价
    - `total` string

      该商品项的行总额
    - `duty_price` string

      关税费用
    - `payment_discount_price` string

      应用于订单商品项的支付折扣金额
    - `discount_applications` string

      应用于该商品项的折扣（JSON 字符串）
    - `fulfillment_status` string

      订单商品项的履约状态，例如 "fulfilled"、"unfulfilled"
    - `requires_shipping` boolean

      订单商品项是否需要物流
    - `weight` string

      商品重量
    - `weight_unit` string

      商品重量的计量单位，例如 "kg"、"lbs"
    - `image` string

      商品图片
    - `note` string

      订单商品项的商品备注
    - `vendor` string

      商品供应商
    - `refund_quantity` integer (deprecated)

      最近一次发起的退款数量（仅退款事件返回）。（已废弃：勿用）
    - `refund_total` string (deprecated)

      累计退款商品金额（仅退款事件返回）。（已废弃：勿用）
    - `properties` object[]

      商品项属性，每项含 `name` 和 `value`

      *   Array \[

      - `name` string

        属性名
      - `value` string

        属性值
      *   \]
    - `custom_properties` object

      订单商品项的自定义属性（如尺码、颜色）。商家自定义字典——key 因商品而异
    - `shipped_quantity` integer

      本次发货数量。仅出现在 `fulfillments[].line_items` 中
    - `main_currency_prices` object

      换算为主市场货币的价格

      - `sub_total` string

        主市场货币下的小计
      - `total_price` string

        主市场货币下的总价
      - `total_discount` string

        主市场货币下的总折扣
      - `total_tax` string

        主市场货币下的总税额
      - `total_shipping` string

        主市场货币下的总运费
      - `actual_rate` string

        应用的汇率
      - `primary_market_currency` string

        主市场货币代码
      - `price` string

        主市场货币下的单价（商品项级）
      - `compare_at_price` string

        主市场货币下的划线价（商品项级）
      - `total` string

        该行商品总价（售价×数量）换算为主市场货币后的金额（商品项级）
    *   \]
  - `main_currency_prices` object

    换算为店铺主市场货币的价格

    - `sub_total` string

      主市场货币下的小计
    - `total_price` string

      主市场货币下的总价
    - `total_discount` string

      主市场货币下的总折扣
    - `total_tax` string

      主市场货币下的总税额
    - `total_shipping` string

      主市场货币下的总运费
    - `actual_rate` string

      应用的汇率
    - `primary_market_currency` string

      主市场货币代码
    - `price` string

      主市场货币下的单价（商品项级）
    - `compare_at_price` string

      主市场货币下的划线价（商品项级）
    - `total` string

      该行商品总价（售价×数量）换算为主市场货币后的金额（商品项级）
  - `payment_line` object

    支付详情

    - `id` string

      支付行 ID
    - `payment_channel` string

      交易使用的支付渠道（如 PayPal、Stripe、银行转账）
    - `payment_method` string

      渠道内使用的具体支付方式（如 Visa、MasterCard、在线支付）
    - `transaction_no` string

      与本次支付关联的唯一交易号
    - `credit_card_number` string

      所使用信用卡的末几位数字
    - `merchant_email` string

      商家电子邮件地址
    - `desc` string

      支付描述
    - `merchant_id` string

      商户 ID
    - `paid_total` string

      通过该支付行支付的金额
  - `payment_lines` object[]

    支付行列表

    *   Array \[

    - `id` string

      支付行 ID
    - `payment_channel` string

      交易使用的支付渠道（如 PayPal、Stripe、银行转账）
    - `payment_method` string

      渠道内使用的具体支付方式（如 Visa、MasterCard、在线支付）
    - `transaction_no` string

      与本次支付关联的唯一交易号
    - `credit_card_number` string

      所使用信用卡的末几位数字
    - `merchant_email` string

      商家电子邮件地址
    - `desc` string

      支付描述
    - `merchant_id` string

      商户 ID
    - `paid_total` string

      通过该支付行支付的金额
    *   \]
  - `shipping_line` object

    订单所选物流方案的信息

    - `name` string

      名称
    - `desc` string

      描述
    - `delivery_method` integer

      配送方式
    - `extra_info` string

      附加物流信息（JSON 字符串）
  - `fulfillments` object[]

    物流记录列表

    *   Array \[

    - `id` string

      履约 ID
    - `order_id` string

      订单 ID
    - `status` string

      物流单状态
    - `created_at` string

      创建时间（ISO-8601 格式）
    - `updated_at` string

      最后更新时间（ISO-8601 格式）
    - `line_items` object[]

      本次履约包含的商品项

      *   Array \[

      - `id` string

        订单商品项 ID
      - `product_id` string

        商品 ID
      - `variant_id` string

        子款式 ID
      - `product_title` string

        已购商品名称
      - `variant_title` string

        子款式标题，例如 "Blue, Size M"
      - `product_handle` string

        商品的 URL handle
      - `product_url` string

        商品页面 URL
      - `sku` string

        SKU
      - `spu` string

        标准商品单元（SPU）
      - `quantity` integer

        已购该商品的数量
      - `price` string

        售价
      - `compare_at_price` string

        划线价
      - `total` string

        该商品项的行总额
      - `duty_price` string

        关税费用
      - `payment_discount_price` string

        应用于订单商品项的支付折扣金额
      - `discount_applications` string

        应用于该商品项的折扣（JSON 字符串）
      - `fulfillment_status` string

        订单商品项的履约状态，例如 "fulfilled"、"unfulfilled"
      - `requires_shipping` boolean

        订单商品项是否需要物流
      - `weight` string

        商品重量
      - `weight_unit` string

        商品重量的计量单位，例如 "kg"、"lbs"
      - `image` string

        商品图片
      - `note` string

        订单商品项的商品备注
      - `vendor` string

        商品供应商
      - `refund_quantity` integer (deprecated)

        最近一次发起的退款数量（仅退款事件返回）。（已废弃：勿用）
      - `refund_total` string (deprecated)

        累计退款商品金额（仅退款事件返回）。（已废弃：勿用）
      - `properties` object[]

        商品项属性，每项含 `name` 和 `value`

        *   Array \[

        - `name` string

          属性名
        - `value` string

          属性值
        *   \]
      - `custom_properties` object

        订单商品项的自定义属性（如尺码、颜色）。商家自定义字典——key 因商品而异
      - `shipped_quantity` integer

        本次发货数量。仅出现在 `fulfillments[].line_items` 中
      - `main_currency_prices` object

        换算为主市场货币的价格

        - `sub_total` string

          主市场货币下的小计
        - `total_price` string

          主市场货币下的总价
        - `total_discount` string

          主市场货币下的总折扣
        - `total_tax` string

          主市场货币下的总税额
        - `total_shipping` string

          主市场货币下的总运费
        - `actual_rate` string

          应用的汇率
        - `primary_market_currency` string

          主市场货币代码
        - `price` string

          主市场货币下的单价（商品项级）
        - `compare_at_price` string

          主市场货币下的划线价（商品项级）
        - `total` string

          该行商品总价（售价×数量）换算为主市场货币后的金额（商品项级）
      *   \]
    - `tracking_items` object[]

      本次履约包含的物流运单列表

      *   Array \[

      - `tracking_company` string

        物流商
      - `tracking_company_code` string

        物流商编码
      - `tracking_number` string

        运单号
      - `tracking_url` string

        物流链接
      *   \]
    - `tracking_company` string

      物流商名称。多个运单见 `tracking_items`
    - `tracking_company_code` string

      物流商编码。多个运单见 `tracking_items`
    - `tracking_number` string

      运单号。多个运单见 `tracking_items`
    - `tracking_url` string

      物流跟踪链接。多个运单见 `tracking_items`
    *   \]
  - `location_line` object

    商家仓库地址

    - `location_id` string

      关联位置的标识符
    - `location_name` string

      位置名称，如店铺或仓库名称
    - `first_name` string

      联系人名
    - `last_name` string

      联系人姓
    - `phone` string

      联系电话
    - `email` string

      联系邮箱
    - `country` string

      国家
    - `country_code` string

      国家代码
    - `province` string

      省份
    - `province_code` string

      省份代码
    - `area` string

      地区
    - `city` string

      城市
    - `address` string

      地址
    - `address1` string

      地址行
    - `company` string

      公司
    - `zip` string

      邮政编码
    - `latitude` string

      纬度
    - `longitude` string

      经度
  - `additional_prices` object[]

    附加费用明细列表

    *   Array \[

    - `biz_id` string

      业务 ID
    - `name` string

      附加费用名称
    - `fee_title` string

      自定义收费名称
    - `price` string

      附加费用金额
    *   \]

```json
{
  "order": {
    "id": "string",
    "number": "string",
    "note": "string",
    "financial_status": "string",
    "status": "string",
    "cancel_reason": "string",
    "canceled_at": "string",
    "payment_method": "string",
    "fulfillment_status": "string",
    "customer_note": "string",
    "buyer_accepts_marketing": true,
    "currency": "string",
    "tags": "string",
    "sub_total": "string",
    "total_discount": "string",
    "total_tax": "string",
    "total_shipping": "string",
    "total_price": "string",
    "duty_total": "string",
    "total_tip_received": "string",
    "discount_applications": "string",
    "created_at": "string",
    "updated_at": "string",
    "customer_deleted_at": "string",
    "deleted_at": "string",
    "placed_at": "string",
    "closed_at": "string",
    "browser_ip": "string",
    "landing_site": "string",
    "last_landing_url": "string",
    "config": "string",
    "checkout_url": "string",
    "refer_info": "string",
    "sales_platform": "string",
    "order_type": 0,
    "product_tax_included": true,
    "additional_total": "string",
    "shipping_tax_total": "string",
    "shipping_tax_type": 0,
    "total_paid": "string",
    "real_total_paid": "string",
    "total_refund_price": "string",
    "customer": {
      "id": "string",
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "phone": "string",
      "order_count": 0,
      "total_spent": "string",
      "created_at": "string",
      "updated_at": "string"
    },
    "shipping_address": {
      "first_name": "string",
      "last_name": "string",
      "name": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "area": "string",
      "province": "string",
      "province_code": "string",
      "country": "string",
      "country_code": "string",
      "zip": "string",
      "phone": "string",
      "phone_area_code": "string",
      "company": "string",
      "latitude": "string",
      "longitude": "string",
      "email": "string",
      "extra_info": {
        "cpf": "string",
        "tax_text": "string",
        "short_address": "string",
        "addition": {}
      }
    },
    "billing_address": {
      "first_name": "string",
      "last_name": "string",
      "name": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "area": "string",
      "province": "string",
      "province_code": "string",
      "country": "string",
      "country_code": "string",
      "zip": "string",
      "phone": "string",
      "phone_area_code": "string",
      "company": "string",
      "latitude": "string",
      "longitude": "string",
      "email": "string",
      "extra_info": {
        "cpf": "string",
        "tax_text": "string",
        "short_address": "string",
        "addition": {}
      }
    },
    "line_items": [
      {
        "id": "string",
        "product_id": "string",
        "variant_id": "string",
        "product_title": "string",
        "variant_title": "string",
        "product_handle": "string",
        "product_url": "string",
        "sku": "string",
        "spu": "string",
        "quantity": 0,
        "price": "string",
        "compare_at_price": "string",
        "total": "string",
        "duty_price": "string",
        "payment_discount_price": "string",
        "discount_applications": "string",
        "fulfillment_status": "string",
        "requires_shipping": true,
        "weight": "string",
        "weight_unit": "string",
        "image": "string",
        "note": "string",
        "vendor": "string",
        "properties": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "custom_properties": {},
        "shipped_quantity": 0,
        "main_currency_prices": {
          "sub_total": "string",
          "total_price": "string",
          "total_discount": "string",
          "total_tax": "string",
          "total_shipping": "string",
          "actual_rate": "string",
          "primary_market_currency": "string",
          "price": "string",
          "compare_at_price": "string",
          "total": "string"
        }
      }
    ],
    "main_currency_prices": {
      "sub_total": "string",
      "total_price": "string",
      "total_discount": "string",
      "total_tax": "string",
      "total_shipping": "string",
      "actual_rate": "string",
      "primary_market_currency": "string",
      "price": "string",
      "compare_at_price": "string",
      "total": "string"
    },
    "payment_line": {
      "id": "string",
      "payment_channel": "string",
      "payment_method": "string",
      "transaction_no": "string",
      "credit_card_number": "string",
      "merchant_email": "string",
      "desc": "string",
      "merchant_id": "string",
      "paid_total": "string"
    },
    "payment_lines": [
      {
        "id": "string",
        "payment_channel": "string",
        "payment_method": "string",
        "transaction_no": "string",
        "credit_card_number": "string",
        "merchant_email": "string",
        "desc": "string",
        "merchant_id": "string",
        "paid_total": "string"
      }
    ],
    "shipping_line": {
      "name": "string",
      "desc": "string",
      "delivery_method": 0,
      "extra_info": "string"
    },
    "fulfillments": [
      {
        "id": "string",
        "order_id": "string",
        "status": "string",
        "created_at": "string",
        "updated_at": "string",
        "line_items": [
          {
            "id": "string",
            "product_id": "string",
            "variant_id": "string",
            "product_title": "string",
            "variant_title": "string",
            "product_handle": "string",
            "product_url": "string",
            "sku": "string",
            "spu": "string",
            "quantity": 0,
            "price": "string",
            "compare_at_price": "string",
            "total": "string",
            "duty_price": "string",
            "payment_discount_price": "string",
            "discount_applications": "string",
            "fulfillment_status": "string",
            "requires_shipping": true,
            "weight": "string",
            "weight_unit": "string",
            "image": "string",
            "note": "string",
            "vendor": "string",
            "properties": [
              {
                "name": "string",
                "value": "string"
              }
            ],
            "custom_properties": {},
            "shipped_quantity": 0,
            "main_currency_prices": {
              "sub_total": "string",
              "total_price": "string",
              "total_discount": "string",
              "total_tax": "string",
              "total_shipping": "string",
              "actual_rate": "string",
              "primary_market_currency": "string",
              "price": "string",
              "compare_at_price": "string",
              "total": "string"
            }
          }
        ],
        "tracking_items": [
          {
            "tracking_company": "string",
            "tracking_company_code": "string",
            "tracking_number": "string",
            "tracking_url": "string"
          }
        ],
        "tracking_company": "string",
        "tracking_company_code": "string",
        "tracking_number": "string",
        "tracking_url": "string"
      }
    ],
    "location_line": {
      "location_id": "string",
      "location_name": "string",
      "first_name": "string",
      "last_name": "string",
      "phone": "string",
      "email": "string",
      "country": "string",
      "country_code": "string",
      "province": "string",
      "province_code": "string",
      "area": "string",
      "city": "string",
      "address": "string",
      "address1": "string",
      "company": "string",
      "zip": "string",
      "latitude": "string",
      "longitude": "string"
    },
    "additional_prices": [
      {
        "biz_id": "string",
        "name": "string",
        "fee_title": "string",
        "price": "string"
      }
    ]
  }
}
```
