2.1.49 获取sdk需要的token信息

接口地址:/openapi/card/sdk/access/token

请求方式:POST

请求数据类型:application/json

响应数据类型:application/json

接口描述:

只有部分卡片需要使用此接口,使用此接口时需要您自己有app,然后在app中对接我们提供的sdk。
对接sdk后需要的token信息,用这个接口获取。在sdk中可以查询pin码、查询卡片详情、授权3ds交易等操作。
app对接sdk的文档请联系管理员获取。

使用SDK流程

注意⚠️:在接口的请求和返回报文后续可能会增加更多字段;因此在使用此接口时需要忽略不识别的新字段,防止报错

请求示例:

{
    "card_id": "1089744560000011928",
    "token_type":"SDK_CARD_ACCESS_TOKEN",
    "single_use":false
}

请求参数:

参数名称 数据类型 是否必须 参数说明
card_id string true 卡片ID
token_type string true token的类型,取值范围:SDK_CARD_ACCESS_TOKEN(sdk权限token,目前只传此值即可)
single_use boolean false 是否是使用时获取;使用sdk时传true,初始化sdk时传false

响应参数:

参数名称 类型 参数说明
code string 错误码
data Object 响应数据
  card_id string 此card_id不等于传入的card_id,而是使用sdk时的cardId
  app_card_id string APP Card ID,使用sdk时的appCardId
  app_cardholder_id string APP Cardholder ID,使用sdk时的appCardholderId
  token string Token,使用sdk时的token
  expires_in_seconds integer 过期时间,单位:秒
msg string 错误信息

响应示例:

{
  "code": "00000",
  "msg": "ok",
  "data": {
    "card_id": "CA1651791760457761",
    "app_card_id": "crd_xemr6hppo64u3erbvs2gmq7o7u",
    "app_cardholder_id": "crh_kmvkhwdbdtoujbuzw26vtailom",
    "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FjY2Vzcy5zYW5kYm94LmNoZWNrb3V0LmNvbSIsIm5iZiI6MTczNDQxNDM3MiwiaWF0IjoiMTczNDQxNDM3MiIsImV4cCI6MTczNDQyODc3MiwiYXVkIjpbImFjY291bnRzIiwiYmFsYW5jZXMiLCJkaXNwdXRlcyIsImZpbGVzIiwiZmluYW5jaWFsLWFjdGlvbnMiLCJmbG93IiwiZm9yd2FyZCIsImZ4Iiwi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Nc-HC_tHiuMzOJoC6zBW9VooTjGV0u3Zng9dnLZSlBDT4AkJ-B12NVtQF3IB2BekS3lVTZV_7Ed1uLCY6X-rtGulMajnsc885nFy8oj5Kjhi3hXYcOUaM_ITX3v7tzfVahKtS4-92Zz8iU7sAJPzddVF-iskOwBytLYq9tUT9Ijx5vnalFiE2EgE8cn5K1iSo9CN_Y_VFHyxNpfO7Y9N83Fl2LwjnBCA1stVgWoGltTAmSE-jVzUFM9ENfK3cjU3Fa-VCEb5-Jn-kI1-Ua80bCE_VJLS8GffUDCwkEYoITLddMOXcphpu83QP0lMPKFPnzuzTb9-oZ5uAeaqFYJCVsDECDAPXBsm93XZB4vunMu-Jr9G6p7RRbBr6mGrwpLq-jGOXVGf2-Hl4SChPqlQQfIZSWBcPJOhNQS7ysYu97pQXCaHdFGP9QMST_tSF4H3PErBmWtKmi2xLloa_kUhdIejJ9TuLA42H-FEyGb5UMm6hJix2G6WrQrqpA6z_GaOiVf0oTIoG72-48osKzEwtzn8DsFAaTVSKyCIiUcMVDuLvtqINbiY97_EeuWQBiOTrVL1YS_QNi2fohc_I7cSXvZ4bd4apij81o-ThEmwRkSLB0QfTtRtkY5EmCEfZBq8",
    "expires_in_seconds": 14400
  }
}
Copyright © HyperCard 2023 all right reserved,powered by GitbookUpdate Time: 2025-01-14 15:38:46

results matching ""

    No results matching ""