NATSpayment.order.reconcile.diff订单对账差异(JetStream 事件)
Try it 面板需要启用 JavaScript。
payment_worker 对账扫描(直连只读支付库,比对渠道账单与订单表)发现差异后发布、payment_service 消费并处置。此方向为单向流,无回复。
Request Payload
消息格式:JSON
| Name | Data Type | Required | Description |
|---|---|---|---|
| eventId | string | Yes | 事件 ID(JetStream 消息去重键) |
| orderId | string | Yes | 差异订单 ID |
| diffType | string | Yes | 渠道已扣款未入账(charged_unrecorded)/ 已入账未扣款(recorded_uncharged)/ 金额不一致(amount_mismatch) |
| expectedAmount | number | No | 本地订单金额 |
| actualAmount | number | No | 渠道实际金额 |
| foundAt | string | Yes | 发现时间 |
type RequestBody = {
/** 事件 ID(JetStream 消息去重键) */
eventId: string
/** 差异订单 ID */
orderId: string
/** 渠道已扣款未入账(charged_unrecorded)/ 已入账未扣款(recorded_uncharged)/ 金额不一致(amount_mismatch) */
diffType: string
/** 本地订单金额 */
expectedAmount?: number
/** 渠道实际金额 */
actualAmount?: number
/** 发现时间 */
foundAt: string
}{
"eventId": "01JD8SXDBQ7O4PL",
"orderId": "01JD8SNZFT8A1B7HB",
"diffType": "amount_mismatch",
"expectedAmount": 288,
"actualAmount": 287.99,
"foundAt": "2026-10-14T03:10:00Z"
}Examples
{
"eventId": "01JD8SXDBQ7O4PL",
"orderId": "01JD8SNZFT8A1B7HB",
"diffType": "amount_mismatch",
"expectedAmount": 288,
"actualAmount": 287.99,
"foundAt": "2026-10-14T03:10:00Z"
}
Remarks
流语义:JetStream 持久化;payment_service 消费后落对账差异工单并告警,处置结果只进支付库与审计事件,不回流 worker。对账扫描 cron(RECONCILE_CRON)由 worker 配置项控制。