跳到主要内容

激活实体卡

每张实体卡都需要通过随卡一起发送给持卡人的激活码进行激活。

持卡人收到邮寄卡片后,需将激活码告知 QI 的合作伙伴,由合作伙伴通过此端点完成卡片激活。

注意

出于安全原因,合作伙伴无法通过 API 查询激活码。

激活码仅在实体卡寄出时独家发送给持卡人。

在集成测试时,可在沙盒环境中通过查询卡片获取该激活码。

Request

ENDPOINT
/prepaid/card/CARD_KEY/activate
MÉTODO
PATCH

路径参数

字段类型描述字符数
CARD_KEY *string卡片识别密钥。uuid
Request Body
{
"code": "253615"
}

请求体参数

字段类型描述字符数
code *string卡片激活码。6

错误

STATUS
4XX
Response Body
{
"title": "Not Acceptable",
"description": "Invalid activation code [1254].",
"translation": "Unable to activate card",
"code": "CARD000020"
}
CodeStatus code描述
QIT000001400Invalid Json schema.
CARD000011404It was not possible to fetch the Card for the card_key {card_key}.
CARD000017406The activation operation is not valid for the current card status [{card_status}].
CARD000018400We're sorry, but the card could not be activate. Please try again later.
CARD000020406Invalid activation code [{code}].
CARD000023406The card type is invalid for this operation. Only plastic cards are allowed.

Webhook

WEBHOOK_TYPE
baas.prepaid_card.card
Webhook Body
{
"webhook_type": "baas.prepaid_card.card",
"event_datetime": "2023-07-25T12:00:00.000Z",
"data": {
"card_key": "9bd93e97-bb6d-410f-8981-06b2765f12a1",
"type": "plastic",
"status": "active",
"old_status": "embossing"
}
}