创建实体卡
Request
ENDPOINT
/prepaid/cardMÉTODO
POSTRequest Body
{
"account_key": "5294ed8d-08fc-4397-b15f-6d9aa07b0041",
"program_key": "7d405c31-ec9a-46c1-8ac8-54bab209bf41",
"type": "plastic",
"card_name": "ecommerce",
"printed_name": "Aurora Catarina",
"contactless_enabled": true,
"delivery_address": {
"address": "Rua Cel. Domingos Diniz",
"number": 124,
"neighborhood": "Centro",
"zip_code": "35797000",
"city": "Presidente Juscelino",
"state": "MG",
"complement": "Quadra 08 Lote 259",
"reference": "Supermercado Presidente",
"address_type": "residential"
}
}
信息
实体卡寄送所用的地址将与在 QI Tech 开立支付账户时填写的地址相同。
请求体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key * | string | QI Tech 支付账户的识别密钥。 | uuid |
program_key * | string | 用于发行卡片的程序识别密钥。 | uuid |
type * | string | 要发行的卡片类型(PLASTIC)。 | 枚举值 |
card_name * | string | 卡片别名,用于识别该卡片。 | 15 |
printed_name * | string | 印在卡片上的姓名(不允许使用数字和特殊字符)。 | 26 |
contactless_enabled * | boolean | 启用或禁用卡片的非接触式功能。 | - |
delivery_address | Object | 卡片配送地址。 | Address 对象 |
card_type 枚举值
| 枚举值 | 说明 |
|---|---|
| plastic | 实体卡 |
| virtual | 虚拟卡 |
Address
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
| address* | string | 配送地址 | 100 |
| neighborhood* | string | 配送地址的街区/社区 | 100 |
| zip_code* | string | 配送地址的邮政编码 | 8 |
| city* | string | 配送地址的城市 | 100 |
| state* | string | 配送地址的州 | 2 |
| number* | number | 配送地址的门牌号 | |
| complement | string | 配送地址的补充信息 | 100 |
| reference | string | 配送地址的参考地标 | 100 |
| address_type* | string | 配送类型 | 枚举值 |
address_type 枚举值
| 枚举值 | 说明 |
|---|---|
| residential | 住宅地址 |
| commercial | 商业地址 |
| other | 其他地址 |
Response
STATUS
201Response Body
{
"card_key": "05fd3654-1f5d-479d-ade5-64239fdf214d",
"created_at": "2023-06-20T19:28:16Z",
"status":"created"
}
错误
STATUS
4XXResponse Body
{
"title": "Bad Request",
"description": "The type of person is invalid for this program, please try another.",
"translation": "Invalid Person",
"code": "CARD000007"
}
| Code | Status code | 描述 |
|---|---|---|
| QIT000001 | 400 | Invalid Json schema. |
| CARD000005 | 404 | It was not possible to fetch the Program for the program_key {program_key}. |
| CARD000006 | 404 | It was not possible to fetch the Account for the account_key {account_key}. |
| CARD000007 | 400 | The type of person is invalid for this program, please try another. |
| CARD000008 | 400 | The Card Holder with the status {status} is invalid for the operation. |
| CARD000009 | 400 | We're sorry, but the card could not be generated. Please try again later. |
| CARD000010 | 404 | It was not possible to fetch the Person for the person_key {owner_person_key}. |
| CARD000033 | 403 | Create plastic card is not allowed for program_key {program_key}. |
Webhook
WEBHOOK_TYPE
baas.prepaid_card.cardWebhook Body
{
"webhook_type": "baas.prepaid_card.card",
"event_datetime": "2023-07-24T12:00:00.000Z",
"data": {
"card_key": "9bd93e97-bb6d-410f-8981-06b2765f12a1",
"account_key": "595e08f0-da4e-40f7-8db4-f9a25c829818",
"program_key": "bf74df61-557a-45cb-914f-41e127a6e18c",
"status": "created",
"type": "plastic"
}
}