量子卡

建 Qbit 虚拟卡(量子卡),虚拟卡可以用于线上花销场景,如广告营销费用支付、企业差旅 采购费用支付等。

预算

新增预算

POST

/open-api/v1/budget

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
name string 预算名
cost number 预算

返回参数:

字段 类型 说明
data string 预算id

请求示例:

curl -X POST 'https://global.service.staging.qbitnetwork.com/open-api/v1/budget' \
     -H 'x-qbit-access-token: 120427abc23b8c04eaf7229bb541920d74d7b85b' \
     -H 'Content-Type: application/json' \
     -d '{
         "name": "name",
         "cost": 1
         }'
1
2
3
4
5
6
7

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": "eb6fbac4-9ba3-4ea4-a915-cab6e2497c21"
}
1
2
3
4
5

修改预算

PUT

/open-api/v1/budget

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
budgetId string 预算id
name string 预算名

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT 'https://global.service.staging.qbitnetwork.com/open-api/v1/budget' \
     -H 'x-qbit-access-token: 120427abc23b8c04eaf7229bb541920d74d7b85b' \
     -H 'Content-Type: application/json' \
     -d '{
         "name": "name",
         "budgetId": "08971715-b7b4-4916-ad98-c1719ea2035f"
         }'
1
2
3
4
5
6
7

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": true
}
1
2
3
4
5

增加预算

POST

/open-api/v1/budget/add

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
budgetId string 预算id
cost number 增加金额
clientTransactionId string client交易ID(方便关联订单)

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X POST 'https://global.service.staging.qbitnetwork.com/open-api/v1/budget/add' \
     -H 'x-qbit-access-token: 120427abc23b8c04eaf7229bb541920d74d7b85b' \
     -H 'Content-Type: application/json' \
     -d '{
            "budgetId": "00f0012e-ce96-4135-8cf8-e6eb51463040",
            "cost": 0.11,
            "clientTransactionId": "5dce475f-4950-4961-9977-0dad80d318e4"
         }'
1
2
3
4
5
6
7
8

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": true
}
1
2
3
4
5

减少预算

POST

/open-api/v1/budget/sub

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
budgetId string 预算id
cost number 减少金额
clientTransactionId string client交易ID(方便关联订单)

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X POST 'https://global.service.staging.qbitnetwork.com/open-api/v1/budget/sub' \
     -H 'x-qbit-access-token: 120427abc23b8c04eaf7229bb541920d74d7b85b' \
     -H 'Content-Type: application/json' \
     -d '{
            "budgetId": "00f0012e-ce96-4135-8cf8-e6eb51463040",
            "cost": 0.11,
            "clientTransactionId": "4345bef4-401f-4b84-bab1-8fb7d6715199"
         }'
1
2
3
4
5
6
7
8

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": true
}
1
2
3
4
5

获取预算列表

GET

/open-api/v1/budget

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

GET 请求参数:

字段 类型 是否为必填 说明
id string id
limit number 默认 10 条
page number 默认 0
accountId string 客户 Id

返回参数:

字段 类型 说明
data QbitBudget[] QbitBudget 的数组
total number 总数量

请求示例:

curl -X GET 'https://global.service.staging.qbitnetwork.com/open-api/v1/budget?limit=10&page=0&id=08971715-b7b4-4916-ad98-c1719ea2035f' \
     -H 'x-qbit-access-token: 120427abc23b8c04eaf7229bb541920d74d7b85b' \
     -H 'Content-Type: application/json'
1
2
3

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": {
    "data": [
      {
        "id": "08971715-b7b4-4916-ad98-c1719ea2035f",
        "accountId": "88c5610d-2bb3-4a8e-a506-9e00f69bae37",
        "name": "Kole.Little",
        "balanceId": "46ed0562-48d9-4460-b534-b3c35e96bedc",
        "expiryDate": "2099-12-31T15:59:59.000Z",
        "status": "Active",
        "createTime": "2022-01-18T03:08:56.779Z"
      }
    ],
    "total": 1
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

获取预算交易列表

GET

/open-api/v1/budget/transactions

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

GET 请求参数:

字段 类型 是否为必填 说明
id string id
limit number 默认 10 条
page number 默认 0
accountId string 客户 Id

返回参数:

字段 类型 说明
data BudgetTransaction[] QbitBudget 的数组
total number 总数量

