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
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
| Field | Type | Description | Characters |
|---|---|---|---|
request_control_key * | string | Unique request identification key used by the client in uuid v4 format. | 36 |
target_account * | object | Destination account | target_account Object |
transaction_amount * | float | Transfer amount | 10 |
tfa_info* | object | Object containing the account approver's document and contact method. | tfa_info Object |
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 | Account holder name. | 50 |
account_type* | string | Account type. | account_type Enumerator |
ispb * | string | Based on the financial institution's CNPJ (8 digits). | 8 |
tfa_info Object
| Field | Type | Description | Characters |
|---|---|---|---|
approver_document_number* | string | Account approver's document number. | 11 |
session_id | string | Unique device session identification key in UUID v4 format (required for TFA via device). | 36 |
contact_type* | string | Contact method with the account approver, can be sms, email or device |
account_type Enumerator
| Enumerator | 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
{
"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
}
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
The errors previously listed for perform TED 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 |
| 400 | TED0000109 | Session ID needed | A session_id must be provided token | Uma session_id deve ser fornecida |