执行 TED 批量交易
QI Tech 提供通过单次 API 调用执行多笔 TED 交易的功能。在此系统中,交易以异步方式执行。如果初始调用返回 http status 4xx,则不会执行任何交易。请求后,集成合作伙伴将为每笔交易收到一个 Webhook,告知尝试的最终状态,可能为 rejected 或 sent。
请求
ENDPOINT
/account/ACCOUNT_KEY/ted_batch方法
POST{
"request_control_key": "6e4fc980-f8a1-4462-b6e2-d8a49f0ac055",
"teds": [
{
"request_control_key": "0c3d2a3e-c121-464e-b5a4-8e69e0c17bbd",
"target_account": {
"account_branch": "0001",
"account_number": "92796",
"account_digit": "1",
"owner_document_number": "23599885000192",
"owner_name": "Titular da Conta",
"ispb": "12345678",
"account_type": "checking_account"
},
"transaction_amount": 8.86
}
]
}
Path Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key | uuidv4 | 账户的唯一标识键。 | 36 |
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | uuidv4 | 客户使用的 uuid v4 格式的请求唯一标识键。 | 36 |
teds * | array | 与批次关联的 TED 对象列表。 | 列表 Objeto ted |
Objeto ted
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | string | 客户使用的 uuid v4 格式的请求唯一标识键。 | 36 |
target_account * | object | 目标账户 | Objeto target_account |
transaction_amount * | float | 转账金额 | 10 |
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 | 账户持有人姓名。 | 50 |
account_type * | string | 账户类型。 | Enumerador account_type |
ispb * | string | 基于金融机构 CNPJ(8 位数字)。 | 8 |
Enumerador account_type
| 枚举值 | 翻译 |
|---|---|
| checking_account | 活期账户 |
| deposit_account | 存款账户 |
| guaranteed_account | 担保账户 |
| investment_account | 投资账户 |
| payment_account | 付款账户 |
| saving_account | 储蓄账户 |
响应
STATUS
201Response Body: 已批准批量转账
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"ted_batch_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"ted_batch_status": "approved"
}
Enumerador ted_batch_status
| 枚举值 | 描述 |
|---|---|
| approved | 批量转账已批准,交易正在执行中。 |
| rejected | 批量转账已拒绝 |
| pending_2fa_approval | 批量调度待双因素身份验证批准 |
| cancelled | 批量转账已取消 |
STATUS
4xxResponse Body: 已拒绝批次
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {
"ted_batch_data": {
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"ted_batch_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"ted_batch_status": "rejected"
}
}
}
STATUS
4xxResponse Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
信息
此端点也可能返回 TED 转账 中列出的错误。