激活实体卡
每张实体卡都需要通过随卡一起发送给持卡人的激活码进行激活。
持卡人收到邮寄卡片后,需将激活码告知 QI 的合作伙伴,由合作伙伴通过此端点完成卡片激活。
注意
出于安全原因,合作伙伴无法通过 API 查询激活码。
激活码仅在实体卡寄出时独家发送给持卡人。
在集成测试时,可在沙盒环境中通过查询卡片获取该激活码。
Request
ENDPOINT
/wallet/WALLET_KEY/card/CARD_KEY/activateMÉTODO
PATCH路径参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
WALLET_KEY * | string | 钱包识别密钥。 | uuid |
CARD_KEY * | string | 卡片识别密钥。 | uuid |
Request Body
{
"code": "253615"
}
请求体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
code * | string | 卡片激活码。 | 6 |
Response
STATUS
200Response Body
{
"card_key": "05fd3654-1f5d-479d-ade5-64239fdf214d",
"status": "active",
"account_key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"program_key": "6b6ebaac-043b-4390-8d62-e8098ec901e9",
"type": "virtual",
"card_name": "ecommerce",
"printed_name": "Aurora Catarina",
"brand": "visa",
"last_four_digits": "5695",
"created_at": "2023-02-20T19:28:16Z",
"updated_at": "2023-02-22T19:28:16Z",
"cvv_rotation_interval_hours": 72
}
错误
STATUS
4XXResponse Body
{
"title": "Not Acceptable",
"description": "Invalid activation code [1254].",
"translation": "Unable to activate card",
"code": "CARD000020"
}
| Code | Status code | 描述 |
|---|---|---|
| QIT000001 | 400 | Invalid Json schema. |
| CARD000011 | 404 | It was not possible to fetch the Card for the card_key {card_key}. |
| CARD000017 | 406 | The activation operation is not valid for the current card status [{card_status}]. |
| CARD000018 | 400 | We're sorry, but the card could not be activate. Please try again later. |
| CARD000020 | 406 | Invalid activation code [{code}]. |
| CARD000023 | 406 | The card type is invalid for this operation. Only plastic cards are allowed. |