请求示例:

curl -X GET 'https://global.service.staging.qbitnetwork.com/open-api/v1/budget/transactions?limit=10&page=0&id=08971715-b7b4-4916-ad98-c1719ea2035f' \
     -H 'x-qbit-access-token: 120427abc23b8c04eaf7229bb541920d74d7b85b' \
     -H 'Content-Type: application/json'
1
2
3

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": {
    "data": [
      {
        "id": "b4e61edc-63d0-44b9-9251-d1b10fcfb4bb",
        "accountId": "88c5610d-2bb3-4a8e-a506-9e00f69bae37",
        "budgetId": "00f0012e-ce96-4135-8cf8-e6eb51463040",
        "cardId": null,
        "amount": 0.11,
        "fee": 0,
        "type": "TransferIn",
        "clientTransactionId": "5dce475f-4950-4961-9977-0dad80d318e4",
        "status": "Closed",
        "transactionTime": "2022-01-19T08:44:38.599Z"
      }
    ],
    "pageTotal": 1,
    "total": 1
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

获取可用的卡BIN信息

GET

/open-api/v1/cards/bins

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

返回参数:

字段 类型 说明
data CardBin[] 结果

请求示例:

curl -X GET \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/bins \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: e626ca1e04bf1f5020655d669fc1da9ea0156f2a'
1
2
3
4

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": [
    {
      "bin": "493193",
      "type": "BudgetCard",
      "network": "VISA",
      "issuerCountry": "HK",
      "verification": {
        "avs": false,
        "threeDs": true
      },
      "purchaseLimit": {
        "day": "/",
        "single": "/"
      }
    },
    {
      "bin": "493193",
      "type": "PrepaidCard",
      "network": "VISA",
      "issuerCountry": "HK",
      "verification": {
        "avs": false,
        "threeDs": true
      },
      "purchaseLimit": {
        "day": "/",
        "single": "/"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

创建量子卡参数检查

POST

/open-api/v1/cards/create/check

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
batchCount number 开卡数量
cost number 开卡的金额
额度卡、493193储值卡可为0, 其它卡段储值卡不能低于1
type string 卡类型(PrepaidCard, BudgetCard)
bin string 卡bin
cardAddress json 卡地址
firstName string 持卡人名
lastName string 持卡人姓
label string 标签
useType string 使用类别
phoneCode string 持卡人手机区号
414631、493728卡段必填
phone string 持卡人手机号(不包含区号)
414631、493728卡段必填
email string 持卡人邮箱
budgetId string 预算id(type为额度卡时必填)
clientTransactionId string client 交易 ID(方便关联订单)

返回参数:

字段 类型 说明
data boolean 结果

在开卡时之前,尽量先调用参数检查接口,如果返回是空数组,那么说明参数无问题。如果返回的数组中有值,则说明有字段是有问题的。

请求示例:

curl -X POST \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/create/check \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "batchCount": 1,
        "firstName": "Yunssssssssssssssssssssssssssssssssspeng",
        "lastName": "Chsssssssssssssddddddddddddddddden",
        "useType": "test",
        "clientTransactionId": "887a12e3-6a3d-4001-af15-71f715889331",
        "type": "PrepaidCard",
        "bin": "414631",
        "phoneCode": "86",
        "phone": "13021918707",
        "cost": 10,
        "cardAddress":{
            "address1": "2381 Zanker Rd Ste 110",
            "address2": "",
            "city": "San Jose",
            "country": "US",
            "postalCode": "95131",
            "state": "CA"
        }
     }'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": [
    {
      "key": "firstName",
      "reason": "FirstName and lastName length cannot exceed 26 characters"
    },
    {
      "key": "lastName",
      "reason": "FirstName and lastName length cannot exceed 26 characters"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

创建量子卡

POST

/open-api/v1/cards

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
batchCount number 开卡数量
cost number 开卡的金额
额度卡、493193储值卡可为0, 其它卡段储值卡不能低于1
type string 卡类型(PrepaidCard, BudgetCard)
bin string 卡bin
cardAddress json 卡地址
firstName string 持卡人名
lastName string 持卡人姓
label string 标签
useType string 使用类别
phoneCode string 持卡人手机区号
414631、493728卡段必填
phone string 持卡人手机号(不包含区号)
414631、493728卡段必填
email string 持卡人邮箱
budgetId string 预算id(type为额度卡时必填)
clientTransactionId string client 交易 ID(方便关联订单)

返回参数:

字段 类型 说明
data boolean 结果

此接口为 异步 接口,在批量开卡时,系统会先返回操作结果。在开卡有结果以后,会使用 webhook 推送给用户指定的 url。

请求示例:

curl -X POST \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "batchCount": 10,
        "cost":10,
        "provider": "PrepaidCard_493193",
        "firstName": "firstName",
        "lastName": "lastName",
        "label": "memo",
        "useType": "test"
     }'
1
2
3
4
5
6
7
8
9
10
11
12
13

返回示例:

{
  "data": true
}
1
2
3

转入

POST

/open-api/v1/cards/transfer/in

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id
clientTransactionId string client 交易 ID(方便关联订单)
cost number 转入金额

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/transfer/in \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d",
        "clientTransactionId": "1735144220487",
        "cost": 10
     }'
