解码 Pix 自动支付 QR 码
请求
ENDPOINT
/account/ACCOUNT_KEY/qrcode/decode方法
POST请求 Path Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key * | uuid4 | 账户的唯一标识键。 | 36 |
Request Body
Request Body: 解码 QR Code
{
"qr_code_payload": "00020101021226840014br.gov.bcb.pix2562invoice.starkbank.com/v2/cobv/8b434df48c30482a81f7c936ae35cc87080400005303986540555.595802BR5925Stark Bank S.A.6015Sao Caetano do Sul62070503***80740014br.gov.bcb.pix2552pix.example.com/rec/2353c790eefb11eaadc10242ac120002630411FC"
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
qr_code_payload * | string | PIX 复制粘贴的 URL。 | - |
响应
STATUS
200Response Body: QR 码已解码
{
"end_to_end_id": "E32402502202303101532yCipbxgUnUj",
"qr_code_payload": "00020101021226840014br.gov.bcb.pix2562invoice.starkbank.com/v2/cobv/8b434df48c30482a81f7c936ae35cc87080400005303986540555.595802BR5925Stark Bank S.A.6015Sao Caetano do Sul62070503***80740014br.gov.bcb.pix2552pix.example.com/rec/2353c790eefb11eaadc10242ac120002630411FC",
"qr_code_key": "8c2c19bd-f260-4714-955c-956f3eaa30ca",
"qr_code_type": "dynamic_composed",
"qr_code_data": {
"incoming_recurrence": {
"incoming_recurrence_key": "67abc123-4567-89ab-cdef-1234567890ab",
"journey_type": "j2_recurrence_only_qrcode",
"incoming_recurrence_type": "variable_amount",
"incoming_recurrence_status": "pending_confirmation",
"start_date": "2024-08-01",
"end_date": null,
"periodicity": "weekly",
"target_pix_key": "teste.recorrencia@email.com.br",
"minimum_transaction_amount": "100.00",
"maximum_transaction_amount": "500.00",
"transaction_amount": null,
"is_retry_allowed": true,
"created_at": "2024-07-23T14:30:45.123Z",
"payer_document_number": "12345678901",
"payer_name": "João da Silva",
"payer_account_key": "a5d7e60f-1c9b-4b8a-9de7-6f3b919cc45d",
"request_control_key": "c7d7e60f-1c9b-4b8a-9de7-6f3b919cc45f",
"receiver_conciliation_id": "RRAUTOTESTE001",
"pix_message": "Autorização de débito mensal"
},
"payment_data": {
"request_control_key": "c7d7e60f-1c9b-4b8a-9de7-6f3b919cc45f",
"transaction_amount": "150.75",
"target_pix_key": "teste.recorrencia@email.com.br",
"target_account": null,
"receiver_conciliation_id": "fgnb4NTt7pOUBGfrcporERwVVqr0f8PWRfK",
"pix_message": "Assinatura mensal do serviço"
}
}
}
| 字段 | 类型 | 描述 | 最大字符数 |
|---|---|---|---|
end_to_end_id | string | SPI(即时支付系统)内 Pix 交易的幂等键。该键在 Pix 键查询中返回。 | 32 |
qr_code_payload | string | PIX 复制粘贴的 URL。 | - |
qr_code_key | uuid4 | QR 码的唯一标识键。 | 36 |
qr_code_data | Object | QR 码数据。 | Objeto qr_code_data |
Objeto qr_code_data
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
incoming_recurrence | objeto | 定期付款标识对象。 | Objeto incoming_recurrence |
payment_data | objeto | 付款信息对象,适用于 journey_types: j3_payment_and_recurrence_qrcode, j4_recurrence_offer_post_payment。 | Objeto payment_data |
Objeto incoming_recurrence
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
incoming_recurrence_key | uuid4 | 授权的唯一标识键。 | 36 |
incoming_recurrence_status | string | 定期付款状态标识符。 | Enumerador incoming_recurrence_status |
request_control_key | uuid4 | 客户端使用的请求唯一标识键。 | 36 |
transaction_amount | number | 固定金额定期付款的转账金额。 | 10 |
minimum_transaction_amount | number | 可变金额定期付款的最低转账金额。 | 10 |
maximum_transaction_amount | number | 可变金额定期付款的最高转账金额。 | 10 |
periodicity | enumerator | 与付款关联的周期类型。 | Enumeradores periodicity |
journey_type | enumerator | 请求旅程类型。 | Enumeradores journey_type |
end_to_end_id | string | SPI 内 Pix 交易的幂等键。该键在 Pix 键查询中返回。 | 32 |
start_date | string | 定期付款开始日期。 | - |
end_date | string | 定期付款结束日期,对于无限期情况发送 null。 | - |
next_execution_date | string | 定期付款下次执行日期。 | - |
receiver_conciliation_id | string | 接收方对账标识。 | 35 |
target_pix_key | string | 交易账户的 Pix 键。 | 100 |
is_retry_allowed | boolean | 是否允许 Pix 交易重试。 | - |
payer_document_number | string | 交易付款人的文件编号。 | 14 |
payer_name | string | 交易付款人姓名。 | - |
payer_account_key | string | 交易付款人账户标识符。 | - |
pix_message | string | 随 Pix 转账一起发送的消息。 | 140 |
created_at | string | 定期付款请求的创建时间。 | - |
Objeto payment_data
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key | uuid4 | 客户端使用的请求唯一标识键。 | 36 |
transaction_amount | number | 固定金额定期付款的转账金额。 | 10 |
target_pix_key | string | 交易账户的 Pix 键。 | 100 |
target_account | Object | 手动转账的目标账户。 | Objeto target_account |
receiver_conciliation_id | string | 接收方对账标识。 | 35 |
pix_message | string | 随 Pix 转账一起发送的消息。 | 140 |
Objeto target_account
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_branch | string | 账户支行。 | 6 |
account_digit | string | 账户校验位。 | 1 |
account_number | string | 账户号码。 | 20 |
owner_document_number | string | 账户持有人的 CPF 或 CNPJ(仅数字)。 | 14 |
owner_name | string | 账户持有人姓名。 | 150 |
account_type | enumerator | 账户类型。 | Enumerador account_type |
ispb | string | 基于金融机构 CNPJ 的代码(8位数字)。 | 8 |
信息
由于不同机构返回的信息不同,不同的枚举值可能表示同一种账户类型。
Enumerador account_type
| 枚举值 | 描述 |
|---|---|
checking_account | 支票账户 |
salary_account | 工资账户 |
saving_account | 储蓄账户 |
payment_account | 支付账户 |
Enumerador incoming_recurrence_status
| 枚举值 | 描述 |
|---|---|
| pending_confirmation | 定期付款待确认 |
| active | 定期付款已激活 |
| cancelled | 定期付款已取消 |
| suspended | 定期付款已暂停 |
| expired | 定期付款已到期 |
Enumeradores periodicity
| 枚举值 | 描述 |
|---|---|
weekly | 每周定期 |
monthly | 每月定期 |
quarterly | 每季定期 |
semiannual | 每半年定期 |
annual | 每年定期 |
Enumeradores journey_type
| 枚举值 | 描述 |
|---|---|
j1_in_app_only_recurrence | 通过应用内通知申请授权 |
j2_recurrence_only_qrcode | 通过扫描 QR 码申请授权 |
j3_payment_and_recurrence_qrcode | 通过扫描 QR 码进行即时 Pix 付款来授权定期付款 |
j4_recurrence_offer_post_payment | 付款或调度 Pix 后依次申请定期付款授权 |
Enumeradores pix_transfer_type
| 枚举值 | 描述 |
|---|---|
manual | 使用目标账户数据的 Pix |
key | 使用 Pix 键的 Pix |
static_qr_code | 使用静态 QR 码的 Pix |
dynamic_qr_code | 使用动态 QR 码的 Pix |
STATUS
4XXResponse Body
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo"
}
| HTTP 状态码 | QI 代码code | 标题title | 描述(英文)Description | 描述(葡文)translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | Schema Error | Erro de Schema |
| 403 | APX000025 | User is not allowed to do this transaction | User is not allowed to do this transaction | Usuário não tem autorização para fazer essa transação |
| 403 | APX000017 | Requester not allowed to access this endpoint | Requester has no permission to perform pix transfers on this endpoint | Requester não possui permissão de realizar transações pix através deste endpoint |
| 404 | APX000020 | Account not Found | Account was not found | Conta {account_key} não foi encontrada. |