訂單(Order)狀態流程與來源
toobo
上次更新 5 個月前
【這篇解決什麼問題】
你想確認訂單狀態如何流轉、各種來源怎麼影響分析,以及哪些欄位最關鍵。
【訂單狀態流程】
常見流程包含:
完整狀態:pending、paid、failed、refunded、cancelled。
【訂單來源(source)】
【支付方式(payment_method)】
【訂閱週期(billing_cycle)與 MRR】
【常見錯誤與排除】
Q1:為什麼重送建立訂單會重複?
請使用 X-Idempotency-Key 避免重複建立。
Q2:order_no 可重複嗎?
同一商家內不可重複,請使用穩定且唯一的訂單編號策略。
【下一步】
你想確認訂單狀態如何流轉、各種來源怎麼影響分析,以及哪些欄位最關鍵。
【訂單狀態流程】
常見流程包含:
- pending -> paid -> refunded
- pending -> failed
- pending -> cancelled
完整狀態:pending、paid、failed、refunded、cancelled。
【訂單來源(source)】
- api
- import
- manual
- webhook
- newebpay
- ecpay
【支付方式(payment_method)】
- credit_card、atm、cvs、line_pay、jkopay、apple_pay
【訂閱週期(billing_cycle)與 MRR】
- monthly、quarterly、semi-annual、yearly、one-time
- 除 one-time 外,經常性訂單會納入 MRR
- 正規化規則:年繳除以 12、半年繳除以 6、季繳除以 3、月繳除以 1
【常見錯誤與排除】
Q1:為什麼重送建立訂單會重複?
請使用 X-Idempotency-Key 避免重複建立。
Q2:order_no 可重複嗎?
同一商家內不可重複,請使用穩定且唯一的訂單編號策略。
【下一步】
- 需要管理週期關係時,請看「訂閱狀態、事件與優先權」
- 需要導入舊資料時,請看「資料匯入完整流程」