1
2
3
4
5
6
7
8
9
10

返回示例:

{
  "data": true
}
1
2
3

转出

POST

/open-api/v1/cards/transfer/out

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id
clientTransactionId string client 交易 ID(方便关联订单)
cost number 转出金额

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/transfer/out \
	-H 'content-type: application/json' \
    -H 'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d",
        "cost": 10
     }'
1
2
3
4
5
6
7
8
9

返回示例:

{
  "data": true
}
1
2
3

冻结卡

PUT

/open-api/v1/cards/suspend

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/suspend \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d"
     }'
1
2
3
4
5
6
7
8

返回示例:

{
  "data": true
}
1
2
3

解冻卡

PUT

/open-api/v1/cards/enable

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/enable \
	 -H 'content-type: application/json' \
     -H 'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
     -d '{
         "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
         "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d"
      }'
1
2
3
4
5
6
7
8

返回示例:

{
  "data": true
}
1
2
3

删除卡

DELETE

/open-api/v1/cards

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id
clientTransactionId string client 交易 ID(方便关联订单)

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X DELETE \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d"
     }'
1
2
3
4
5
6
7
8

返回示例:

{
  "data": true
}
1
2
3

冻结金额

POST

/open-api/v1/cards/frozen

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id
clientTransactionId string client 交易 ID(方便关联订单)
cost number 冻结金额

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/frozen \
	-H 'content-type: application/json' \
    -H 'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d",
        "cost": 10
     }'
1
2
3
4
5
6
7
8
9

返回示例:

{
  "data": true
}
1
2
3

解冻金额

POST

/open-api/v1/cards/unfrozen

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 id
clientTransactionId string client 交易 ID(方便关联订单)
cost number 解冻金额

返回参数:

字段 类型 说明
data boolean 是否成功

请求示例:

curl -X PUT \
  https://global.service.staging.qbitnetwork.com/open-api/v1/cards/unfrozen \
	-H 'content-type: application/json' \
    -H 'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "accountId": "c110e2aa-322b-4f3f-a795-f441955844ed",
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d",
        "cost": 10
     }'
1
2
3
4
5
6
7
8
9

返回示例:

{
  "data": true
}
1
2
3

获取卡列表

GET

/open-api/v1/cards

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

GET 请求参数:

字段 类型 是否为必填 说明
id string 卡id
label string 卡label
limit number 默认 10 条
page number 默认 0
accountId string 客户 Id

返回参数:

字段 类型 说明
data QbitCard[] QbitCard 的数组
total number 总数量

请求示例:

curl -X GET "https://global.service.staging.qbitnetwork.com/open-api/v1/cards?limit=10&page=0&id=4322fd4f-8458-42ea-9414-8362e1dc636a&accountId=c110e2aa-322b-4f3f-a795-f441955844ed" \
     -H  'content-type: application/json' \
     -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb'
1
2
3

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": {
    "data": [
      {
        "id": "ce04331f-d2f3-42de-8d65-f66c69aa3888",
        "accountId": "e8b0d02e-5f70-4baa-b824-b4f87e34716d",
        "token": "3d9bbdf1-3c93-4fbe-80bc-a3bfe25bd6ce",
        "status": "Inactive",
        "currency": "USD",
        "provider": "PrepaidCard_493193",
        "userName": "as aa",
        "createTime": "2021-08-30T11:59:32.935Z",
        "qbitCardNoLastFour": "9990",
        "cardAddress": null,
        "label": "默认",
        "balanceId": "7eddcfcc-f6a3-4875-8aab-2c7a0f639023"
      }
    ],
    "total": 1
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

