API Reference

推送数据格式

webhook对外推送数据格式,白标自研服务可按照感兴趣的消息类型,进行后续业务处理。

1.数据安全,RAS加密及签名请参考 签名
公钥:与请求ClientApi、ManagerApi保持一致。

passTo会对推送数据,使用私钥对以下参数进行RSA加密及签名,白标自研服务接收到数据,需要使用公钥进行逆向
处理。

"msgType":"sms",
"pushTime": 1707294834627,
"uniqueCode":"xxxxx-xxxx-xxxx",
"trace": "xxxxxxxxx-xxxxxxxxx-xxxxxxx"
2.短信、邮件推送格式
参数类型是否必填项描述
msgTypeString必填消息类型(sms,email)
pushTimeLong必填消息推送时间,13位时间戳
traceString必填全局链路唯一标志,便于后续定位问题
uniqueCodeString必填每条推送消息唯一标志,重发保持不变
detailMap必填消息内容
» bizTypeString必填消息模板业务类型
» toUserString必填收信账号
» titleString非必填消息标题,只有邮件存在
» contentString必填推送内容
» timestampLong必填消息发送时间,13位时间戳
» extMap非必填模板动态参数
» languageString必填消息语言
{
  "msgType":"sms",
  "pushTime": 1707294834627,
  "uniqueCode":"xxxxx-xxxx-xxxx",
  "trace": "xxxxxxxxx-xxxxxxxxx-xxxxxxx"  ,
  "detail":{
    "bizType":"APPLICATION_CARD_SUCCESS",
    "toUser": "+85212345678",
    "title": "",
    "content": "通知正文内容",
    "timestamp": 1707294825818,
    "ext":{    },
    "language": "zh-CN"
  }
}

3.交易通知推送格式
参数类型是否必填项描述
msgTypeString必填消息类型(trade)
pushTimeLong必填消息推送时间,13位时间戳
traceString必填全局链路唯一标志,便于后续定位问题
uniqueCodeString必填每条推送消息唯一标志,重发保持不变
detailMap必填消息内容
» customerNoString必填客户编号
» idLong必填记录id
» cardIdString非必填卡id
» last4String非必填卡后4位
» createdAtLong必填交易发起时间,13位时间戳
» postedAtLong非必填入账时间,13位时间戳
» accountIdLong必填账户id
» statusinteger必填状态1-待定;2-已发布;3-已拒绝;4-无效;
» amountString必填sourceAmount汇率后的金额,且含手续费
» typeinteger必填交易类型。1-客户消费;2-消费退款;8-其他;9-开卡费;11-抵押; 12-充卡费;13-额度调整;16-行政费用;18-划转-抵押;40-额度调整-其他-顶层;41-额度调整-其他-白标;42-额度调整-充卡费,43-额度调整-抵押,44-额度调整-赎回-顶层;45-额度调整-赎回-白标
» currencyString必填币种
» operateTypeInteger必填交易操作类型。1-入账2-出账
» grossAmountString非必填sourceAmount汇率后的金额,不含手续费
» sourceAmountString非必填原始商品交易金额
» sourceCurrencyString非必填原始交易币种
» countryString非必填国家编码,HK为本地、其他非空都是海外
» activeTypeString非必填ATM=ATM取款,PURCHASE=交易
» merchantNameString非必填商户名称
» merchantMccString非必填商户MCC编码
» merchantCategoryString非必填商户归属类型
» remarkString非必填备注
» companyIdLong必填公司id
» unitIdLong必填机构id
» createTimeLong必填创建时间,13位时间戳
» updateTimeLong非必填更新时间,13位时间戳
{
  "msgType": "trade",
  "pushTime": 1707294834627,
  "uniqueCode":"xxxxx-xxxx-xxxx",
  "trace": "xxxxxxxxx-xxxxxxxxx-xxxxxxx"  ,
  "detail":{
    "customerNo": "86000001",
    "cardId": 93,
    "last4": "3964",
    "accountId": 78,
    "createdAt": 1707294825818,
    "status": 1,
    "postedAt": 1707294893121,
    "type": 1,
    "merchantName": "test_b1d7d0ac5f55",
    "merchantMcc": "test_2e67dca0f06d",
    "merchantCategory": "test_9435333c96db",
    "currency": "HKD",
    "amount": "47.93",
    "remark": "",
    "operateType": 1,
    "country": "HK",
    "sourceAmount": "47.93",
    "sourceCurrency": "HKD",
    "activeType": "PURCHASE",
    "grossAmount": "47.93",
    "id": 1,
    "companyId": 20,
    "unitId": 20,
    "createTime": 1707294825818,
    "updateTime": 1707294893121
  }
}
English
Powered by Localize
中文(简体)