平台分帳
平台分帳狀態變更時,SHOPLINE Payments 會發送 webhook 通知。可訂閱的事件類型如下:
| event.type | 說明 |
|---|---|
| trade.split.created | 分帳已建立 |
| trade.split.processing | 分帳處理中 |
| trade.split.cancelled | 分帳已取消 |
| trade.split.succeeded | 分帳成功 |
| trade.split.failed | 分帳失敗 |
請求電文
Http.header 參數
Content-TypeString必填
固定值:application/json
platformIdString必填
SLP 平台 ID,平台特店必填
merchantIdString必填
SLP 特店 ID
apiVersionString必填
API 版本
requestIdString(32)必填
請求流水號,每個 HTTP 請求唯一
timestampNumber(14)必填
發送通知的時間戳,精度為毫秒(1629169157000)
idempotentKeyString(32)選填
冪等 KEY
Http.body 電文
idString(35)必填
SLP 事件 ID
createdNumber(14)必填
通知事件建立時間
typeString(32)必填
SLP 事件類型,可為 trade.split.created、trade.split.processing、trade.split.cancelled、trade.split.succeeded 或 trade.split.failed
dataObject必填
分帳事件電文
splitIdString(32)必填
SLP 分帳流水號
referenceOrderIdString(32)選填
特店分帳訂單號,由特店自訂。僅可使用英文字母與數字,長度為 16 至 32 字元
tradeOrderIdString(32)選填
SLP 付款交易訂單編號
statusString(16)必填參考
分帳交易狀態
finishBoolean必填
是否標記為此特店付款交易的最後一次分帳作業。true 表示本次分帳後不再建立新的分帳交易;false 表示後續仍會對此子特店付款交易繼續建立分帳交易
splitDataArray<SplitData>選填
分帳明細
amountCurrencyAmount必填
分帳金額
valueNumber(14)必填
金額,台幣傳金額*100,譬如 1 元傳入 100
currencyString(3)必填
幣種,目前僅支援 TWD
destinationString(32)必填
分帳目標 SLP 帳戶的子特店 ID
descriptionString(128)必填
分帳說明
reasonString(32)必填參考
分帳原因代號
errorPaymentError選填
分帳失敗原因;分帳失敗時回傳