获取量子卡私密信息

接入方式一(普通商户接入)

引入 QbitCard 库

<script src="https://www.qbitnetwork.com/qbit-card/qbit-card.min.js"></script>

客户端获取 fingerprint

curl -X GET \
  https://global.service.staging.qbitnetwork.com/open-api/v1/configuration \
	-H 'content-type: application/json' \
    -H 'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
        "cardId": "599a83b8-b1d8-4da9-b7e6-44e37b4dc25d"
     }'
1
2
3
4
5
6
7

返回

{
  "code": 0,
  "message": "ok",
  "data": "1cb9d6a18619b4908e73de9377b8bafb0a635dc1695d6c0a2ef256b8f29a4822"
}
1
2
3
4
5

调用 QbitCard

<script>QbitCard.init(Configuration)</script>
客户端调用执行 init()方法通过 configuration 对象初始化和配置获取卡信息配置 QbitCard.js。 QbitCard.js 将卡信息注入到客户指定页面容器中,用 iframe 将卡信息(CardPan,CVV,Exp)分隔开。 支持选择是否通过点击指定卡信息拷贝卡信息到剪切板

Configuration 对象
字段 类型 是否为必填 说明
fingerprint string 客户认证指纹
containerId string 装置卡信息容器
showPan Object 对应指定信息配置项 cardPan, cardExp, cardCvv,copyCardPan,copyCardExp ,copyCardCvv
env string 使用环境(默认product)
product: 生产环境
dev: 开发环境
callbackEvents function 成功或失败回调
cardPan, cardExp, cardCvv 对象
字段 类型 是否为必填 说明
domId string 指定展示容器 Id
format boolean cardPan 展示格式;设置 true,格式"xxxx xxxx xxxx xxxx" ;默认 false
styles Object 自定义样式
copyCardPan,copyCardExp ,copyCardCvv 对象
字段 类型 是否为必填 说明
domId string 指定展示容器 Id
mode boolean 设置为“transparent”
onCopySuccess function 拷贝信息成功回调
onCopyFailure function 拷贝信息失败回调

示例


QbitCard.init({
    fingerprint: "* client  fingerprint *",
    containerId: "containerId",
    integrationType: "custom",
    showPan: {
      copyCardPan: {
        domId: "copyCardPan",
        mode: "transparent",
        onCopySuccess: () => console.log("完整卡号已复制到剪贴板"),
        onCopyFailure: console.dir
      },
      cardPan: {
        domId: "cardPan",
        format: true,
        styles: { span: { color: "#04d2dd", "font-size": "20px" } }
      },
      copyCardExp: {
        domId: "copyCardExp",
        mode: "transparent",
        onCopySuccess: () => console.log("有效期已复制到剪贴板"),
        onCopyFailure: console.dir
      },
      cardExp: {
        domId: "cardExp",
        styles: { span: { "font-size": "20px", color: "#04d2dd" } }
      },
      copyCardCvv: {
        domId: "copyCardCvv",
        mode: "transparent",
        onCopySuccess: () => console.log("安全码已复制到剪贴板"),
        onCopyFailure: console.dir
      },
      cardCvv: {
        domId: "cardCvv",
        styles: { span: { "font-size": "20px", color: "#04d2dd" } }
      }
    }
  })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

效果图

image

接入方式二(PCI 认证商户接入)

接入商户已通过了 Payment Card Industry (PCI) Data Security Standard 认证,可直接调用 API 接口获取量子卡私密信息

GET

/open-api/v1/cards/info

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

GET 请求参数:

字段 类型 是否为必填 说明
accountId number 客户 Id
cardId number 卡 id

返回参数:

字段 类型 说明
qbitCardNo string 卡号
cvv string cvv
expYear string 过期年
expMonth string 过期月

请求示例:

curl -X GET "https://global.service.staging.qbitnetwork.com/open-api/v1/cards/info?cardId=4322fd4f-8458-42ea-9414-8362e1dc636a&accountId=c110e2aa-322b-4f3f-a795-f441955844ed" \
     -H  'content-type: application/json' \
     -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb'
1
2
3

返回示例:

