Skip to main content

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

ENDPOINT
/account/ACCOUNT_KEY/ted_batch
METHOD
POST
Request 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

FieldTypeDescriptionCharacters
account_keyuuidv4Unique account identification key.36

Body Params

FieldTypeDescriptionCharacters
request_control_key *uuidv4Unique request identification key used by the client in uuid v4 format.36
teds *arrayList of ted objects linked to the batch.list of Ted Object
tfa_info*ObjectObject containing the document of the account approver and the contact method.tfa_info Object

tfa_info Object

FieldTypeDescription
approver_document_number*stringDocument number of the account approver.
contact_type*stringContact method with the account approver, which can be sms or email

Ted Object

FieldTypeDescriptionCharacters
request_control_key *stringUnique request identification key used by the client in uuid v4 format.36
target_account *objectTarget accounttarget_account Object
transaction_amount *floatTransfer amount10

target_account Object

FieldTypeDescriptionCharacters
account_branch *stringBranch.4
account_digit *stringAccount digit1
account_number *stringAccount number.20
owner_document_number *stringCPF or CNPJ (numbers only) of the account holder.14
owner_name *stringName of the account holder.50
account_type*stringAccount type.account_type Enum
ispb *stringBased on the financial institution's CNPJ (8 digits).8

account_type Enum

EnumTranslation
checking_accountchecking account
deposit_accountdeposit account
guaranteed_accountguaranteed account
investment_accountinvestment account
payment_accountpayment account
saving_accountsavings account

Response

STATUS
202
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

EnumDescription
approvedBatch transfer approved and transactions in execution process.
rejectedBatch transfer rejected
pending_2fa_approvalBatch scheduling pending approval by two-factor authentication
cancelledBatch transfer cancelled
STATUS
4xx
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"
}
}
}
STATUS
4xx
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
Information

The errors previously listed for Ted transfer are subject to being returned by this endpoint in addition to the errors listed below.

HTTP Code
status
QI Code
code
Title
title
Description (eng)
description
Description (ptbr)
translation
400TED000079No approver permissionGiven document number does not belong to an approver for this accountNúmero de documento enviado não pertence a um aprovador da conta
400TED000080tfa_info is requiredClient must send object tfa_infoCliente deve enviar objeto tfa_info
400TED000081Error occurred while sending tokenAn unexpected error occurred while sending tokenUm erro inexperado ocorreu ao tentar enviar token