Perform Batch Ted Transaction with Two-Factor Authentication
QI Tech offers the possibility to perform multiple ted transactions with a single call. In this system, transactions are performed asynchronously. If the initial call returns an http status 4xx, none of the transactions will be performed. After the request, the integrating partner will receive a webhook for each transaction informing the final status of the attempt, which can be rejected or sent.
In this type of transaction, payment confirmation is required via token sent to the person with authorization powers for account movement in the crediting account.
The Ted transaction request by integrating partners configured to use two-factor authentication
is performed similarly to what is described
in perform batch ted transaction. The difference
occurs in the addition of the tfa_info object, containing information about the transfer approver and the contact method, and the
status of a successful request which will always be pending_2fa_approval.
The notification event for sending the token to the approver is baas.token_validation.ted.batch. It is
possible to customize the sent message.
Request
/account/ACCOUNT_KEY/ted_batchRequest Body
{
"request_control_key": "6e4fc980-f8a1-4462-b6e2-d8a49f0ac055",
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
},
"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
},
{
"request_control_key": "ff9f2a48-918c-4911-9371-a496e37dccfc",
"target_account": {
"account_branch": "0001",
"account_number": "92797",
"account_digit": "2",
"owner_document_number": "23599885000192",
"owner_name": "Titular da Conta",
"ispb": "12345678",
"account_type": "checking_account"
},
"transaction_amount": 10.00
}
]
}
Path Params
| Field | Type | Description | Characters |
|---|---|---|---|
account_key | uuidv4 | Unique account identification key. | 36 |
Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
request_control_key * | uuidv4 | Unique request identification key used by the client in uuid v4 format. | 36 |
teds * | array | List of ted objects linked to the batch. | list of Ted Object |
tfa_info* | Object | Object containing the document of the account approver and the contact method. | tfa_info Object |
tfa_info Object
| Field | Type | Description |
|---|---|---|
approver_document_number* | string | Document number of the account approver. |
contact_type* | string | Contact method with the account approver, which can be sms or email |
Ted Object
| Field | Type | Description | Characters |
|---|---|---|---|
request_control_key * | string | Unique request identification key used by the client in uuid v4 format. | 36 |
target_account * | object | Target account | target_account Object |
transaction_amount * | float | Transfer amount | 10 |
target_account Object
| Field | Type | Description | Characters |
|---|---|---|---|
account_branch * | string | Branch. | 4 |
account_digit * | string | Account digit | 1 |
account_number * | string | Account number. | 20 |
owner_document_number * | string | CPF or CNPJ (numbers only) of the account holder. | 14 |
owner_name * | string | Name of the account holder. | 50 |
account_type* | string | Account type. | account_type Enum |
ispb * | string | Based on the financial institution's CNPJ (8 digits). | 8 |
account_type Enum
| Enum | Translation |
|---|---|
| checking_account | checking account |
| deposit_account | deposit account |
| guaranteed_account | guaranteed account |
| investment_account | investment account |
| payment_account | payment account |
| saving_account | savings account |
Response
Response Body: Batch Transfer Requested
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"ted_batch_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"ted_batch_status": "pending_2fa_approval"
}
ted_batch_status Enum
| Enum | Description |
|---|---|
| approved | Batch transfer approved and transactions in execution process. |
| rejected | Batch transfer rejected |
| pending_2fa_approval | Batch scheduling pending approval by two-factor authentication |
| cancelled | Batch transfer cancelled |
Response Body: Transfer Rejected
{
"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"
}
}
}
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
The errors previously listed for Ted transfer are subject to being returned by this endpoint in addition to the errors listed below.
HTTP Codestatus | QI Codecode | Titletitle | Description (eng)description | Description (ptbr)translation |
|---|---|---|---|---|
| 400 | TED000079 | 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 | TED000080 | tfa_info is required | Client must send object tfa_info | Cliente deve enviar objeto tfa_info |
| 400 | TED000081 | Error occurred while sending token | An unexpected error occurred while sending token | Um erro inexperado ocorreu ao tentar enviar token |