curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/card/active \
--header 'Content-Type: application/json' \
--header 'Api-Key: your_api_key' \
--header 'Timestamp: 1716307200000' \
--header 'Access-Token: your_access_token' \
--data '{
"cardholder_no": "U202605220001",
"card_no": "C202605220001",
"cvv": "Base64EncodedEncryptedCvv...",
"card_last_no": "1234"
}'
{
"code": 0,
"msg": "Success",
"data": {"result": true}
}
卡相关
实体卡激活
POST
/
open-api
/
v1
/
card
/
active
curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/card/active \
--header 'Content-Type: application/json' \
--header 'Api-Key: your_api_key' \
--header 'Timestamp: 1716307200000' \
--header 'Access-Token: your_access_token' \
--data '{
"cardholder_no": "U202605220001",
"card_no": "C202605220001",
"cvv": "Base64EncodedEncryptedCvv...",
"card_last_no": "1234"
}'
{
"code": 0,
"msg": "Success",
"data": {"result": true}
}
实体卡激活。卡状态须为
ToActivate,激活成功后变为 Activated。cvv 须使用 AES/ECB/PKCS5Padding + Base64 加密后传入,禁止在请求体中传输明文 CVV。
- 明文 CVV 须为 3 位纯数字
card_last_no须与平台记录的卡号后四位一致cardholder_no须与该卡的归属持卡人一致- 加密算法详见「代码工具类」章节
请求头
string
必填
apiKey(商户凭证,与 IP 白名单绑定)
string
必填
Unix 时间戳(毫秒),与服务端偏差须在 60 秒内,且不接受未来时间戳
string
必填
登录标识(除获取 Token 外必填)
string
默认值:"application/json"
固定为
application/json请求体
string
必填
持卡人单号
string
必填
卡单号
string
必填
加密后的 CVV(Base64 密文)
string
必填
卡号后四位
返回参数
number
响应状态码,
0 表示成功string
响应消息
curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/card/active \
--header 'Content-Type: application/json' \
--header 'Api-Key: your_api_key' \
--header 'Timestamp: 1716307200000' \
--header 'Access-Token: your_access_token' \
--data '{
"cardholder_no": "U202605220001",
"card_no": "C202605220001",
"cvv": "Base64EncodedEncryptedCvv...",
"card_last_no": "1234"
}'
{
"code": 0,
"msg": "Success",
"data": {"result": true}
}
