Skip to main content
POST
/
agent
/
v1
/
cards
/
open
curl --location --request POST 'https://kf.pikabao.cc/agent/v1/cards/open' \
--header 'Content-Type: application/json' \
--data-raw '{
  "appid": "user123",
  "cardBin": "491090",
  "amount": "100.00",
  "eMail": "[email protected]",
  "remark": "我的第一张虚拟卡",
  "timestamp": "1640995200000",
  "sign": "ABC123..."
}'
{
  "code": 0,
  "msg": "",
  "content": {
    "id": "111222333",
    "clientId": "11111111",
    "state": 1,
    "remark": "我的第一张虚拟卡",
    "createTime": "2023-01-01 00:00:00",
    "modifyTime": "2023-01-01 00:00:00"
  }
}

请求参数

appid
string
required
用户标识
cardBin
string
required
卡 BIN 码,从可用BIN接口获取
idempotentKey
string
required
唯一的交易id
amount
string
required
开卡充值金额
eMail
string
电子邮箱,某些 BIN 需要提供邮箱接收验证码
remark
string
信用卡备注
timestamp
string
required
当前时间戳(毫秒)
sign
string
required
签名值

响应

code
integer
响应代码
msg
string
响应消息
content
object
开卡结果
curl --location --request POST 'https://kf.pikabao.cc/agent/v1/cards/open' \
--header 'Content-Type: application/json' \
--data-raw '{
  "appid": "user123",
  "cardBin": "491090",
  "amount": "100.00",
  "eMail": "[email protected]",
  "remark": "我的第一张虚拟卡",
  "timestamp": "1640995200000",
  "sign": "ABC123..."
}'
{
  "code": 0,
  "msg": "",
  "content": {
    "id": "111222333",
    "clientId": "11111111",
    "state": 1,
    "remark": "我的第一张虚拟卡",
    "createTime": "2023-01-01 00:00:00",
    "modifyTime": "2023-01-01 00:00:00"
  }
}

开卡流程

1

获取可用 BIN

调用获取可用BIN接口查看可用的卡 BIN 和费率
2

提交开卡请求

选择合适的 BIN 并提交开卡请求,包含初始充值金额
3

等待处理

开卡请求提交后,状态为”处理中”(state=1)
4

查询开卡结果

使用返回的订单 ID 调用开卡详情接口查询开卡结果
5

获取卡信息

开卡成功后,调用获取信用卡列表获取完整的卡片信息

状态说明

状态值说明操作
1处理中等待开卡完成,可轮询查询状态
10成功开卡成功,可使用卡片
-10失败开卡失败,费用将退回账户
开卡时会扣除开卡费和充值手续费,请确保账户余额充足