每个事件类型的作用域都是单个应用,目前支持的事件包括:
事件类型 | 描述 |
---|---|
summary.daily.available | 上一天 0 点到 23 点 59 分 59 秒的交易金额和交易量统计,在每日 04:00 点左右触发。 |
summary.weekly.available | 上周一 0 点至上周日 23 点 59 分 59 秒的交易金额和交易量统计,在每周一 04:00 点左右触发。 |
summary.monthly.available | 上月一日 0 点至上月末 23 点 59 分 59 秒的交易金额和交易量统计,在每月一日 04:00 点左右触发。 |
charge.succeeded | 支付对象,支付成功时触发。 |
charge.failed | 支付对象,支付(签约扣款)失败时触发。 |
refund.succeeded | 退款对象,退款成功时触发。 |
refund.failed | 退款对象,退款失败时触发。 |
transfer.succeeded | 企业付款对象,支付成功时触发。 |
transfer.failed | 企业付款对象,支付失败时触发。 |
red_envelope.sent | 红包对象,红包发送成功时触发。 |
red_envelope.received | 红包对象,红包接收成功时触发。 |
batch_transfer.succeeded | 批量企业付款对象,批量企业付款成功或部分成功时触发。 |
batch_transfer.failed | 批量企业付款对象,批量企业付款全部失败时触发。 |
customs.succeeded | 报关对象,报关成功时触发。 |
batch_refund.succeeded | 批量退款对象,批量退款成功或部分成功时触发。 |
order.succeeded | 订单对象,订单支付成功时触发。 |
order.refunded | 订单退款对象,订单退款成功时触发。 |
balance.withdrawal.succeeded | 提现对象,提现成功时触发。 |
balance.withdrawal.failed | 提现对象,提现失败时触发。 |
batch_withdrawal.succeeded | 批量提现对象,批量提现成功时触发。 |
batch_withdrawal.failed | 批量提现对象,批量提现全部或部分失败时触发。 |
batch_withdrawal.partially_succeeded | 批量提现对象,批量提现部分成功时触发。 |
batch_withdrawal.canceled | 批量提现对象,批量提现取消时触发。 |
royalty_settlement.succeeded | 分润结算对象,分润结算全部成功时触发。 |
royalty_settlement.partially_succeeded | 分润结算对象,分润结算部分成功时触发。 |
royalty_settlement.failed | 分润结算对象,分润结算全部失败时触发。 |
royalty_settlement.canceled | 分润结算对象,分润结算全部取消时触发。 |
recharge.succeeded | 充值对象,充值成功时触发。 |
recharge.refund.succeeded | 充值对象,充值退款成功时触发。 |
右边是具体的 json 字符串展示针对 App 对象的各交易汇总事件类型的数据格式。 当事件类型为 summary.daily.available
、summary.weekly.available
、summary.monthly.available
的时候, data
中的 object
为 App
对象。
App 日/周/月统计对象主要字段定义如下: | |
---|---|
app_id | 应用 ID 。 |
object | 对象类型。 |
app_display_name | 应用名称。 |
created | 创建时间(timestamp)。 |
summary_from | 统计起始时间(timestamp)。 |
summary_to | 统计终止时间(timestamp)。 |
charges_amount | 交易金额(单位:分)。 |
charges_count | 交易量(笔)。 |
当事件类型为 charge.succeeded
、refund.succeeded
、transfer.succeeded
、transfer.failed
、customs.succeeded
、batch_transfer.succeeded
、batch_refund.succeeded
和 red_envelope.sent
、red_envelope.received
的时候,data
中的 object
分别为 charge、refund、batch_refund 、transfer、batch_transfer、和 red_envelope、customs 对象。
事件类型为 summary.daily.available : { "id": "evt_ugB6x3K43D16wXCcqbplWAJo", "created": 1427555016, "livemode": false, "type": "summary.daily.available", "data": { "object": { "app_id": "app_b94eHsO1avrDyL8S", "object": "app_daily_summary", "app_display_name": "App Name", "created": 1425139260, "summary_from": 1425052800, "summary_to": 1425139199, "charges_amount": 1000, "charges_count" : 100 } }, "object": "event", "pending_webhooks": 0, "request": null } 事件类型为 summary.weekly.available : { "id": "evt_la06CoQAiPojSgJKe5gt3nwq", "created": 1427555016, "livemode": false, "type": "summary.weekly.available", "data": { "object": { "app_id": "app_b94eHsO1avrDyL8S", "object": "app_weekly_summary", "app_display_name": "App Name", "created": 1425830460, "summary_from": 1425225600, "summary_to": 1425830399, "charges_amount": 2000, "charges_count" : 200 } }, "object": "event", "pending_webhooks": 0, "request": null } 事件类型为 summary.monthly.available : { "id": "evt_hpyVxo7LNvTqS93kpJgfWAFR", "created": 1427555016, "livemode": false, "type": "summary.monthly.available", "data": { "object": { "app_id": "app_b94eHsO1avrDyL8S", "object": "app_monthly_summary", "app_display_name": "App Name", "created": 1425139260, "summary_from": 1422720000, "summary_to": 1425139199, "charges_amount": 3000, "charges_count" : 300 } }, "object": "event", "pending_webhooks": 0, "request": null } 事件类型为 charge.succeeded : { "id": "evt_ugB6x3K43D16wXCcqbplWAJo", "created": 1427555101, "livemode": true, "type": "charge.succeeded", "data": { "object": { "id": "ch_Xsr7u35O3m1Gw4ed2ODmi4Lw", "object": "charge", "created": 1427555076, "livemode": true, "paid": true, "refunded": false, "reversed": false, "app": "app_1Gqj58ynP0mHeX1q", "channel": "upacp", "order_no": "123456789", "client_ip": "127.0.0.1", "amount": 100, "amount_settle": 100, "currency": "cny", "subject": "Your Subject", "body": "Your Body", "extra": {}, "time_paid": 1427555101, "time_expire": 1427641476, "time_settle": null, "transaction_no": "1224524301201505066067849274", "refunds": { "object": "list", "url": "/v1/charges/ch_L8qn10mLmr1GS8e5OODmHaL4/refunds", "has_more": false, "data": [] }, "amount_refunded": 0, "failure_code": null, "failure_msg": null, "metadata": {}, "credential": {}, "description": null } }, "object": "event", "pending_webhooks": 0, "request": "iar_qH4y1KbTy5eLGm1uHSTS00s" } 事件类型为 charge.failed : { "id": "evt_ugB6x3K43D16wXCcqbplWAJo", "created": 1427555101, "livemode": true, "type": "charge.failed", "data": { "object": { "id": "ch_Xsr7u35O3m1Gw4ed2ODmi4Lw", "object": "charge", "created": 1427555076, "livemode": true, "paid": true, "refunded": false, "reversed": false, "app": "app_1Gqj58ynP0mHeX1q", "channel": "upacp", "order_no": "123456789", "client_ip": "127.0.0.1", "amount": 100, "amount_settle": 100, "currency": "cny", "subject": "Your Subject", "body": "Your Body", "extra": { "agreement": "agr_19Ff7sh5C4J111" } "time_paid": 1427555101, "time_expire": 1427641476, "time_settle": null, "transaction_no": "1224524301201505066067849274", "refunds": { "object": "list", "url": "/v1/charges/ch_L8qn10mLmr1GS8e5OODmHaL4/refunds", "has_more": false, "data": [] }, "amount_refunded": 0, "failure_code": "channel_request_error", "failure_msg": "对支付渠道的请求未能成功。来自 wx_pub 渠道的错误信息:CONTRACT_NOT_EXIST - 签约协议不存在,请检查传入的签约协议是否正确", "metadata": {}, "credential": {}, "description": null } }, "object": "event", "pending_webhooks": 0, "request": "iar_qH4y1KbTy5eLGm1uHSTS00s" } 事件类型为 refund.succeeded : { "id": "evt_gJKelawq06CiPojS5gt3noQA", "created": 1427555348, "livemode": true, "type": "refund.succeeded", "data": { "object": { "id": "re_SG0mnjTD3jAHimbvDKjnXLC9", "object": "refund", "order_no": "SG0mnjTD3jAHimbvDKjnXLC9", "amount": 100, "created": 1427555346, "succeed": true, "status": "succeeded", "time_succeed": 1427555348, "description": "Refund Description", "failure_code": null, "failure_msg": null, "metadata": {}, "charge": "ch_Xsr7u35O3m1Gw4ed2ODmi4Lw", "charge_order_no": "123456789", "transaction_no": "2004450349201512090096425284", "extra": {} } }, "object": "event", "pending_webhooks": 0, "request": "iar_Ca1Oe10OqTSOPOmzX9Hi1a5" } 事件类型为 refund.failed : { "id": "evt_gJKelawq06CiPojS5gt3noQA", "created": 1427555348, "livemode": true, "type": "refund.failed", "data": { "object": { "id": "re_SG0mnjTD3jAHimbvDKjnXLC9", "object": "refund", "order_no": "SG0mnjTD3jAHimbvDKjnXLC9", "amount": 100, "created": 1669617197, "succeed": false, "status": "failed", "time_succeed": null, "description": "Refund Description", "failure_code": "refund_refused_msg", "failure_msg": "退款 wx 已被支付渠道拒绝。来自渠道的信息:基本账户余额不足,请充值后重新发起", "metadata": {}, "charge": "ch_Xsr7u35O3m1Gw4ed2ODmi4Lw", "charge_order_no": "123456789", "transaction_no": "2004450349201512090096425284", "extra": {} } }, "object": "event", "pending_webhooks": 0, "scope": "app_1Gqj58ynP0mHeX1q", "request": "iar_Ca1Oe10OqTSOPOmzX9Hi1a5" } 事件类型为 transfer.succeeded : { "id": "evt_NMO13SJt1jrOaxRMhXC4wj0k", "created": 1435752329, "type": "transfer.succeeded", "livemode": true, "object": "event", "data": { "object": { "id": "tr_fXTq1OHufjHOvbDiPG0qTSiP", "object": "transfer", "type": "b2c", "created": 1435752318, "time_transferred": 1435752318, "livemode": true, "status": "paid", "app": "app_1234567890abcDEF", "channel": "wx_pub", "order_no": "123456789", "amount": 1, "amount_settle": 1, "currency": "cny", "recipient": "Openid", "description": "Your Description", "transaction_no": "1010018301201507010307923793", "extra": { "user_name": "User Name", "force_check": true } } }, "pending_webhooks": 0, "request": "iar_TqvPiDH8SGeHm5GaTKbLuDWL" } 事件类型为 transfer.failed : { "id": "evt_NMO13SJt1jrOaxRMhXC4wjkk", "created": 1435752329, "type": "transfer.failed", "livemode": true, "object": "event", "data": { "object": { "id": "tr_fXTq1OHufjHOvbDiPG0qTSiP", "object": "transfer", "type": "b2c", "created": 1435752318, "time_transferred": 1435752318, "livemode": true, "status": "failed", "app": "app_1234567890abcDEF", "channel": "wx_pub", "order_no": "123456789", "amount": 1, "amount_settle": 1, "currency": "cny", "recipient": "Openid", "description": "Your Description", "transaction_no": "1010018301201507010307923793", "extra": { "user_name": "User Name", "force_check": true } } }, "pending_webhooks": 0, "request": "iar_TqvPiDH8SGeHm5GaTKbLuDkk" } 事件类型为 red_envelope.sent : { "id": "evt_5BpbV0tYK4ySvodDG2RT6XRq", "created": 1436855491, "type": "red_envelope.sent", "livemode": true, "object": "event", "data": { "object": { "id": "red_z1O8iLmXXXX5uPqLiDzLCavP", "object": "red_envelope", "created": 1436855474, "received": null, "refunded": null, "livemode": true, "status": "sent", "app": "app_1234567890abcDEF", "channel": "wx_pub", "order_no": "123456789", "transaction_no": "0010037269201507140154722852", "amount": 100, "amount_settle": 100, "currency": "cny", "recipient": "Openid", "subject": "Your Subject", "body": "Your Body", "description": "Your Description", "extra": { "nick_name": "Nick Name", "send_name": "Send Name" } } }, "pending_webhooks": 0, "request": "iar_zjLGC8zfLOS8WPS0WLi14ynD" } 事件类型为 red_envelope.received : { "id": "evt_hMGV2eR15fMupHUdDYibhLxe", "object": "event", "type": "red_envelope.received", "livemode": true, "created": 1436753800, "data": { "object": { "id": "red_4qLGO84GaXHOWTSO80mLO8i9", "object": "red_envelope", "created": 1436753573, "received": null, "refunded": null, "livemode": true, "status": "received", "app": "app_1234567890abcDEF", "channel": "wx_pub", "order_no": "123456789", "transaction_no": "0010037269201507130153706663", "amount": 100, "amount_settle": 100, "currency": "cny", "recipient": "Openid", "subject": "Your Subject", "body": "Your Body", "description": "Your Description", "extra": { "nick_name": "Nick Name", "send_name": "Send Name" } } }, "pending_webhooks": 0, "request": "iar_jf1iT0fT0a18v1u5qDvb1uDS" } 事件类型为 batch_transfer.succeeded : { "id": "evt_ca16CoQsiP2ja1JKs5gx3j4q", "object": "event", "created": 1475924802, "livemode": false, "data": { "object": { "id": "181610101014367590", "object": "batch_transfer", "app": "app_ribgW1n2SOqcPxn1", "amount": 8000, "batch_no": "2016101010380007", "channel": "alipay", "currency": "cny", "created": 1476067087, "description": "付款说明", "extra": {}, "failure_msg": null, "fee": 200, "livemode": true, "metadata": {}, "recipients": [ { "account": "account01@alipay.com", "amount": 5000, "name": "张三", "transfer": "tr_jHWfvDnTKG0SiPmbfPbHW1eH", "status": "paid" }, { "account": "account02@alipay.com", "amount": 3000, "name": "李四", "transfer": "tr_8u1yPK1eHWv9D08OePzDe1CK", "status": "paid" } ], "status": "succeeded", "time_succeeded": 1476067147, "type": "b2c" } }, "pending_webhooks": 0, "request": "iar_1KeD0GHi58yLfDyHK4HCOyDS", "type": "batch_transfer.succeeded" } 事件类型为 batch_transfer.failed : { "id": "evt_401180105115844002108412", "created": 1519727749, "livemode": true, "type": "batch_transfer.failed", "data": { "object": { "id": "1811802271834191857", "object": "batch_transfer", "app": "app_ribgW1n2SOqcPxn1", "amount": 17000, "batch_no": "593bb35024ef41e78ebca7c0850f3911", "channel": "alipay", "currency": "cny", "created": 1519727649, "description": "pingxx 提现", "extra": {}, "failure_msg": null, "fee": 0, "livemode": true, "metadata": {}, "recipients": [ { "transfer": null, "fee": 0, "failure_msg": "对支付渠道的请求未能成功。来自 alipay 渠道的错误信息:40004 Business Failed PAYEE_NOT_EXIST 收款账号不存在", "order_no": "1519727649111252", "status": "failed", "transaction_no": null, "amount": 17000, "name": "张三", "account": "13788048171" } ], "status": "failed", "time_succeeded": null, "type": "b2c" } }, "object": "event", "request": "iar_rDSKyPWHuv1094enT8Lar141", "pending_webhooks": 0 } 事件类型为 customs.succeeded : { "id": "evt_14201611031154010770", "created": 1478145460, "livemode": true, "type": "customs.succeeded", "data": { "object": { "amount": 999999, "app_id": "app_LibTW1n1xxxxxxxx", "channel": "upacp", "charge_id": "ch_XLGWTCnn5iPCWz0LK4yjfbv1", "created": 1478145241, "customs_code": "GUANGZHOU", "extra": { "certif_id": "41282119910910xxxx", "certif_type": "01", "customer_name": "张小明", "pay_account": "张小明", "tax_amount": "101" }, "id": "14201611031154019772", "is_split": true, "object": "customs", "status": "succeeded", "sub_order_no": "P327932738", "time_succeeded": 1478145460, "trade_no": "37878347380", "transaction_no": "12345678", "transport_amount": 0 } }, "object": "event", "request": "", "pending_webhooks": 0 } 事件类型为 batch_refund.succeeded : { "id": "evt_401170207171021000437700", "created": 1486458621, "livemode": true, "type": "batch_refund.succeeded", "data": { "object": { "app": "app_LibTW1n1SOq9Pin1", "batch_no": "467223445889520", "charges": [ { "charge": "ch_fHyjLKaj5OSOKCSWj01unzzL", "refund": "re_qXPmnTD4ezHSWjLyfP5KWorT", "status": "succeeded", "failure_msg": null, "amount": 1, "description": "Description ch_fHyjLKaj5OSOKCSWj01unzzL" }, { "charge": "ch_HmnDKKDmrb185mbjDOCqbjct", "refund": "re_DGm9S4jPWHKGTyzTaHPCG090", "status": "failed", "failure_msg": null, "amount": 10, "description": "Description ch_HmnDKKDmrb185mbjDOCqbjct" } ], "created": 1486458591, "description": "Batch refund description.", "id": "1511702071709512304", "livemode": true, "metadata": {}, "object": "batch_refund", "refund_url": null, "refunds": { "data": [ { "amount": 5, "charge": "ch_CWDKSKbvHq983TSOO8u00Se5", "charge_order_no": "T170207050849Sh", "created": 1486458594, "description": "Batch refund description.", "failure_code": null, "failure_msg": null, "id": "re_rLWHWHKajPu9urPqvPmnrbrP", "metadata": {}, "object": "refund", "order_no": "rLWHWHKajPu9urPqvPmnrbrP", "status": "succeeded", "succeed": true, "time_succeed": 1486458602, "transaction_no": "2000000001001702070816030296" }, { "amount": 5, "charge": "ch_9ejPy94qj5u9bTej08uzX9GC", "charge_order_no": "T170207050840eA", "created": 1486458595, "description": "Batch refund description.", "failure_code": null, "failure_msg": null, "id": "re_rbTGi11yDKqP0ujnL4mnPinP", "metadata": {}, "object": "refund", "order_no": "rbTGi11yDKqP0ujnL4mnPinP", "status": "succeeded", "succeed": true, "time_succeed": 1486458604, "transaction_no": "2700002001201700370816029893" }, { "amount": 5, "charge": "ch_Pi504CajrLyHLSCOO0DyXnX5", "charge_order_no": "T170207050857df", "created": 1486458596, "description": "Batch refund description.", "failure_code": null, "failure_msg": null, "id": "re_n9SCCCy9WL00inz5WPazX94S", "metadata": {}, "object": "refund", "order_no": "n9SCCCy9WL00inz5WPazX94S", "status": "succeeded", "succeed": true, "time_succeed": 1486458604, "transaction_no": "2000002001201702071815736474" } ], "has_more": false, "object": "list", "url": null }, "status": "succeeded", "time_succeeded": 1486458621 } }, "object": "event", "request": "iar_rDmfnTyb5ab1z61SOO9qPSKS", "pending_webhooks": 0 } 事件类型为 order.succeeded: { "id": "evt_401180104103535002411103", "created": 1515033335, "livemode": true, "type": "order.succeeded", "data": { "object": { "id": "2011801040000059652", "object": "order", "created": 1515033321, "livemode": true, "paid": true, "refunded": false, "status": "paid", "app": "app_r1uDe9rDashboard", "uid": "pingxx@pingxx.com", "available_balance": 199803142, "merchant_order_no": "9b71105752746cc1", "amount": 10, "actual_amount": 10, "amount_refunded": 0, "amount_paid": 10, "coupon_amount": 0, "currency": "cny", "subject": "Your subject", "body": "Your body", "client_ip": "139.224.154.17", "time_paid": 1515033334, "time_expire": 1515036921, "coupon": null, "description": "Your description", "metadata": { "userStr": "下单" }, "charge_essentials": { "channel": "alipay_wap", "transaction_no": "2018010421001004850382758920", "failure_code": null, "failure_msg": null, "extra": { "success_url": "https://api.pingxx.com", "cancel_url": "https://www.pingxx.com/solutionfund", "buyer_user_id": "2088283948576829", "fund_bill_list": [ { "amount": 10, "fundChannel": "ALIPAYACCOUNT" } ], "buyer_account": "pingxx@pingxx.com" }, "credential": {} }, "receipt_app": "app_r1uDe9rDashboard", "service_app": "app_r1uDe9rDashboard", "available_methods": [], "charges": { "object": "list", "url": "/v1/charges", "has_more": false, "data": [ { "id": "ch_C44CWHq98CaHmrnnfT9aHiPP", "object": "charge", "created": 1515033322, "livemode": true, "paid": true, "refunded": false, "reversed": false, "app": "app_r1uDe9rDashboard", "channel": "alipay_wap", "order_no": "9b71105752746cc1", "client_ip": "139.224.154.17", "amount": 10, "amount_settle": 10, "currency": "cny", "subject": "Your subject", "body": "Your body", "extra": { "success_url": "https://api.pingxx.com", "cancel_url": "https://www.pingxx.com/solutionfund", "buyer_user_id": "2088283948576829", "fund_bill_list": [ { "amount": 10, "fundChannel": "ALIPAYACCOUNT" } ], "buyer_account": "pingxx@pingxx.com" }, "time_paid": 1515033334, "time_expire": 1515036921, "time_settle": null, "transaction_no": "2018010421001004850382758920", "refunds": null, "amount_refunded": 0, "failure_code": null, "failure_msg": null, "metadata": { "userStr": "下单" }, "credential": {}, "description": "Your description" } ] } } }, "object": "event", "request": "iar_4CeT88TybLm1jvPeD4WTO0UP", "pending_webhooks": 0 } 事件类型为 order.refunded: { "id": "evt_401171222113755187074803", "created": 1513913873, "livemode": true, "type": "order.refunded", "data": { "object": { "id": "2001708140000017551", "object": "order", "created": 1513913809, "livemode": true, "paid": true, "refunded": true, "status": "refunded", "app": "app_1Gqj58ynP0mHeX1q", "uid": "0", "available_balance": 0, "merchant_order_no": "2017081400000006", "amount": 1, "actual_amount": 1, "amount_refunded": 1, "amount_paid": 1, "coupon_amount": 0, "currency": "cny", "subject": "Your Subject", "body": "Your Body", "client_ip": "192.168.1.1", "time_paid": 1513913854, "time_expire": 1514000209, "coupon": null, "description": null, "metadata": {}, "charge_essentials": { "channel": "alipay_qr", "transaction_no": "201712222100100888", "failure_code": null, "failure_msg": null, "extra": { "buyer_user_id": "2088902388888888", "fund_bill_list": [ { "amount": 1, "fundChannel": "COUPON" } ], "buyer_account": "133****3333" }, "credential": {} }, "receipt_app": "app_1Gqj58ynP0mHeX1q", "service_app": "app_1Gqj58ynP0mHeX1q", "available_methods": [], "charges": { "object": "list", "url": "/v1/charges", "has_more": false, "data": [ { "id": "ch_1Kyn50DyjXbHbvnv5SGK4qDK", "object": "charge", "created": 1513913827, "livemode": true, "paid": true, "refunded": true, "reversed": false, "app": "app_1Gqj58ynP0mHeX1q", "channel": "alipay_qr", "order_no": "2017081400000006", "client_ip": "192.168.1.1", "amount": 1, "amount_settle": 1, "currency": "cny", "subject": "Your Subject", "body": "Your Body", "extra": { "buyer_user_id": "2088902388888888", "fund_bill_list": [ { "amount": 1, "fundChannel": "COUPON" } ], "buyer_account": "133****3333" }, "time_paid": 1513913854, "time_expire": 1514000209, "time_settle": null, "transaction_no": "201712222100100888", "refunds": null, "amount_refunded": 0, "failure_code": null, "failure_msg": null, "metadata": {}, "credential": {}, "description": null } ] } } }, "object": "event", "request": "iar_C8KOu5HOmD8CbzbXrPqv1y9S", "pending_webhooks": 0 } 事件类型为 balance.withdrawal.succeeded: { "id": "evt_LOGV2e895fMupHUdDJRJLYU00", "object": "event", "type": "balance.withdrawal.succeeded", "livemode": true, "created": 1472649887, "data": { "object": { "id": "310216083121080700006701", "object": "withdrawal", "app": "app_LibTW1n1SOq9Pin1", "amount": 20000, "asset_transaction": "", "balance_transaction": "", "created": 1472648887, "description": "test232description", "extra": { "account": "6225210207073918", "name": "姓名", "open_bank_code": "0102", "prov": "上海", "city": "上海" }, "fee": 200, "livemode": true, "metadata":{}, "source": null, "status": "succeeded", "time_canceled": null, "time_succeeded": 1472649887, "user_fee": 50 } }, "pending_webhooks": 0, "request": "iar_op4iT0fT0a18v1u5qDvb1uP0" } 事件类型为 balance.withdrawal.failed: { "id": "evt_400171904244335723330503", "created": 1504507460, "livemode": true, "type": "balance.withdrawal.failed", "data": { "object": { "id": "1711709041444240785", "object": "withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "amount": 1000, "asset_transaction": null, "balance_transaction": "601170904500051873400001", "channel": "wx_pub", "created": 1504507460, "description": "账户提现", "extra": { "open_id": "oYzqS4Wr5OKm9SyPWDOeb5qnzHC8" }, "failure_msg": "对渠道的请求未能成功。来自渠道的错误信息:SEND_FAILED|发送失败,请更换单号重试", "fee": 0, "livemode": true, "metadata": {}, "operation_url": null, "order_no": "3Gz64j6XYbH3ZNgEWYNL", "source": null, "status": "failed", "time_canceled": null, "time_succeeded": null, "user": "user_007", "user_fee": 0, "settle_account": null } }, "object": "event", "pending_webhooks": 0, "request": "iar_GSqTeP0404KSmPmfT8in5SO4" } 事件类型为 batch_withdrawal.succeeded: { "id": "evt_400171908233490343433257", "created": 1504507460, "livemode": true, "type": "batch_withdrawal.succeeded", "data": { "object": { "id": "1911709051015122025", "object": "batch_withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "created": 1478833871, "livemode": true, "amount": 80000, "amount_succeeded": 80000, "amount_failed": 0, "amount_canceled": 0, "count": 3, "count_succeeded": 3, "count_failed": 0, "count_canceled": 0, "fee": 600, "metadata": {}, "operation_url": null, "status": "succeeded", "source": "1811709051435464631", "time_finished": 1504507460, "user_fee": 0, "withdrawals": { "object": "list", "url": null, "has_more": false, "data": [ { "id": "1711711150302360654", "object": "withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "amount": 20000, "asset_transaction": null, "balance_transaction": "601170904500052575400001", "channel": "alipay", "created": 1504507360, "description": "提现", "extra": { "account": "username@gmail.com", "name": "姓名" }, "failure_msg": null, "fee": 200, "livemode": true, "metadata": {}, "operation_url": null, "order_no": "hpZTzweXQAA1emNES2vB", "source": "tr_TGS4GKTGGWb5KaHSW1fXjfzT", "status": "succeeded", "time_canceled": null, "time_succeeded": 1504507460, "user": "user_001", "user_fee": 0, "settle_account": null }, { ... }, { ... } ] } } }, "object": "event", "pending_webhooks": 0, "request": "iar_zvXDaT4mTWT4X50ej9K8KWz1" } 事件类型为 batch_withdrawal.failed: { "id": "evt_400171908233490343433258", "created": 1504507460, "livemode": true, "type": "batch_withdrawal.failed", "data": { "object": { "id": "1911709051015122025", "object": "batch_withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "created": 1478833871, "livemode": true, "amount": 80000, "amount_succeeded": 0, "amount_failed": 80000, "amount_canceled": 0, "count": 3, "count_succeeded": 0, "count_failed": 3, "count_canceled": 0, "fee": 0, "metadata": {}, "operation_url": null, "status": "failed", "source": "1811709051435464631", "time_finished": 1504507460, "user_fee": 0, "withdrawals": { "object": "list", "url": null, "has_more": false, "data": [ { "id": "1711711150302360654", "object": "withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "amount": 20000, "asset_transaction": null, "balance_transaction": "601170904500052575400001", "channel": "alipay", "created": 1504507360, "description": "提现", "extra": { "account": "username@gmail.com", "name": "姓名" }, "failure_msg": "对渠道的请求未能成功。来自渠道的错误信息:SEND_FAILED|发送失败,请更换单号重试", "fee": 200, "livemode": true, "metadata": {}, "operation_url": null, "order_no": "hpZTzweXQAA1emNES2vB", "source": null, "status": "failed", "time_canceled": null, "time_succeeded": null, "user": "user_001", "user_fee": 0, "settle_account": null }, { ... }, { ... } ] } } }, "object": "event", "pending_webhooks": 0, "request": "iar_zbrbnHzz1eP4Pyr10O584eD4" } 事件类型为 batch_withdrawal.partially_succeeded: { "id": "evt_400171908233490343433357", "created": 1504507460, "livemode": true, "type": "batch_withdrawal.partially_succeeded", "data": { "object": { "id": "1911709051015122025", "object": "batch_withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "created": 1478833871, "livemode": true, "amount": 80000, "amount_succeeded": 60000, "amount_failed": 20000, "amount_canceled": 0, "count": 3, "count_succeeded": 2, "count_failed": 1, "count_canceled": 0, "fee": 600, "metadata": {}, "operation_url": null, "status": "partially_succeeded", "source": "1811709051435464631", "time_finished": 1504507460, "user_fee": 0, "withdrawals": { "object": "list", "url": null, "has_more": false, "data": [ { "id": "1711711150302360654", "object": "withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "amount": 20000, "asset_transaction": null, "balance_transaction": "601170904500052575400001", "channel": "alipay", "created": 1504507360, "description": "提现", "extra": { "account": "username@gmail.com", "name": "姓名" }, "failure_msg": null, "fee": 200, "livemode": true, "metadata": {}, "operation_url": null, "order_no": "hpZTzweXQAA1emNES2vB", "source": "tr_SeDmnHHmDG4KivzDK44aXTW1", "status": "succeeded", "time_canceled": null, "time_succeeded": 1504507460, "user": "user_001", "user_fee": 0, "settle_account": null }, { ... }, { ... } ] } } }, "object": "event", "pending_webhooks": 0, "request": "iar_rvrHqHS4u9WLrPaDGKXzfbbL" } 事件类型为 batch_withdrawal.canceled: { "id": "evt_400171908233490343433259", "created": 1504507460, "livemode": true, "type": "batch_withdrawal.canceled", "data": { "object": { "id": "1911709051015122025", "object": "batch_withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "created": 1478833871, "livemode": true, "amount": 80000, "amount_succeeded": 0, "amount_failed": 0, "amount_canceled": 80000, "count": 3, "count_succeeded": 0, "count_failed": 0, "count_canceled": 3, "fee": 0, "metadata": {}, "operation_url": null, "status": "canceled", "source": null, "time_finished": 1504507460, "user_fee": 0, "withdrawals": { "object": "list", "url": null, "has_more": false, "data": [ { "id": "1711711150302360654", "object": "withdrawal", "app": "app_1Gqj58ynP0mHeX1q", "amount": 20000, "asset_transaction": null, "balance_transaction": "601170904500052575400001", "channel": "alipay", "created": 1504507360, "description": "提现", "extra": { "account": "username@gmail.com", "name": "姓名" }, "failure_msg": null, "fee": 200, "livemode": true, "metadata": {}, "operation_url": null, "order_no": "hpZTzweXQAA1emNES2vB", "source": null, "status": "succeeded", "time_canceled": 1504507460, "time_succeeded": null, "user": "user_001", "user_fee": 0, "settle_account": null }, { ... }, { ... } ] } } }, "object": "event", "pending_webhooks": 0, "request": "iar_rDujP4ePSinHXbDqXH5KSO0O" } 事件类型为 royalty_settlement.succeeded: { "id": "evt_lqVSy5gbL0A68pS8YKvJzdWA", "created": 1430915345, "livemode": true, "object": "event", "data": { "object": { "id": "170302171104000011", "object": "royalty_settlement", "payer_app": "app_1Gqj58ynP0mHeX1q", "amount": 1, "amount_canceled": 0, "amount_failed": 0, "amount_succeeded": 1, "count": 1, "count_canceled": 0, "count_failed": 0, "count_succeeded": 1, "created": 1488445864, "fee": 0, "livemode": true, "metadata": {}, "method": "unionpay", "operation_url": null, "royalty_transactions": { "object": "list", "page_number": 1, "total_page": 1, "url": "/v1/royalty_transactions", "data": [ { "id": "170302171104000011", "object": "royalty_transaction", "amount": 1, "created": 1430915345, "status": "succeeded", "settle_account": "320217022818142300000901", "source_user": "user_002", "recipient_app": null, "royalty_settlement": "170302171104000011" } ] }, "status": "succeeded", "time_finished": null } }, "pending_webhooks": 0, "type": "royalty_settlement.succeeded", "request": "iar_0K8m90CCeDK8PabXD00yfTq" } 事件类型为 royalty_settlement.failed: { "id": "evt_lqVSy5gbL0A68pS8YKvJzdWA", "created": 1430915345, "livemode": true, "object": "event", "data": { "object": { "id": "170302171104000011", "object": "royalty_settlement", "payer_app": "app_1Gqj58ynP0mHeX1q", "amount": 1, "amount_canceled": 0, "amount_failed": 1, "amount_succeeded": 0, "count": 1, "count_canceled": 0, "count_failed": 1, "count_succeeded": 0, "created": 1488445864, "fee": 0, "livemode": true, "metadata": {}, "method": "unionpay", "operation_url": null, "royalty_transactions": { "object": "list", "page_number": 1, "total_page": 1, "url": "/v1/royalty_transactions", "data": [ { "id": "170302171104000011", "object": "royalty_transaction", "amount": 1, "created": 1430915345, "status": "failed", "settle_account": "320217022818142300000901", "source_user": "user_002", "recipient_app": null, "royalty_settlement": "170302171104000011" } ] }, "status": "failed", "time_finished": null } }, "pending_webhooks": 0, "type": "royalty_settlement.failed", "request": "iar_0K8m90CCeDK8PabXD00yfTq" } 事件类型为 royalty_settlement.partially_succeeded: { "id": "evt_401170321172440000291102", "created": 1490088123, "livemode": true, "type": "royalty_settlement.partially_succeeded", "data": { "object": { "id": "431170321171500001", "object": "royalty_settlement", "payer_app": "app_LibTW1n1SOq9Pin1", "created": 1490087747, "livemode": true, "method": "alipay", "amount": 4, "amount_succeeded": 1, "amount_failed": 3, "amount_canceled": 0, "count": 2, "count_succeeded": 1, "count_failed": 1, "count_canceled": 0, "time_finished": 1490088123, "fee": 100, "metadata": { "userStr": "KTs/YDg3ZFUFONZUC10SuA==" }, "description": null, "operation_url": null, "status": "partially_succeeded", "royalty_transactions": { "object": "list", "url": "/v1/royalty_transactions", "data": [ { "id": "441170321171500001", "object": "royalty_transaction", "amount": 3, "status": "failed", "settle_account": "333333032117170500001234", "source_user": "uid@pinpula.com", "recipient_app": null, "royalty_settlement": "431170321171500001", "created": 1490087905 }, { "id": "441170321171500002", "object": "royalty_transaction", "amount": 1, "status": "succeeded", "settle_account": "333333032117170500001234", "source_user": "uid@pinpula.com", "recipient_app": null, "royalty_settlement": "431170321171500001", "created": 1490087905 } ], "has_more": false } } }, "object": "event", "request": "iar_uPynnTSmDiT4rPqn9CP8OKCS", "pending_webhooks": 0 } 事件类型为 royalty_settlement.canceled: { "id": "evt_lqVSy5gbL0A68pS8YKvJzdWZ", "created": 1430915345, "livemode": true, "object": "event", "data": { "object": { "id": "170302171104000011", "object": "royalty_settlement", "payer_app": "app_1Gqj58ynP0mHeX1q", "amount": 1, "amount_canceled": 1, "amount_failed": 0, "amount_succeeded": 0, "count": 1, "count_canceled": 1, "count_failed": 0, "count_succeeded": 0, "created": 1488445864, "fee": 0, "livemode": true, "metadata": {}, "method": "unionpay", "operation_url": null, "royalty_transactions": { "object": "list", "page_number": 1, "total_page": 1, "url": "/v1/royalty_transactions", "data": [ { "id": "170302171104000011", "object": "royalty_transaction", "amount": 1, "created": 1430915345, "status": "canceled", "settle_account": "320217022818142300000901", "source_user": "user_002", "recipient_app": null, "royalty_settlement": "170302171104000011" } ] }, "status": "canceled", "time_finished": null } }, "pending_webhooks": 0, "type": "royalty_settlement.canceled", "request": "iar_0K8m90CCeDK8PabXD00yfTq" } 事件类型为 recharge.succeeded: { "id": "evt_400171904343603445333057", "created": 1504507460, "livemode": true, "type": "recharge.succeeded", "data": { "object": { "id": "221170903625155317880001", "object": "recharge", "app": "app_1Gqj58ynP0mHeX1q", "created": 1504408953, "livemode": true, "amount": 4950, "succeeded": true, "time_succeeded": 1504408993, "refunded": false, "user": "user_007", "from": "user_007", "user_fee": 50, "charge": { "id": "ch_XfbnHGLGi5i9Su9qXLu90488", "object": "charge", "created": 1504408953, "livemode": false, "paid": true, "refunded": true, "reversed": false, "app": "app_1Gqj58ynP0mHeX1q", "channel": "upacp", "order_no": "201709031102300167", "client_ip": "127.0.0.1", "amount": 5000, "amount_settle": 4970, "currency": "cny", "subject": "Your Subject", "body": "Your Body", "extra": {}, "time_paid": 1504408993, "time_expire": 1504409953, "time_settle": null, "transaction_no": "201709031102300167211", "refunds": { "object": "list", "url": "/v1/charges/ch_XfbnHGLGi5i9Su9qXLu90488/refunds", "has_more": false, "data": [] }, "amount_refunded": 0, "failure_code": null, "failure_msg": null, "metadata": {}, "credential": {}, "description": "Your Description" }, "balance_bonus": null, "balance_transaction": "601170903591811719520000", "description": "Your Description", "metadata": {} } }, "object": "event", "pending_webhooks": 0, "request": "iar_Hm5SyPH8GGmPT80mfL4CWvj9" } 事件类型为 recharge.refund.succeeded: { "id": "evt_400171904345603445333057", "created": 1504507460, "livemode": true, "type": "recharge.refund.succeeded", "data": { "object": { "id": "221170903625155317880001", "object": "recharge", "app": "app_1Gqj58ynP0mHeX1q", "created": 1504408953, "livemode": true, "amount": 4950, "succeeded": true, "time_succeeded": 1504408993, "refunded": true, "user": "user_007", "from": "user_007", "user_fee": 50, "charge": { "id": "ch_XfbnHGLGi5i9Su9qXLu90488", "object": "charge", "created": 1504408953, "livemode": true, "paid": true, "refunded": true, "reversed": false, "app": "app_1Gqj58ynP0mHeX1q", "channel": "upacp", "order_no": "201709031102300167", "client_ip": "127.0.0.1", "amount": 5000, "amount_settle": 4970, "currency": "cny", "subject": "Your Subject", "body": "Your Body", "extra": {}, "time_paid": 1504408993, "time_expire": 1504409953, "time_settle": null, "transaction_no": "201709031102300167211", "refunds": { "object": "list", "url": "/v1/charges/ch_XfbnHGLGi5i9Su9qXLu90488/refunds", "has_more": false, "data": [ { "id": "re_rHuXb9nD0qvHG4ifnHHmzvX1", "object": "refund", "order_no": "rHuXb9nD0qvHG4ifnHHmzvX1", "amount": 5000, "created": 1504410993, "succeed": true, "status": "succeeded", "time_succeed": 1504410993, "description": "充值退款", "failure_code": null, "failure_msg": null, "metadata": {}, "charge": "ch_XfbnHGLGi5i9Su9qXLu90488", "charge_order_no": "201709031102300167", "transaction_no": "2017090421001004670247373863", "extra": {} } ] }, "amount_refunded": 5000, "failure_code": null, "failure_msg": null, "metadata": {}, "credential": {}, "description": "Your Description" }, "balance_bonus": null, "balance_transaction": "601170903591811719520000", "description": "Your Description", "metadata": {} } }, "object": "event", "pending_webhooks": 0, "request": "iar_zHq9GCaTGGSOOGePOKjfnjPO" }