通过 QR 码进行 PIX 交易
请求
ENDPOINT
/account/ACCOUNT_KEY/alias/ALIAS_KEY/pix_transferMÉTODO
POST请求体
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_type": "static_qr_code",
"transaction_amount": 500.65,
"end_to_end_id": "E73856642202309201429bZKfklNlbwu",
"receiver_conciliation_id": "REC00000000000000000000009459463343",
"target_pix_key": "target_pix_key@email.com",
"pix_message": "Ola Mundo"
}
请求体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | string | 客户使用的请求唯一标识密钥,格式为 uuid v4。 | 36 |
pix_transfer_type * | enumerador | 要执行的 PIX 类型。对于 QR 码转账,必须为 static_qr_code 或 dynamic_qr_code。 | "static_qr_code" 或 "dynamic_qr_code" |
target_pix_key * | string | 目标账户的 PIX 密钥。 | 100 |
receiver_conciliation_id | string | 接收方对账标识符。 | 35 |
transaction_amount * | number | 转账金额。 | 10 |
end_to_end_id * | string | PIX 交易的幂等性密钥 - 仅当转账类型为 "key" 时发送。 | 32 |
pix_message | string | 随 PIX 转账发送的消息。 | 140 |
提示
必须发送与 QR 码解码 相关的 end_to_end_id。
提示
查询的 end_to_end_id 必须以将请求交易的 alias 名义完成!
提示
一个 end_to_end_id 只能用于一次转账,无论转账是否成功。
响应
STATUS
201响应体:已发送转账
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"alias_key": "68908c98-59cb-4fbf-9321-5d223ec78376",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_status": "sent",
"created_at": "2021-10-22T20:30:23.459Z"
}
STATUS
202信息
如果返回的 pix_transfer_status 为 pending 状态,则不应重试 PIX 请求。该转账将被重新处理。需要通过 PIX 转账查询来检查转账状态。
响应体:待处理转账
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"alias_key": "68908c98-59cb-4fbf-9321-5d223ec78376",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_status": "pending",
"created_at": "2021-10-22T20:30:23.459Z"
}
STATUS
4XX响应体:已拒绝转账
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {
"pix_transfer_data": {
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"alias_key": "68908c98-59cb-4fbf-9321-5d223ec78376",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_status": "rejected",
"created_at": "2021-10-22T20:30:23.459Z"
}
}
}
STATUS
4XX响应体:错误
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
| HTTP 状态码 | QI 错误码code | 标题title | 英文描述Description | 葡文描述translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | Schema Error | Erro de Schema |
| 406 | PXT000103 | request_control_key must be a valid uuid v4 string | request_control_key was not accepted for not being a valid uuid v4 string | request_control_key não foi aceito por não ser uma palavra uuid v4 válida |
| 400 | PXT000048 | Bad Request | Emoji not allowed in pix message. | Emoji não é permitido na mensagem pix. |
| 400 | PXT000104 | Invalid Transaction Amount | Transaction amount of {transaction_amount} is not valid. It must be a positive value with at maximum 2 decimal places | O valor de transação {transaction_amount} não é válido. Deve ser um valor positivo com no máximo duas casas decimais |
| 404 | PXT000004 | Account not found | Account not found for: {account_datum} | Conta não encontrada para: {account_datum} |
| 400 | PXT000053 | Bad Request | QrCode already paid | Qr Code já Pago |
| 404 | PXT000041 | Not Found | Qr Code not found | Qr Code não encontrado |
| 400 | PXT000156 | QR Code Rejected | QR Code rejected by beneficiary's PSP. | QR Code rejeitado pelo PSP do usuário recebedor. |
| 400 | PXT000159 | QR code inactive | QR code is not active at the time of payment | QR code não está ativo no instante do pagamento |
| 400 | PXT000158 | Invalid Amount | Paid amount diverges from expected amount of {expected_amount} | O valor do pagamento diverge do valor esperado de {expected_amount} |
| 503 | PXT000157 | Bacen Service Unavailable Error | Could not send the message to ICOM after 3 retries | Não pode enviar a mensagem para a ICOM depois de 3 tentativas |