跳到主要内容

执行批量 Pix 交易

QI Tech 提供通过单次调用执行多笔 Pix 交易的功能。在该系统中,交易以异步方式执行。如果初始调用返回 http status 4xx,则所有交易均不会执行。提交申请后,集成合作伙伴将收到每笔交易的 webhook,告知尝试的最终状态,可能为 rejectedsent

请求

ENDPOINT
/account/ACCOUNT_KEY/pix_transfer_batch
方法
POST
{
"request_control_key": "6e4fc980-f8a1-4462-b6e2-d8a49f0ac055",
"pix_transfers": [
{
"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"
},
{
"request_control_key": "5fb20e2e-78e3-4ca7-bb36-515640ec2e78",
"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"
},
{
"request_control_key": "10ad6e08-1a4c-403c-8122-178b0acf1dfa",
"pix_transfer_type": "static_qr_code",
"transaction_amount": 500.65,
"end_to_end_id": "E73856642202309201429bZKfklNlbrb",
"receiver_conciliation_id": "REC00000000000000000000009459463343",
"target_pix_key": "target_pix_key@email.com",
"pix_message": "Ola Mundo"
}
]
}

Path Params

字段类型描述字符数
account_keyuuidv4账户的唯一标识键。36

Body Params

字段类型描述字符数
request_control_key *uuidv4客户端使用的 uuid v4 格式请求唯一标识键。36
pix_transfers *array与批次关联的 pix_transfer 对象列表。列表,见 Objeto pix_transfer

Objeto pix_transfer

字段类型描述字符数
request_control_key *uuidv4客户端使用的 uuid v4 格式请求唯一标识键。36
pix_transfer_type *enumerator要执行的 Pix 类型。Enumerador pix_transfer_type
target_pix_keystring接收交易的账户 Pix 键。100
target_accountObject目标账户 - 仅在 pix_transfer_typemanual 的转账中发送。Objeto target_account
receiver_conciliation_idstring接收方对账标识。35
transaction_amount *number转账金额。10
end_to_end_idstringSPI(即时支付系统)内 Pix 交易的幂等键。该键在 Pix 键查询中返回。仅当 pix_transfer_typekeystatic_qr_codedynamic_qr_code 时发送。32
pix_messagestring随 Pix 转账一起发送的消息。140

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基于金融机构 CNPJ 的代码(8位数字)。8

Enumerador account_type

枚举值描述
checking_account支票账户
salary_account工资账户
saving_account储蓄账户
payment_account支付账户

Enumerador pix_transfer_type

枚举值描述
manual使用目标账户数据进行 Pix 转账。必须发送 target_account
key使用 Pix 键进行 Pix 转账。必须发送 target_pix_key。如果已执行 Pix 键查询,建议发送 end_to_end_id
static_qr_code使用静态 QR 码进行 Pix 转账。必须发送QR 码解码返回的 end_to_end_id
dynamic_qr_code使用动态 QR 码进行 Pix 转账。必须发送QR 码解码返回的 end_to_end_id

响应

STATUS
201
Response Body: 批量转账已批准
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_batch_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_batch_status": "approved"
}

Enumerador pix_transfer_batch_status

枚举值描述
approved批量转账已批准,交易正在执行中。
rejected批量转账已拒绝
pending_2fa_approval批量转账待人工审批
STATUS
4xx
Response Body: 转账被拒绝
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {
"pix_transfer_batch_data": {
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_batch_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_batch_status": "rejected"
}
}
}
STATUS
4xx
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
信息

之前为 Pix 转账列出的错误也可能由此端点返回。