请求双因素认证交易
Request
ENDPOINT
/account/ACCOUNT_KEY/pix_transferMÉTODO
POSTPath Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key | uuidv4 | 账户的唯一标识键。 | 36 |
- Chave
- Manual
- Qr Code
通过邮件和短信认证
Request Body: 通过 Pix 密钥转账(短信或邮件 TFA)
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_type": "key",
"target_pix_key": "target_pix_key@email.com",
"transaction_amount": 500.65,
"end_to_end_id": "E73856642202309201429bZKfklNlbwu",
"pix_message": "Ola Mundo",
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}
通过设备认证
除了现有的短信和邮件认证方式外,还可以使用预先注册的设备对交易进行认证。此时,session_id 需从 Device Scan 获取并在 tfa_info 中发送。
Request Body: 通过 Pix 密钥转账(设备 TFA)
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_type": "key",
"target_pix_key": "target_pix_key@email.com",
"transaction_amount": 500.65,
"end_to_end_id": "E73856642202309201429bZKfklNlbwu",
"pix_message": "Ola Mundo",
"tfa_info": {
"approver_document_number": "98765432100",
"session_id": "b2f18d3a-67c2-4a7f-98e5-1d3f5c6b8a72",
"contact_type": "device"
}
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | uuidv4 | 客户使用的请求唯一标识键,uuid v4 格式。 | 36 |
pix_transfer_type * | enumerator | 要执行的 Pix 类型。密钥转账时应为 key。 | key |
target_pix_key * | string | 目标账户的 Pix 密钥。 | 100 |
transaction_amount * | number | 转账金额。 | 10 |
end_to_end_id * | string | SPI(即时支付系统)内 Pix 交易的幂等键。此键在 Pix 密钥查询中返回。仅当 pix_transfer_type 为 key、static_qr_code 或 static_qr_code 时发送 | 32 |
pix_message | string | 随 Pix 转账发送的消息。 | 140 |
tfa_info* | Object | 包含账户审批人文件及联系方式的对象。 | Objeto tfa_info |
通过邮件和短信认证
Request Body: 手动转账(短信或邮件 TFA)
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_type": "manual",
"target_account": {
"account_branch": "0001",
"account_digit": "3",
"account_number": "12345678",
"owner_document_number": "32402502000135",
"owner_name": "Qi Tech",
"account_type": "checking_account",
"ispb": "32402502"
},
"transaction_amount": 500.65,
"pix_message": "Ola Mundo",
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}
通过设备认证
除了现有的短信和邮件认证方式外,还可以使用预先注册的设备对交易进行认证。此时,session_id 需从 Device Scan 获取并在 tfa_info 中发送。
Request Body: 手动转账(设备 TFA)
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_type": "manual",
"target_account": {
"account_branch": "0001",
"account_digit": "3",
"account_number": "12345678",
"owner_document_number": "32402502000135",
"owner_name": "Qi Tech",
"account_type": "checking_account",
"ispb": "32402502"
},
"transaction_amount": 500.65,
"pix_message": "Ola Mundo",
"tfa_info": {
"approver_document_number": "98765432100",
"session_id": "b2f18d3a-67c2-4a7f-98e5-1d3f5c6b8a72",
"contact_type": "device"
}
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | uuidv4 | 客户使用的请求唯一标识键,uuid v4 格式。 | 36 |
pix_transfer_type * | enumerator | Pix 转账类型。 | manual |
target_account * | Object | 目标账户 - 仅在 pix_transfer_type 为 manual 时发送。 | Objeto target_account |
transaction_amount * | number | 转账金额。 | 10 |
pix_message | string | 随 Pix 转账发送的消息。 | 140 |
tfa_info* | Object | 包含账户审批人文件及联系方式的对象。 | Objeto tfa_info |
Objeto target_account
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_branch * | string | 账户机构编号。 | 4 |
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 | 金融机构 8 位识别码(ISPB)。 | 8 |
Enumerador account_type
| 枚举值 | 描述 |
|---|---|
| checking_account | 支票账户 |
| salary_account | 薪资账户 |
| saving_account | 储蓄账户 |
| payment_account | 付款账户 |
通过邮件和短信认证
Request Body: 通过 QR Code 转账(短信或邮件 TFA)
{
"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",
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}
通过设备认证
除了现有 的短信和邮件认证方式外,还可以使用预先注册的设备对交易进行认证。此时,session_id 需从 Device Scan 获取并在 tfa_info 中发送。
Request Body: 通过 QR Code 转账(设备 TFA)
{
"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",
"tfa_info": {
"approver_document_number": "98765432100",
"session_id": "b2f18d3a-67c2-4a7f-98e5-1d3f5c6b8a72",
"contact_type": "device"
}
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key* | uuidv4 | 客户使用的请求唯一标识键,uuid v4 格式。 | 36 |
pix_transfer_type* | enumerator | Pix 转账类型。 | 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 | SPI(即时支付系统)内 Pix 交易的幂等键。此键在 Pix 密钥查询中返回。仅当 pix_transfer_type 为 key、static_qr_code 或 static_qr_code 时发送。 | 32 |
pix_message | string | 随 Pix 转账发送的消息。 | 140 |
tfa_info* | Object | 包含账户审批人文件及联系方式的对象。 | Objeto tfa_info |
注意
end_to_end_id 在解码 Pix QR Code 时返回,使用 Pix 复制粘贴的 URI。
Objeto tfa_info
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
approver_document_number* | string | 账户审批人的文件编号。 | 11 |
session_id | string | 设备会话的唯一标识键,UUID v4 格式(设备 TFA 时为必填项)。 | 36 |
contact_type* | string | 与账户审批人的联系方式,可以是 sms、email 或 device |
注意
查询的 end_to_end_id 必须以发起转账的账户名义完成!
注意
一个 end_to_end_id 只能用于一笔转账,无论转账是否成功。
Response
STATUS
202Response Body: 交易已申请
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"end_to_end_id": "E32402502202405081755SxyT2DDcVwc",
"pix_transfer_status": "pending_2fa_approval",
"created_at": "2021-10-22T20:30:23.459Z"
}
STATUS
4xxResponse Body: 转账已拒绝
{
"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",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"end_to_end_id": "E32402502202405081755SxyT2DDcVwc",
"pix_transfer_status": "rejected",
"created_at": "2021-10-22T20:30:23.459Z"
}
}
}
STATUS
4xxResponse Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP 代码status | QI 代码code | 标题title | 描述(英文)description | 描述(葡文)translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | Schema Error | Erro de Schema |
| 400 | PXT000168 | No approver permission | Given document number does not belong to an approver for this account | Número de documento enviado não pertence a um aprovador da conta |
| 400 | PXT000169 | tfa_info is required | Client must send object tfa_info | Cliente deve enviar objeto tfa_info |
| 400 | PXT000170 | Error occurred while sending token | An unexpected error occurred while sending token | Um erro inexperado ocorreu ao tentar enviar token |
| 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 | PXT000003 | Account is Closed | Account {account_key} is closed. | Conta {account_key} está fechada. |
| 422 | PXT000092 | Invalid Account Type | Pix is not yet implemented for non-checking or non-escrow account types | Transações Pix não estão implementadas para conta que não sejam escrow ou livres |
| 403 | PIT000001 | User is not allowed to do this transaction | Usuário não tem autorização para fazer essa transação | |
| 400 | PXT000010 | Account is Blocked | Account {account_key} is blocked. | Conta {account_key} está bloqueada. |
| 400 | PIT000003 | Bad Request | Insufficient account balance for transfer and fee amount. | Saldo de conta insuficiente para a transferência e a taxa. |
| 400 | PXT000118 | Requester is not Pix Participant | The requester sent an alias key but is not a indirect pix participant | O requisitante enviou uma alias key no entanto não é um participante do pix indireto |
| 404 | PXT000120 | Alias sent not found | Alias key attached to this account not found | Alias key vinculada à conta não encontrada |
| 406 | PXT000105 | Invalid end_to_end_id | The end_to_end_id sent {end_to_end_id} is not valid. | O end_to_end_id enviado {end_to_end_id} não é válido. |
| 400 | PXT000108 | Bad Request | Billing account closed or blocked | Conta de cobrança encerrada ou bloqueada |
| 400 | PXT000079 | Bad Request | Insufficient billing account balance for fee. | Saldo de conta de cobrança insuficiente para a taxa. |
| 400 | PIT000004 | Bad Request | Transaction amount is over limit. | O total da transferência é superior ao limite. |
| 404 | PIX000056 | Not Found | Pix key inquiry not found | Consulta de chave pix não encontrada |
| 404 | PXT000041 | Not Found | Qr Code not found | Qr Code não encontrado |
| 400 | PXT000053 | Bad Request | QrCode already paid | Qr Code já Pago |
| 400 | PXT000188 | Session ID needed | A session_id must be provided token | Uma session_id deve ser fornecida |