Order and pay #
From picking a drink to hearing that the payment went through.
输入
storeIdstring— The store the customer picks up from.
步骤 #
- Find the drink the customer wants.参数
category=coffee得到 · 200{"data": [{"id": "mi_oat_latte","name": "Oat latte","category": "coffee","price": {"amount": 3200,"currency": "CNY"}},… 还有 1 项],"next_cursor": null} - Order two cups of it at the customer's store.← 第 1 步的 itemId← 输入 storeId发送{"store_id": "$inputs.storeId","items": [{"menu_item_id": "mi_oat_latte","quantity": 2}]}得到 · 201{"id": "ord_8f2k1","status": "pending_payment","store_id": "st_shanghai_01","total": {"amount": 6400,"currency": "CNY"},"items": [{"menu_item_id": "mi_oat_latte","quantity": 2,"options": {"milk": "oat","size": "grande"}}],"pay_url": "https://pay.kawa-coffee.example/p/ord_8f2k1","created_at": "2026-11-30T23:41:07+08:00"}
- Pay with WeChat Pay.← 第 2 步的 orderId发送{"order_id": "ord_8f2k1","method": "wechat"}得到 · 201{"id": "pay_3qx9","order_id": "ord_8f2k1","status": "succeeded","amount": {"amount": 0,"currency": "CNY"}}
- Your webhook hears about it.← 第 2 步的 orderId← 第 3 步的 paymentId你会收到{"order_id": "ord_8f2k1","payment_id": "pay_3qx9","paid_at": "2026-12-01T08:21:44+08:00"}
来源: order-flow.arazzo.yaml · orderAndPay


评论