Skip to content

In Check Out

Description

結帳流程

Resource

POST /v1/openai_scenario/in_check_out

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Request Body Parameters

Name Type Description
message string 用戶輸入
accept_payment list[Payment] 可支援的結帳方式
accept_carrier list[carry] 可支援的載具

Request Body Parameters Payment

Name Type Description
payment_id string 付款代碼
payment_name string 付款名稱

Request Body Parameters carry

Name Type Description
carry_id string 載具代碼
carry_name string 載具名稱

Request Example

{
    "message": "用戶輸入文本",
    "accept_payment": [{
        "payment_id": "Q006",
        "payment_name": "LINEPAY"
        }],
    "accept_carrier": [{
        "carry_id": "C001",
        "carry_name": "發票載具"
    }]
}

Response Body Parameters

Name Type Description
intent string 意圖
  • payment_method
  • uniform_invoice
  • invoice_carrier
  • cart_return
  • unrecognized
parameters object 返回參數

Response Body Parameters Parameters

Name Type Description
payment_id string 付款方式代碼
invoice_number bool 是否是用統一編號
carrier_type bool 是否是用電子載具
error_type string 錯誤類型

Response Example

Status-Code: 200

{
    "intent": "payment_method",
    "parameters": {
        "payment_id": "Q006",
        "invoice_number": true
        }
}