Skip to main content

Perform TED with Two-Factor Authentication

In this type of transaction, payment confirmation is required via token sent to the person with powers to approve account movements.

TED transaction requests by integrating partners configured to use two-factor authentication are performed similarly to what is described in perform TED. 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.

Request

ENDPOINT
/account/ACCOUNT_KEY/ted
METHOD
POST

Authentication via Email and SMS

Request Body
{
"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,
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}

Device Authentication

In addition to the existing authentication methods via sms and email, it is possible to authenticate the transaction using a previously registered device. In this case, the session_id must be obtained from the Device Scan and sent in the tfa_info.

Request Body
{
"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,
"tfa_info": {
"approver_document_number": "98765432100",
"session_id": "b2f18d3a-67c2-4a7f-98e5-1d3f5c6b8a72",
"contact_type": "device"
}
}

Body Params

FieldTypeDescriptionCharacters
request_control_key *stringUnique request identification key used by the client in uuid v4 format.36
target_account *objectDestination accounttarget_account Object
transaction_amount *floatTransfer amount10
tfa_info*objectObject containing the account approver's document and contact method.tfa_info Object

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 *stringAccount holder name.50
account_type*stringAccount type.account_type Enumerator
ispb *stringBased on the financial institution's CNPJ (8 digits).8

tfa_info Object

FieldTypeDescriptionCharacters
approver_document_number*stringAccount approver's document number.11
session_idstringUnique device session identification key in UUID v4 format (required for TFA via device).36
contact_type*stringContact method with the account approver, can be sms, email or device

account_type Enumerator

EnumeratorTranslation
checking_accountchecking account
deposit_accountdeposit account
guaranteed_accountguaranteed account
investment_accountinvestment account
payment_accountpayment account
saving_accountsavings account

Response

STATUS
202
Response Body
{
"request_control_key": "0c3d2a3e-c121-464e-b5a4-8e69e0c17bbd",
"ted_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"created_at": "2021-10-22T20:30:23.459Z",
"ted_status": "pending_2fa_approval",
"transaction_amount": 126.97,
"fee_amount": 0.0
}
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 perform TED 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
400TED0000109Session ID neededA session_id must be provided tokenUma session_id deve ser fornecida