列出某 Alias 的 QR 码
PIX QR 码(图片或 URL 格式)遵循标准规范,需按特定逻辑解码以提取支付信息。拥有 QR 码 URL 后,即可解码提取生成该 QR 码的所有信息。解码会生成 end_to_end_id,该值与 receiver_conciliation_id 一起用于支付 QR 码,以识别 QR 码支付。
请求
ENDPOINT
/account/ACCOUNT_KEY/alias/ALIAS_KEY/qrcode/decodeMÉTODO
POST请求体:解码 QR 码
{
"qr_code_payload": "00020126580014br.gov.bcb.pix0136a23bf0e9-5175-4829-bf89-e8fe6ac09aa1520400005303986540530.005802BR5914TywinLannister6008saopaulo62070503***6304D4FD",
}
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
qr_code_payload | string | QR 码支付 URL(PIX 复制粘贴格式)。 | - |
响应
STATUS
200 Ok响应体:静态 QR 码
{
"end_to_end_id": "E32402502202303131806WTFZTGAOWiq",
"qr_code_data": {
"additional_data": null,
"amount": null,
"ispb_number": "90400888",
"receiver_conciliation_id": "01GVGV9NXBCY287Z6CJ4S0ENW9",
"target_account_branch": "2980",
"target_account_digit": "5",
"target_account_number": "0000000000022039741",
"target_account_type": "checking_account",
"target_bank_code": 33,
"target_bank_name": "BCO SANTANDER (BRASIL) S.A.",
"target_document_number": "00000000000000",
"target_name": "JOSE RONALDO",
"target_pix_key": "00000000000000"
},
"qr_code_key": "e54671f5-3eda-4180-8539-0ac6271fe185",
"qr_code_payload": "00020126360032br.gov.bcb.pix0111234590280001665204000051234565802BR5925JOSE RONALDO BERNARDINO 26008BRASILIA62070503***63044293",
"qr_code_type": "static"
}
STATUS
200 Ok响应体:有效期动态 QR 码
{
"request_control_key": "037b46b1-0c67-4c0d-aac3-1e395dfdcb10",
"end_to_end_id": "E32402502202303101532yCipbxgUnUj",
"qr_code_data": {
"account_type": "payment_account",
"additional_data": [],
"amount": "55.59",
"category_code": "0000",
"max_payment_days": 16,
"discount_amount": null,
"expiration_date": "2023-03-27",
"fee_amount": null,
"fine_amount": null,
"ispb_number": "20018183",
"original_amount": "55.59",
"payer_document_number": "00000000000",
"payer_name": "Willian Rocha",
"payer_request": null,
"receiver_conciliation_id": "8b434df48c30482a81f7c936ae35cc87",
"receiver_url": "invoice.starkbank.com/v2/cobv/8b434df48c30482a81f7c936ae351234",
"reduction_amount": null,
"qr_code_status": "active",
"target_account_branch": "0001",
"target_account_digit": "8",
"target_account_number": "589575519784140",
"target_bank_code": null,
"target_bank_name": "Stark Bank S.A.",
"target_document_number": "00000000000000",
"target_name": "TESTE LTDA.",
"target_pix_key": "e623e7b0-d00a-400e-aee6-79632430e817",
"target_trading_name": null,
"presented_at": "2023-03-10T15:32:15.87Z",
"created_at": "2023-01-10T19:49:58.30Z",
},
"qr_code_key": "8c2c19bd-f260-4714-955c-956f3eaa30ca",
"qr_code_payload": "00020101021226840014br.gov.bcb.pix2562invoice.starkbank.com/v2/cobv/8b434df48c30482a81f7c936ae35cc123456000053039865802BR5925Oncred Sociedade de Credi6015TESTE 62070503***6304D008",
"qr_code_type": "dynamic_term"
}
STATUS
200 Ok响应体:有效期动态 QR 码
{
"request_control_key": "037b46b1-0c67-4c0d-aac3-1e395dfdcb10",
"end_to_end_id": "E32402502202303141907qlBAF1evdJ2",
"qr_code_data": {
"account_type": "checking_account",
"additional_data": [],
"amount": "9367.61",
"category_code": "0000",
"expiration_seconds": 201574,
"ispb_number": "00000000",
"payer_document_number": "10003550206",
"payer_name": "ISMAEL FATIMA AMARAL",
"payer_request": "Liquidacao de Parcelas",
"receiver_conciliation_id": "fgnb4NTt7pOUBGfrcporERwVVqr0f8PWRfK",
"receiver_url": "qrcodepix.bb.com.br/pix/v2/d373e385-dfe7-49f6-b9ec-14ba60a90000",
"qr_code_status": "active",
"target_account_branch": "1253",
"target_account_digit": "8",
"target_account_number": "107260",
"target_bank_code": 1,
"target_bank_name": "BCO DO BRASIL S.A.",
"target_document_number": "0000000000000",
"target_name": "TESTE LTDA.",
"target_pix_key": "teste.cobrancapix@gmail.com.br",
"presented_at": "2023-03-14T19:07:48.729Z",
"created_at": "2023-03-13T19:00:28.440Z",
},
"qr_code_key": "ffd7d60a-0f2d-4b29-9ae2-7f2b919fa65e",
"qr_code_payload": "00020101021226850014br.gov.bcb.pix2563qrcodepix.bb.com.br/pix/v2/d373e385-dfe7-49f6-b9ec-14ba60a9b8285204001234567895802BR5925TESTE DE JANEIRO62070503***63047B7D",
"qr_code_type": "dynamic_instant"
}
响应体
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | string | 生成该 QR 码的请求的唯一 UUID4 标识符。 | - |
end_to_end_id * | string | PIX 交易的唯一端对端标识符。 | - |
account_type * | string | 来源账户类型。 | - |
amount * | float | QR 码当前金额。 | - |
category_code * | string | 支付后用于对账的 QR 码标识符。 | - |
expiration_seconds | string | QR 码的有效时间(秒),默认 1 天。 | - |
ispb_number * | string | 银行标识符。 | - |
payer_document_number * | string | 付款方 CPF/CNPJ。 | - |
payer_name * | string | 付款方姓名。 | - |
payer_request * | string | 给付款方的消息。 | - |
receiver_conciliation_id * | string | 支付后用于对账的 QR 码标识符。 | - |
receiver_url * | string | 动态 QR 码数据查 询 URL。 | - |
qr_code_status * | string | QR 码状态。 | - |
target_account_branch * | string | 目标账户支行号。 | - |
target_account_digit * | string | 目标账户校验位。 | - |
target_account_number * | string | 目标账号。 | - |
target_bank_code * | string | 目标银行代码。 | - |
target_bank_name * | string | 目标银行名称。 | - |
target_document_number * | string | 收款方 CPF/CNPJ。 | - |
target_name * | string | 收款方姓名。 | - |
target_trading_name * | string | 收款方商业名称 - 仅用于 CNPJ。 | - |
target_pix_key * | string | 收款方 PIX 密钥。 | - |
qr_code_key * | string | QR 码的 UUID4 标识密钥。 | - |
qr_code_payload * | string | QR 码复制粘贴 URL。 | - |
qr_code_type * | string | QR 码类型。 | "static"、"dynamic_term" 或 "dynamic_instant" |
max_payment_days | int32 | 到期后的最长付款天数。 | - |
expiration_date | date | 账单到期日(格式 "YYYY-MM-DD")。 | - |
fine_amount | float | 到期后的绝对罚款金额。 | - |
interest_amount | float | 到期后每天逾期的绝对利息金额。 | - |
discount_amount | float | 折扣金额。 | - |
original_amount | float | QR 码原始金额。 | - |
additional_data | array of objects | 将展示给付款方的信息。 | - |
presented_at * | datetime | QR 码被解码的日期和时间。 | - |
created_at * | datetime | QR 码在系统中的创建日期和时间。 | - |
rebate_amount | float | 支付前的绝对折扣金额。 | - |
qr_code_status 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
active | string | QR 码处于活跃状态,可用于支付。 | - |
finished | string | QR 码已支付。 | - |
written_off | string | QR 码已被客户撤销。 | - |
bank_written_off | string | QR 码因期限过期被自动撤销。 | - |
additional_data 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
key_name * | string | 字段名称。 | - |
value | string | 字段值。 | - |
STATUS
400响应体:无法解码 QR 码
{
"title": "Bad Request",
"description": "Could not decode QR Code.",
"translation": "Não foi possível decodificar o QR Code.",
"code": "QRI000001"
}
STATUS
404响应体:未找到 QR 码
{
"title": "Not found",
"description": "Could not find the queried QR Code.",
"translation": "Não possível encontrar o QR Code buscado.",
"code": "QRI000002"
}