虚拟卡消费webhook
简要描述
卡交易webhook 配置及使用:
- 请联系工作人员后台配置您的Webhook Endpoint Url, Url 必须是HTTPS
- 当出现卡产生消费/退款/拒付等交易时,将推送对应交易消息到您的Webhook Endpoint Url
- 收到Webhook 消息后,如果返回HTTP CODE 200, 表示您已成功接收到webhook消息
- 通知频率为10分钟一次,一个小时后,1小时一次,总共24小时
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
string | 邮箱 | |
transactionId | string | 交易id, 同一笔交易id 唯一 |
cardId | string | 虚拟卡id |
cardNumber | string | 卡号 |
cardSeqNo | string | 卡序列号 |
desp | string | 交易描述信息 |
reason | string | 拒付原因 |
preAuthAmount | string | 预授权金额(可能与最终交易金额不一样) |
preAuthCurrency | string | 预授权币种,USD |
preAuthTime | string | 预授权时间 |
transactionAmount | string | 成交金额 |
transactionCurrency | string | 成交币种,USD |
transactionTime | string | 成交时间 |
status | string | 交易状态: PENDING :交易授权PENDING EXPIRED:授权过期 REVERSED:授权退回(例如绑卡预扣退回) DECLINED:拒付 COMPLETE:交易完成 REFUND :交易退款 FEE: transaction fee MONTHLY_FEE: monthly fee(Only for monthly fee cards) |
gmtCreate | string | 记录创建时间 |
gmtModified | string | 记录更新时间 |
返回示例
PENDING 示例
{
"email":"[[email protected]](mailto:[email protected])",
"transactionId":"t_xxxxxxxxxxxxx",
"cardId":"c_xxxxxxxxxxx",
"cardNumber":"556735XXXXXX0737",
"cardSeqNo":"CXXXXXXX",
"desp":"FACEBK UYFYREF3S2 fb.me/ads IRL",
"reason":null,
"preAuthAmount": -1992,
"preAuthCurrency":"USD",
"preAuthTime":"2023-12-04 18:20:10",
"transactionAmount":null,
"transactionCurrency":null,
"transactionTime":null,
"status":"PENDING",
"gmtCreate":"2023-10-16 19:03:43",
"gmtModified":"2023-10-16 19:03:43"
}
}
EXPIRED 示例
{
"email":"[[email protected]](mailto:[email protected])",
"transactionId":"t_xxxxxxxxxxxxx",
"cardId":"c_xxxxxxxxxxx",
"cardNumber":"556735XXXXXX0737",
"cardSeqNo":"CXXXXXXX",
"desp":"FACEBK UYFYREF3S2 fb.me/ads IRL",
"reason":null,
"preAuthAmount": -1992,
"preAuthCurrency":"USD",
"preAuthTime":"2023-12-04 18:20:10",
"transactionAmount":null,
"transactionCurrency":null,
"transactionTime":null,
"status":"EXPIRED",
"gmtCreate":"2023-10-16 19:03:43",
"gmtModified":"2023-10-16 19:03:43"
}
REVERSED 示例
{
"email":"[[email protected]](mailto:[email protected])",
"transactionId":"t_xxxxxxxxxxxxx",
"cardId":"c_xxxxxxxxxxx",
"cardNumber":"556735XXXXXX0737",
"cardSeqNo":"CXXXXXXX",
"desp":"FACEBK UYFYREF3S2 fb.me/ads IRL",
"reason":null,
"preAuthAmount": -1992,
"preAuthCurrency":"USD",
"preAuthTime":"2023-12-04 18:20:10",
"transactionAmount":null,
"transactionCurrency":null,
"transactionTime":null,
"status":"REVERSED",
"gmtCreate":"2023-10-16 19:03:43",
"gmtModified":"2023-10-16 19:03:43"
}
COMPLETE 示例
{
"email":"[[email protected]](mailto:[email protected])",
"transactionId":"t_xxxxxxxxxxxxx",
"cardId":"c_xxxxxxxxxxx",
"cardNumber":"556735XXXXXX0737",
"cardSeqNo":"CXXXXXXX",
"desp":"FACEBK UYFYREF3S2 fb.me/ads IRL",
"reason":"balance not enough",
"preAuthAmount": -1992,
"preAuthCurrency":"USD",
"preAuthTime":"2023-12-04 18:20:10",
"transactionAmount":-1992,
"transactionCurrency":"USD",
"transactionTime":166662674000,
"status":"COMPLETE",
"gmtCreate":"2023-10-16 19:03:43",
"gmtModified":"2023-10-16 19:03:43"
}
REFUND 示例
{
"email":"[[email protected]](mailto:[email protected])",
"transactionId":"t_xxxxxxxxxxxxx",
"cardId":"c_xxxxxxxxxxx",
"cardNumber":"556735XXXXXX0737",
"cardSeqNo":"CXXXXXXX",
"desp":"FACEBK UYFYREF3S2 fb.me/ads IRL",
"reason":"balance not enough",
"preAuthAmount": null,
"preAuthCurrency":null,
"preAuthTime":null,
"transactionAmount": 1992,
"transactionCurrency":"USD",
"transactionTime": "2023-12-04 18:20:10",
"status":"REFUND",
"gmtCreate":"2023-10-16 19:03:43",
"gmtModified":"2023-10-16 19:03:43"
}
备注
更多返回错误代码请看首页的错误代码描述
Updated 4 months ago