{
  "qbitCardNo": "1211500300873781",
  "cvv": "653",
  "expYear": "2024",
  "expMonth": "10"
}
1
2
3
4
5
6

获取量子卡交易详情

GET

/open-api/v1/cards/transactions/:id

Headers:

Header Parameters 说明
x-ipeakoin-access-token string access token
Content-Type application/json json 类型

返回参数:

字段 类型 说明
data CardTransaction 量子卡交易信息

请求示例:

curl -X GET "https://global.service.staging.qbitnetwork.com/open-api/v1/cards/transactions/8891da4f-a87c-4cf6-a83d-c6cd1004f209" \
     -H  'content-type: application/json' \
     -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb'
1
2
3

返回示例:

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "8891da4f-a87c-4cf6-a83d-c6cd1004f209",
    "accountId": "d37deed7-f0e7-4635-a43a-781af0cb59f0",
    "cardId": "74b0ab9f-1892-423b-b8a4-a4891e158f05",
    "currency": "USD",
    "amount": 0,
    "fee": 0,
    "type": "TransferIn",
    "clientTransactionId": "QBIT:NiumCardRecharge:TransferIn:74b6c5ed-55c9-449d-89f5-e1bcd5b71fa7",
    "detail": "",
    "status": "Closed",
    "transactionTime": "2023-03-15T05:38:58.341Z",
    "paymentId": "2303151338138005",
    "remark": ""
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

获取量子卡交易列表

GET

/open-api/v1/cards/transactions

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

GET 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 ID
cardId string 卡 ID
page number
limit number 条数
type string 交易类型
startTime date 交易开始时间
endTime date 交易结束时间
status string 交易状态
fields string 检索列表指定的某些字段(多个以逗号分隔)

返回参数:

字段 类型 说明
pageTotal number 当前页条数
total number 总条数
data CardTransaction[] 量子卡交易记录

请求示例:

curl -X GET "https://global.service.staging.qbitnetwork.com/open-api/v1/cards/transactions?accountId=fc3827ec-58e9-4f42-a661-a3aa658c3e61&limit=1" \
     -H  'content-type: application/json' \
     -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb'
1
2
3

返回示例:

