虚拟卡消费webhook

简要描述

卡交易webhook 配置及使用:

  • 请联系工作人员后台配置您的Webhook Endpoint Url, Url 必须是HTTPS
  • 当出现卡产生消费/退款/拒付等交易时,将推送对应交易消息到您的Webhook Endpoint Url
  • 收到Webhook 消息后,如果返回HTTP CODE 200, 表示您已成功接收到webhook消息
  • 通知频率为10分钟一次,一个小时后,1小时一次,总共24小时

返回参数说明

参数名类型说明
emailstring邮箱
transactionIdstring交易id, 同一笔交易id 唯一
cardIdstring虚拟卡id
cardNumberstring卡号
cardSeqNostring卡序列号
despstring交易描述信息
reasonstring拒付原因
preAuthAmountstring预授权金额(可能与最终交易金额不一样)
preAuthCurrencystring预授权币种,USD
preAuthTimestring预授权时间
transactionAmountstring成交金额
transactionCurrencystring成交币种,USD
transactionTimestring成交时间
statusstring交易状态:
PENDING :交易授权PENDING
EXPIRED:授权过期
REVERSED:授权退回(例如绑卡预扣退回)
DECLINED:拒付
COMPLETE:交易完成
REFUND :交易退款
FEE: transaction fee
MONTHLY_FEE: monthly fee(Only for monthly fee cards)
gmtCreatestring记录创建时间
gmtModifiedstring记录更新时间

返回示例

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"  
}

备注

更多返回错误代码请看首页的错误代码描述