Confirm Order
Description
確認訂單。
Resource
PATCH /v3/order/confirm
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| id | string | 訂單編號 |
| payments | Payment[] | 付款資訊 (optional) |
| receipt | bool | 是否開立發票 |
| number | string | 取餐號碼 (optional) |
| store_id | string | 門市編號 (optional) |
| external_id | string | 外部編號 (optional) |
| has_print_receipt | bool | 是否有列印發票 (optional) |
| receipt_info | Receipt | 發票資訊,發票組合詳細範例 (optional) |
Request Body Parameters - Payment
| Name | Type | Description |
|---|---|---|
| type | Payment | 付款方式 |
| payment_amount | int | 支付金額 |
| transaction_id | string | 交易代碼 |
| relate_id | string | 其他代碼 (optional) |
| detail | Detail | 付款明細(信用卡及現金券需填入) (optional) |
Request Body Parameters Payment Instruction
| type | name |
|---|---|
| LINE_PAY | LINE Pay |
| PI_PAY | Pi Pay |
| CREDIT_CARD | 信用卡 |
| EASY_CARD | 悠遊卡 |
| CASH | 臨櫃結帳 |
| MWD_PAY | 麥味登Pay |
| Easy_Wallet | 悠遊付 |
| APPLE_PAY | Apple Pay |
| GOOGLE_PAY | Google Pay |
| CASH_TICKET | 禮券 |
| POINT_DISCOUNT_AMOUNT | 點數折抵金額 |
| NCCC_EASY_CARD | NCCC悠遊卡 |
| NCCC_IPASS | NCCC一卡通 |
| NCCC_ICASH | NCCC iCash |
| NCCC_HAPPY_CASH | NCCC有錢卡 |
| CASH_CAR | 現金 |
| CHARGE_CARD | 簽帳 |
| MOTORCADE | 車隊 |
| CREDIT_CARD_CAR | 信用卡 |
| CTBC_CARD | 中信卡 |
| BARCODE_PAY | 條碼支付 |
| TAIWAN_PAY | 台灣 Pay |
| JkoPay | 街口支付 |
| CUSTOMIZE | 自定義金流 |
| TK01 | 門票折抵 |
| HAO_SPEED | 全家外送自取 |
| EC | EC |
| HSA_EXTRA | 異質POS |
| PX_PAY | 全支付 |
| CASH_ON_DELIVERY | 貨到付款 |
| NEWEB_PAY | 藍新金流 |
| CASH_MODULE | 現金模組 |
| I_CASH_PAY | 愛金卡支付 |
| DD_PAY | 信用卡(DD_PAY) |
Request Body Parameters - Detail
| Name | Type | Description |
|---|---|---|
| resource_number | string | 信用卡卡號或是現金卷的票號 |
| terminal_data | string | Receipt No + Terminal ID |
| auth_code | string | 授權碼 |
| reference_no | string | 參考編號 |
Request Body Parameters - Receipt
| Name | Type | Description |
|---|---|---|
| tax_ID_number | string | 統一編號 (optional) |
| npoban | string | 捐贈碼 (https://i.imgur.com/5LAsOF4.jpg) (optional) |
| carrier_type | string | 買方載具類別 (optional) |
| carrier | string | 買方載具 (optional) |
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| code | Code Instruction | 回傳代碼(optional) |
| message | Code Instruction | 回傳訊息(optional) |
| confirm_failed_tickets | Confirm Failed Ticket[] | 核銷票券失敗列表(optional) |
| take_meal_number | string | 取餐號碼(optional) |
| order_detail | Order Detail | 訂單明細(optional) 僅有回傳200時會回傳訂單明細 |
Response Body Parameters - Order Detail
| Name | Type | Description |
|---|---|---|
| current_state | string (enum) |
訂單狀態 ALLOWED VALUES:
|
| order_type | string | 訂單類型 ALLOWED VALUES:
|
| paid | bool | 是否已付款 |
| placed_at | string | 提交時間 ISO 8601 format EXAMPLE "2020-01-01T15:16:54.723Z" |
| pickup_at | string | 取貨時間 ISO 8601 format EXAMPLE "2020-01-01T15:16:54.723Z" |
| type | string (enum) |
銷售方式 ALLOWED VALUES:
|
| machine_id | string | 機號 |
| store | Store | 接單門市 |
| customer | Customer | 消費者資訊 |
| payments | Payment[] | 付款資訊 |
| charges | Charges | 費用 |
| cart | Cart | 購物車資訊 |
| receipt | Receipt | 發票資訊,發票組合詳細範例 (optional) |
| special_instructions | string | 特殊要求 (optional) |
| display_id | string | 取餐號 (optional) |
| table_number | string | 桌號 (optional) |
| client_device | string (enum) |
客戶端裝置 ALLOWED VALUES:
|
| source_id | string | 外部訂單編號 |
| admission_ticket | Admission Ticket | 門票資訊 (optional) |
| tour | Tour | 導覽資訊 (optional) |
| pickup_method | Pickup Method | 取貨方式 (optional) |
| activity_message | string | 活動訊息 (optional) |
| good_status | string (enum) |
貨物狀態 ALLOWED VALUES:
(optional) |
| ticket_info | TicketInfo | 優惠券資訊 |
| return_reason | string | 退貨原因 (optional) |
| open_table | bool | 開桌狀態 (optional) |
Response Body Parameters - Store
| Name | Type | Description |
|---|---|---|
| id | string | 門市代碼 |
| name | string | 門市名稱 |
Response Body Parameters - Customer
| Name | Type | Description |
|---|---|---|
| name | string | 姓名 (optional) |
| mobile | string | 手機號碼 (optional) |
| address | string | 地址 (optional) |
Response Body Parameters - Payment
| Name | Type | Description |
|---|---|---|
| type | Payment Type | 付款方式 |
| name | Payment Name | 付款名稱 |
| payment_amount | integer | 支付金額 |
| transaction_id | string | 交易代碼 |
| paid | bool | 是否已付款 |
Response Body Parameters - Payment Instruction
| type | name |
|---|---|
| LINE_PAY | LINE Pay |
| PI_PAY | Pi Pay |
| CREDIT_CARD | 信用卡 |
| EASY_CARD | 悠遊卡 |
| CASH | 臨櫃結帳 |
| MWD_PAY | 麥味登Pay |
| Easy_Wallet | 悠遊付 |
| APPLE_PAY | Apple Pay |
| GOOGLE_PAY | Google Pay |
| CASH_TICKET | 禮券 |
| POINT_DISCOUNT_AMOUNT | 點數折抵金額 |
| NCCC_EASY_CARD | NCCC悠遊卡 |
| NCCC_IPASS | NCCC一卡通 |
| NCCC_ICASH | NCCC iCash |
| NCCC_HAPPY_CASH | NCCC有錢卡 |
| CASH_CAR | 現金 |
| CHARGE_CARD | 簽帳 |
| MOTORCADE | 車隊 |
| CREDIT_CARD_CAR | 信用卡 |
| CTBC_CARD | 中信卡 |
| BARCODE_PAY | 條碼支付 |
| TAIWAN_PAY | 台灣 Pay |
| TK01 | 門票折抵 |
| HAO_SPEED | 全家外送自取 |
| EC | EC |
| PX_PAY | 全支付 |
| HSA_EXTRA | 異質POS |
| NEWEB_PAY | 藍新金流 |
| I_CASH_PAY | 愛金卡支付 |
| DD_PAY | 信用卡(DD_PAY) |
Response Body Parameters - Charges
| Name | Type | Description |
|---|---|---|
| total | Money | 整張訂單總金額 |
| sub_total | Money | 所有品項總金額 |
| discount | Money | 折扣金額 |
| total_fee | Money | 實際付款金額 |
| total_extra | Money | 總溢收金額 |
| admission_tickets | Money | 門票總金額 (optional) |
| courses | Money | 課程總金額 (optional) |
| sale_event_coupon | Money | 抵用券金額 |
| points | Point | 訂單點數使用明細 只有訂單狀態為CREATED,且有使用點數時回傳 (optional) |
Response Body Parameters - Cart
| Name | Type | Description |
|---|---|---|
| items | Item[] | 品項資料 |
Response Body Parameters - Receipt
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
發票類型 ALLOWED VALUES:
|
| tax_ID_number | string | 買方統一編號 (optional) |
| npoban | string | 捐贈碼 (optional) |
| carrier_type | string | 買方載具類別 (optional) |
| carrier | string | 買方載具 (optional) |
| receipt_number | string | 發票號碼 (optional) |
| random_number | string | 隨機碼 (optional) |
| AESKey | string | AESKey (optional) |
| title | string | 發票標題 (optional) |
| begin_ym | string | 起始年月 (optional) |
| end_ym | string | 結束年月 (optional) |
| gui_number | string | 賣方統一編號 (optional) |
Response Body Parameters - Item
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
商品類型 ALLOWED VALUES:
|
| id | string | 編號 |
| title | string | 商品第一名稱 |
| translate_title | string | 翻譯名稱 |
| second_title | string | 商品第二名稱 |
| abbreviated_title | string | 商品簡稱 |
| serial_number | int | 序號 |
| quantity | int | 數量 |
| special_instructions | string | 特殊要求 (optional) |
| price | ItemPrice | 售價 |
| selected_modifier_groups | ModifierGroup[] | 可選群組 (optional) |
| ticket_no | string | 票卷號碼 (optional) |
| redeem_point | int | 兌換點數 |
| is_hidden | boolean | 是否隱藏商品 |
| allocated_quantity | int | 已分配數量 (optional) |
| remaining_quantity | int | 剩餘數量 (optional) |
| verified_quantity | int | 已入園數量 (optional) |
| unverified_quantity | int | 未入園數量 (optional) |
| car | Car | 汽車資訊 (optional) |
| course | Course | 課程資訊 (optional) |
| show_certificate | boolean | 是否出示證明文件 |
| combo_id | string | 套餐編號 |
| is_combo | boolean | 是否為套餐 |
| is_combo_item | boolean | 是否為套餐子項目 |
| pack_id | string | 系列組合編號 |
| is_pack | boolean | 是否為系列組合 |
| is_pack_item | boolean | 是否為系列組合子項目 |
| image | string | 圖檔或圖片URL |
| external_id | string | 外部商品編號 (optional) |
| unique_code | string | 訂單唯一碼 |
| pack_suit_id | string | 系列組合編號 (optional) |
| is_limited | boolean | 是否為限量商品 |
| combo_no | string | 套餐序號 |
| ai_recommend | boolean | 是否為ai推薦 |
Response Body Parameters - ItemPrice
| Name | Type | Description |
|---|---|---|
| unit_price | Money | 單價 |
| total_price | Money | 合計售價 |
Response Body Parameters - ModifierGroup
| Name | Type | Description |
|---|---|---|
| id | string | 編號 |
| title | string | 名稱 |
| translate_title | string | 翻譯名稱 |
| selected_items | Item[] | 被選擇的品項 |
| removed_items | Item[] | 沒被選擇的品項 |
| combo_taste | boolean | 是否為套餐加值 (optional) |
Response Body Parameters - Money
| Name | Type | Description |
|---|---|---|
| amount | integer | 最小單位金額 |
| discount | integer | 折價金額 |
| currency_code | string | 貨幣代碼 ISO 4217 code |
| formatted_amount | string | 顯示用金額 |
Response Body Parameters - Car
| Name | Type | Description |
|---|---|---|
| id | string | 車號 |
| name | string | 車名 |
Response Body Parameters - Course
| Name | Type | Description |
|---|---|---|
| classroom_id | string | 教室編號 |
| classroom_name | string | 教室名稱 |
| class_time | string | 上課時間 EXAMPLE "2020-01-01 12:00:00" |
Response Body Parameters - Point
| Name | Type | Description |
|---|---|---|
| before_transaction | integer | 本次交易前持有點數 |
| exchange_amount | integer | 本次交易可折抵金額 |
| after_transaction | integer | 本次交易後點數餘額 |
| add | integer | 本次交易後新增點數 |
| use | integer | 本次交易使用點數 |
Response Body Parameters - Admission Ticket
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
門票類型 ALLOWED VALUES:
|
| verification_code | string | 驗證碼 |
| expected_admission_date | string | 預計入園日期 EXAMPLE "2020-01-01 12:00:00" |
| actual_admission_date | string | 實際入園日期 EXAMPLE "2020-01-01 12:00:00" |
| extended_expiration_date | string | 系統展延有效日期 EXAMPLE "2020-01-01 12:00:00" |
Response Body Parameters - Tour
| Name | Type | Description |
|---|---|---|
| travel_agency_id | string | 旅行社編號 |
| travel_agency_name | string | 旅行社名稱 |
| guide_id | string | 導遊編號 |
| group_name | string | 團體名稱 |
| group_type_id | string | 團體類別編號 |
| group_type_name | string | 團體類別名稱 |
| need_tour | boolean | 是否需要導覽 |
| course_quantity | integer | 課程數量 |
Response Body Parameters - Pickup Method
| Name | Type | Description |
|---|---|---|
| id | string | 取貨方式編號 |
| name | string | 取貨方式名稱 |
Response Body Parameters - Ticket Info
| Name | Type | Description |
|---|---|---|
| product_tickets | Ticket[] | 單品票券 |
| order_tickets | Ticket[] | 訂單票券 |
Response Body Parameters - Ticket
| Name | Type | Description |
|---|---|---|
| name | string | 票劵名稱 |
| quantity | int | 票劵數量 |
| discount | float | 折價金額 |
| detail | Detail[] | 票券明細 |
Response Body Parameters - Detail
| Name | Type | Description |
|---|---|---|
| id | string | 票劵編號 |
| expired_date | string | 票券效期 |
| discount | float | 折價金額 |
Response Body Parameters - Code Instruction
| code | message |
|---|---|
| 4401 | 確認訂單成功,部分票券核銷失敗 |
| 4402 | 益欣票券核銷失敗 |
| 4403 | 墨攻票券核銷失敗且訂單無其他商品 |
Response Body Parameters - Confirm Failed Ticket
| Name | Type | Description |
|---|---|---|
| number | string | 票券號碼 |
| encrypt_number | string | 加密券號 |
| sale_from | string | 通路來源 |
| code | string | 核銷票券 API 回傳代碼 |
| message | string | 核銷票券 API 回傳訊息 |
Response Example
Status-Code: 200
{
"order_detail": {
"current_state": "ACCEPTED",
"order_type": "ONLINE",
"placed_at": "2020-05-01T22:25:49Z",
"pickup_at": "2020-05-01T22:25:49Z",
"type": "DELIVERY",
"machine_id": "k1",
"store": {
"id": "A01",
"name": "台南店"
},
"customer": {
"name": "王大明",
"mobile": "0910123456",
"address": "台南市安平區健康三街999號"
},
"payments": [{
"type": "CASH",
"name": "臨櫃結帳",
"payment_amount": 1000,
"transaction_id": "test"
}
],
"charges": {
"total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"sub_total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"discount": {
"amount": 100,
"currency_code": "TWD",
"formatted_amount": "100"
},
"total_fee": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"total_extra": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"points": {
"before_transaction": 120,
"exchange_amount": 10,
"after_transaction": 21,
"add": 1
}
},
"cart": {
"items": [{
"type": "GENERAL_PRODUCT",
"id": "P001",
"title": "番茄泡菜炒豆包",
"second_title": "",
"abbreviated_title": "",
"serial_number": 1,
"quantity": 2,
"price": {
"unit_price": {
"amount": 40000,
"currency_code": "TWD",
"formatted_amount": "400"
},
"total_price": {
"amount": 80000,
"currency_code": "TWD",
"formatted_amount": "800"
}
},
"selected_modifier_groups": [{
"id": "1",
"title": "辣度",
"selected_items": [{
"id": "1-1",
"title": "小辣",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0,
"is_hidden": false,
"combo_id": "1",
"is_combo": true,
"is_combo_item": false,
"pack_id": "",
"is_pack": false,
"is_pack_item": false
}, {
"type": "GENERAL_PRODUCT",
"id": "P002",
"title": "紫蘇籽油腐乳炒飯",
"second_title": "",
"abbreviated_title": "",
"serial_number": 5001,
"special_instructions": "不要洋蔥",
"quantity": 1,
"price": {
"unit_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
},
"total_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
}
},
"selected_modifier_groups": [{
"id": "2",
"title": "加飯",
"selected_items": [{
"id": "2-1",
"title": "白飯",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}, {
"id": "3",
"title": "加胡椒",
"selected_items": [{
"id": "3-1",
"title": "胡椒",
"quantity": 0,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0,
"is_hidden": false,
"combo_id": "2",
"is_combo": true,
"is_combo_item": false,
"pack_id": "",
"is_pack": false,
"is_pack_item": false
}
]
},
"receipt": {
"type": "PAPER",
"tax_ID_number": "24436074",
"npoban": "",
"carrier_type": "",
"carrier": "",
"receipt_number": "WE00011771",
"random_number": "3931",
"AESKey": "",
"title": "",
"begin_ym": "202007",
"end_ym": "202008",
"gui_number": "24916968"
},
"special_instructions": "訂單備註內容",
"display_id": "k006",
"table_number": "12",
"client_device": "APP",
"source_id": "MCSF0221051300006",
"open_table": false,
"pickup_method": {
"id": "1",
"name": "現場取貨"
},
"return_reason": ""
}
}
Response Example - 重複確認訂單
Status-Code: 200
{
"code": "1123",
"message": "此筆訂單已確認,不需重複確認",
"take_meal_number": "K002",
"order_detail": {
"current_state": "ACCEPTED",
"order_type": "ONLINE",
"placed_at": "2020-05-01T22:25:49Z",
"pickup_at": "2020-05-01T22:25:49Z",
"type": "DELIVERY",
"machine_id": "k1",
"store": {
"id": "A01",
"name": "台南店"
},
"customer": {
"name": "王大明",
"mobile": "0910123456",
"address": "台南市安平區健康三街999號"
},
"payments": [{
"type": "CASH",
"name": "臨櫃結帳",
"payment_amount": 1000,
"transaction_id": "test"
}
],
"charges": {
"total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"sub_total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"discount": {
"amount": 100,
"currency_code": "TWD",
"formatted_amount": "100"
},
"total_fee": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"total_extra": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"points": {
"before_transaction": 120,
"exchange_amount": 10,
"after_transaction": 21,
"add": 1
}
},
"cart": {
"items": [{
"type": "GENERAL_PRODUCT",
"id": "P001",
"title": "番茄泡菜炒豆包",
"second_title": "",
"abbreviated_title": "",
"serial_number": 1,
"quantity": 2,
"price": {
"unit_price": {
"amount": 40000,
"currency_code": "TWD",
"formatted_amount": "400"
},
"total_price": {
"amount": 80000,
"currency_code": "TWD",
"formatted_amount": "800"
}
},
"selected_modifier_groups": [{
"id": "1",
"title": "辣度",
"selected_items": [{
"id": "1-1",
"title": "小辣",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0,
"is_hidden": false,
"combo_id": "1",
"is_combo": true,
"is_combo_item": false,
"pack_id": "",
"is_pack": false,
"is_pack_item": false
}, {
"type": "GENERAL_PRODUCT",
"id": "P002",
"title": "紫蘇籽油腐乳炒飯",
"second_title": "",
"abbreviated_title": "",
"serial_number": 5001,
"special_instructions": "不要洋蔥",
"quantity": 1,
"price": {
"unit_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
},
"total_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
}
},
"selected_modifier_groups": [{
"id": "2",
"title": "加飯",
"selected_items": [{
"id": "2-1",
"title": "白飯",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}, {
"id": "3",
"title": "加胡椒",
"selected_items": [{
"id": "3-1",
"title": "胡椒",
"quantity": 0,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0,
"is_hidden": false,
"combo_id": "2",
"is_combo": true,
"is_combo_item": false,
"pack_id": "",
"is_pack": false,
"is_pack_item": false
}
]
},
"receipt": {
"type": "PAPER",
"tax_ID_number": "24436074",
"npoban": "",
"carrier_type": "",
"carrier": "",
"receipt_number": "WE00011771",
"random_number": "3931",
"AESKey": "",
"title": "",
"begin_ym": "202007",
"end_ym": "202008",
"gui_number": "24916968"
},
"special_instructions": "訂單備註內容",
"display_id": "k006",
"table_number": "12",
"client_device": "APP",
"source_id": "MCSF0221051300006",
"open_table": false,
"pickup_method": {
"id": "1",
"name": "現場取貨"
},
"return_reason": ""
}
}
Response Example - 墨攻票券部分核銷失敗且訂單有其他商品
Status-Code: 200
{
"code": "4401",
"message": "確認訂單成功,部分票券核銷失敗",
"confirm_failed_tickets": [{
"number": "AA0001",
"encrypt_number": "AAx12k",
"sale_from": "KKDAY",
"code": "0002",
"message": "票券優惠期間已過,如有疑問請洽票券原購買平台商"
}
],
"order_detail": {
"current_state": "ACCEPTED",
"order_type": "ONLINE",
"placed_at": "2020-05-01T22:25:49",
"pickup_at": "2020-05-01T22:25:49",
"type": "DELIVERY",
"machine_id": "k1",
"store": {
"id": "A01",
"name": "台南店"
},
"customer": {
"name": "王大明",
"mobile": "0910123456",
"address": "台南市安平區健康三街999號"
},
"payments": [{
"type": "CASH",
"name": "臨櫃結帳",
"payment_amount": 1000,
"transaction_id": "test"
}
],
"charges": {
"total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"sub_total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"discount": {
"amount": 100,
"currency_code": "TWD",
"formatted_amount": "100"
},
"total_fee": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"total_extra": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"points": {
"before_transaction": 120,
"exchange_amount": 10,
"after_transaction": 21,
"add": 1
}
},
"cart": {
"items": [{
"type": "GENERAL_PRODUCT",
"id": "P001",
"title": "番茄泡菜炒豆包",
"second_title": "",
"abbreviated_title": "",
"serial_number": 1,
"quantity": 2,
"price": {
"unit_price": {
"amount": 40000,
"currency_code": "TWD",
"formatted_amount": "400"
},
"total_price": {
"amount": 80000,
"currency_code": "TWD",
"formatted_amount": "800"
}
},
"selected_modifier_groups": [{
"id": "1",
"title": "辣度",
"selected_items": [{
"id": "1-1",
"title": "小辣",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0,
"is_hidden": false,
"combo_id": "1",
"is_combo": true,
"is_combo_item": false,
"pack_id": "",
"is_pack": false,
"is_pack_item": false
}, {
"type": "GENERAL_PRODUCT",
"id": "P002",
"title": "紫蘇籽油腐乳炒飯",
"second_title": "",
"abbreviated_title": "",
"serial_number": 5001,
"special_instructions": "不要洋蔥",
"quantity": 1,
"price": {
"unit_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
},
"total_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
}
},
"selected_modifier_groups": [{
"id": "2",
"title": "加飯",
"selected_items": [{
"id": "2-1",
"title": "白飯",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}, {
"id": "3",
"title": "加胡椒",
"selected_items": [{
"id": "3-1",
"title": "胡椒",
"quantity": 0,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0,
"is_hidden": false,
"combo_id": "2",
"is_combo": true,
"is_combo_item": false,
"pack_id": "",
"is_pack": false,
"is_pack_item": false
}
]
},
"receipt": {
"type": "PAPER",
"tax_ID_number": "24436074",
"npoban": "",
"carrier_type": "",
"carrier": "",
"receipt_number": "WE00011771",
"random_number": "3931",
"AESKey": "",
"title": "",
"begin_ym": "202007",
"end_ym": "202008",
"gui_number": "24916968"
},
"special_instructions": "訂單備註內容",
"display_id": "k006",
"table_number": "12",
"client_device": "APP",
"source_id": "MCSF0221051300006",
"open_table": false,
"pickup_method": {
"id": "1",
"name": "現場取貨"
},
"return_reason": ""
}
}
Response Example - 益欣票券核銷失敗
Status-Code: 400 Bad Request
{
"code": "4402",
"message": "00003023112000080訂單取消成功",
"confirm_failed_tickets": []
}
Response Example - 墨攻票券核銷失敗且訂單無其他商品
Status-Code: 400 Bad Request
{
"code": "4403",
"message": "00003023112000080訂單取消成功",
"confirm_failed_tickets": [
{
"number": "AA0001",
"encrypt_number": "AAx12k",
"sale_from": "KKDAY",
"code": "0002",
"message": "票券優惠期間已過,如有疑問請洽票券原購買平台商"
}
]
}