{
  "data": [
    {
      "id": "302b17cf-b56a-4f86-bc7f-32ae6dd71550",
      "accountId": "2040791b-9132-4621-86a7-3e5476db9dab",
      "cardId": "de61fa0f-c6b2-4dfe-b411-873fd43fbd51",
      "currency": "USD",
      "amount": 10,
      "fee": 0,
      "type": "TransferIn",
      "clientTransactionId": "595f83f6-9b28-464d-be77-e9e7319d2951",
      "status": "Closed",
      "transactionTime": "2021-10-28T11:07:31.019Z"
    }
  ],
  "total": 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

提现

量子卡提现需要提供收款人银行信息

创建收款人

说明: 创建收款人的字段相对复杂,除以下文档必填字段外,剩余字段需要按照《收款人说明文档》 (opens new window) (密码:qiq1)来确定是否必填

POST

/open-api/v1/cards/receiver

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
firstName string
lastName string 姓 、企业全名
currency string 币种(参考枚举)
accountNumber string 收款方银行账户
relationship string 与此账户关系
receiverAddress json 收款为个人时,为个人地址,
收款为公司时,为收款公司地址(通用地址)
bankAddress json 银行地址(通用地址)
bankName string 银行名称
type string 账户类型(对公、对私)(CNY)
bankBranchName string 银行支行名称(CNY)
individualNo string 个人证件号(CNY)
businessNo string 企业证件号(企业统一社会信用代码)(CNY)
bic string bic_swift
iban string iban(EUR)
routingType string 汇款线路
routingNumber string 汇款线路号码

relationship可能的值为:

  • SAME_ACCOUNT(同名账户)
  • ASSOCIATED_SUBJECT(关联主体)
  • AGENCY_RELATIONSHIP(代理关系、供销关系关联公司)
  • TRADE_RELATIONS(贸易关系)

返回参数:

字段 类型 说明
data CardReceiver 收款人

请求示例:

curl -X POST \
  https://global.service.staging.qbitnetwork.com/open-api/v1/benefiaries \
	-H  'content-type: application/json' \
    -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb' \
    -d '{
    "accountId": "dd7774c1-e9a2-4942-921d-f6909cc8fa68",
    "status": "Passed",
    "currency": "USD",
    "accountType": "Business",
    "firstName": "",
    "lastName": "QbitPay",
    "accountNumber": "1234567890",
    "receiverAddress": {
      "addressLine1": "江干区",
      "addressLine2": "***街道",
      "state": "ZheJiang",
      "postalCode": "000000",
      "city": "HangZhou",
      "country": "CN"
    },
    "bankName": "建设银行",
    "bankAddress": {
      "addressLine1": "江干区",
      "addressLine2": "***街道",
      "state": "ZheJiang",
      "postalCode": "000000",
      "city": "HangZhou",
      "country": "CN"
    },
    "bankBranchName": "杭州分行",
    "certificateNo": "000000",
    "routingType": "aba",
    "routingNumber": "12345678",
    "bic": "XXX123456",
    "iban": "0000000000000000"
  }'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

返回示例:

{
  "data": {
    "id": "e01844db-9790-432e-86f9-da2ed0675367",
    "accountId": "dd7774c1-e9a2-4942-921d-f6909cc8fa68",
    "status": "Passed",
    "currency": "USD",
    "transferType": "Local",
    "accountType": "Business",
    "firstName": "",
    "lastName": "QbitPay",
    "accountNumber": "1234567890",
    "receiverAddress": {
      "addressLine1": "江干区",
      "addressLine2": "***街道",
      "state": "ZheJiang",
      "postalCode": "000000",
      "city": "HangZhou",
      "country": "CN"
    },
    "bankName": "建设银行",
    "bankAddress": {
      "addressLine1": "江干区",
      "addressLine2": "***街道",
      "state": "ZheJiang",
      "postalCode": "000000",
      "city": "HangZhou",
      "country": "CN"
    },
    "bankBranchName": "杭州分行",
    "certificateNo": "000000",
    "routingType": "aba",
    "routingNumber": "12345678",
    "bic": "XXX123456",
    "iban": "0000000000000000"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

获取收款人列表

GET

/open-api/v1/cards/receivers

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

GET 请求参数:

字段 类型 是否为必填 说明
id string id
limit number 默认 10 条
page number 默认 0
currency string 币种
accountId string 客户 Id

返回参数:

字段 类型 说明
data CardReceiver[] CardReceiver 的数组
total number 总数量

请求示例:

curl -X GET "https://global.service.staging.qbitnetwork.com/open-api/v1/benefiaries?limit=10&page=0&id=4322fd4f-8458-42ea-9414-8362e1dc636a&accountId=c110e2aa-322b-4f3f-a795-f441955844ed" \
     -H  'content-type: application/json' \
     -H  'x-qbit-access-token: db19fa75f4ed674135e26965173ff66f722684bb'
1
2
3

返回示例:

{
  "data": [
    {
      "id": "e01844db-9790-432e-86f9-da2ed0675367",
      "accountId": "dd7774c1-e9a2-4942-921d-f6909cc8fa68",
      "status": "Passed",
      "currency": "USD",
      "transferType": "Local",
      "accountType": "Business",
      "firstName": "",
      "lastName": "QbitPay",
      "accountNumber": "1234567890",
      "receiverAddress": {
        "addressLine1": "江干区",
        "addressLine2": "***街道",
        "state": "ZheJiang",
        "postalCode": "000000",
        "city": "HangZhou",
        "country": "CN"
      },
      "bankName": "建设银行",
      "bankAddress": {
        "addressLine1": "江干区",
        "addressLine2": "***街道",
        "state": "ZheJiang",
        "postalCode": "000000",
        "city": "HangZhou",
        "country": "CN"
      },
      "bankBranchName": "杭州分行",
      "certificateNo": "000000",
      "routingType": "aba",
      "routingNumber": "12345678",
      "bic": "XXX123456",
      "iban": "0000000000000000",
      "receiverType": "QBit"
    }
  ],
  "total": 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

创建提现订单

POST

/open-api/v1/cards/withdraw

Headers:

Header Parameters 说明
x-qbit-access-token string access token
Content-Type application/json json 类型

POST 请求参数:

字段 类型 是否为必填 说明
accountId string 客户 Id
cardId string 卡 Id
amount number 提现金额
clientTransactionId string 系统编号(幂等性)
receiverId string 卡收款人 ID

返回参数:

字段 类型 说明
data boolean 是否成功