curl --location --request PUT 'https://kf.pikabao.cc/agent/v1/cards/suspend?appid=user123&cardId=111222333×tamp=1640995200000&sign=ABC123...'
const params = {
appid: "user123",
cardId: "111222333",
timestamp: Date.now().toString(),
};
const sign = generateSign(params, secretKey);
const response = await fetch(
`https://kf.pikabao.cc/agent/v1/cards/suspend?${new URLSearchParams({...params, sign})}`,
{ method: "PUT" }
);
const result = await response.json();
{
"code": 0,
"msg": "成功"
}
卡片管理
信用卡冻结
冻结虚拟信用卡,冻结后无法进行交易
PUT
/
agent
/
v1
/
cards
/
suspend
curl --location --request PUT 'https://kf.pikabao.cc/agent/v1/cards/suspend?appid=user123&cardId=111222333×tamp=1640995200000&sign=ABC123...'
const params = {
appid: "user123",
cardId: "111222333",
timestamp: Date.now().toString(),
};
const sign = generateSign(params, secretKey);
const response = await fetch(
`https://kf.pikabao.cc/agent/v1/cards/suspend?${new URLSearchParams({...params, sign})}`,
{ method: "PUT" }
);
const result = await response.json();
{
"code": 0,
"msg": "成功"
}
请求参数
string
required
用户标识
string
信用卡 ID,与 cardNum 二选一
string
信用卡卡号,与 cardId 二选一
string
required
当前时间戳(毫秒)
string
required
唯一的交易id
string
required
签名值
curl --location --request PUT 'https://kf.pikabao.cc/agent/v1/cards/suspend?appid=user123&cardId=111222333×tamp=1640995200000&sign=ABC123...'
const params = {
appid: "user123",
cardId: "111222333",
timestamp: Date.now().toString(),
};
const sign = generateSign(params, secretKey);
const response = await fetch(
`https://kf.pikabao.cc/agent/v1/cards/suspend?${new URLSearchParams({...params, sign})}`,
{ method: "PUT" }
);
const result = await response.json();
{
"code": 0,
"msg": "成功"
}
冻结后的卡片无法进行任何交易,但可以随时通过解冻接口恢复使用
使用场景
- 安全防护:发现卡片信息泄露时立即冻结
- 临时停用:暂时不使用时冻结,避免意外扣费
- 风险控制:检测到异常交易时主动冻结
