Onerway
POST

分账结果通知

回调地址
接收分账或分账回退结果,并通过 relatedTxnId 与 relatedMerchantTxnId 关联原支付交易。自动通知使用原交易的 paymentMethodOptions.share.profitShareNotifyUrl;未配置该地址时,不发送自动通知。通过 API 发起分账或分账回退时使用 urlCallback;原交易已配置 profitShareNotifyUrl 时,可省略 urlCallback。

除以下字段外,全部回调报文字段均参与验签:

回调报文字段

profitType
本次通知对应的是分账还是分账回退。
可选值
share
本次通知对应分账。
return
本次通知对应分账回退。
profitReference
分账或分账回退请求号。通过 API 发起时,由商户提供;自动分账或自动分账回退时,由 Onerway 生成。可使用 relatedTxnId 与 relatedMerchantTxnId 将处理结果关联到原支付交易。
profitGatewayReference
分账或分账回退的 Onerway 单号。
state
分账单整体处理状态。completed 不代表每条明细都成功,需逐条检查 receivers[].result。
可选值
processing
分账单处理中。
completed
分账单处理结束;单条明细结果需逐条检查。
currency
分账或分账回退结算币种。
relatedTxnId
原支付交易流水号。分账回退仍关联原支付,而非分账单。
relatedMerchantTxnId
原支付的商户订单号。
各接收方的处理结果列表。
sign
使用商户 SECRET 计算签名,并与本字段比较,验证分账或分账回退通知。详见 Webhook 验签。
约束
规则
验签时不要把 sign 自身作为待签名字段。

回调示例

{
  "profitType": "share",
  "profitReference": "example_profit_share_reference",
  "profitGatewayReference": "replace_with_profit_gateway_reference",
  "state": "completed",
  "currency": "USD",
  "relatedTxnId": "9007199254740993",
  "relatedMerchantTxnId": "example_payment_order",
  "receivers": "[{\"profitDetailReference\":\"example_profit_share_detail_reference\",\"profitDetailGatewayReference\":\"replace_with_profit_detail_gateway_reference\",\"type\":\"1\",\"amount\":\"80.00\",\"result\":\"success\",\"failReason\":null,\"createdAt\":\"2026-06-22 10:00:00\",\"finishedAt\":\"2026-06-22 10:00:08\"}]",
  "sign": "replace_with_sha256_signature"
}

应答说明

成功接收并受理分账 webhook 后返回 HTTP 200;不需要在响应体中返回固定内容。

应答正文示例

无应答正文。