执行 TED 转账
在全国金融系统中,TED 交易的接收不是即时的。在 QI 系统中执行 TED 交易时,将立即返回一个响应,告知错误、拒绝或接受转账。即使转账被设为 sent 状态,接收金融机构也可能拒绝资金入账并退回金额。在这种情况下,将发送新的 Webhook,状态为 rejected,拒绝原因将在 refusal_reason 字段中返回。
交易源账户的扣款将立即执行。这并不意味着金额已记入目标账户,原因如上述 TED 交易原则所述。如果发送的交易被拒绝,交易金额将重新记入源账户。
请求
ENDPOINT
/account/ACCOUNT_KEY/ted方法
POSTRequest 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
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
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": "0c3d2a3e-c121-464e-b5a4-8e69e0c17bbd",
"ted_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"created_at": "2021-10-22T20:30:23.459Z",
"ted_status": "sent",
"transaction_amount": 126.97,
"fee_amount": 0.0,
"transaction_key": "46804f32-101e-4702-8fbc-c2dbc4c2caec"
}
STATUS
4xxResponse Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP 状态码status | QI 代码code | 标题title | 描述(英文)description | 描述(葡文)translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | Schema Error | Erro de Schema |
| 400 | TED000066 | InvalidUuid | request_control_key was not accepted for not being a valid uuid v4 string | request_control_key não foi aceito por não ser uma palavra uuid v4 válida |
| 400 | TED000011 | InvalidUuid | Wrong day/time for TED | Dia/hora incorretos para a TED |
| 400 | TED000055 | Invalid Observation | Observation sent is invalid | Observação enviada é inválida |
| 400 | TED000054 | Invalid Transaction Amount | Transaction amount of {transaction_amount} is not valid. It must be a positive value with at maximum 2 decimal places | O valor de transação {transaction_amount} não é válido. Deve ser um valor positivo com no máximo duas casas decimais |
| 400 | TED000012 | Bad Request | The target's length of the account + account_digit cannot be larger than 21 | O número de digitos na conta de destino + digito não pode ser maior que 21 |
| 400 | TED000053 | Invalid Target Account Type | Target Account Type {account_type} is invalid | Tipo de conta destino {account_type} é inválido |
| 400 | TED000031 | Bad Request | ISPB number {ispb} does not exist or is inactive | ISPB {ispb} não existe ou está inativo |
| 400 | TED000065 | Bad Request | It has been identified by request_control_key that this request is already being processed | Foi identificado por request_control_key que está requisição está sendo processada |
| 403 | TED000071 | Invalid target account | Invalid target account | Conta destino inválida |
| 400 | TED000058 | Bad Request | Insufficient account balance for transfer and fee amount | Saldo de conta insuficiente para a transação e a taxa |
| 400 | TED000070 | Bad Request | Insufficient account balance fee amount in billing account | Saldo de conta centralizadora insuficiente para taxa |
| 400 | TED000071 | Bad Request | Transaction cannot be made due to already blocked balance | Transação não pode ser feita pois saldo em conta bloqueado |
| 400 | TED000068 | Bad Request | Transfer rejected by the system | transferêancia foi recusada pelo sistema |
| 404 | TED000013 | Bad Request | Unable to find source_account_key's account | Não foi possível encontrar a conta com source_account_key fornecido |
| 400 | TED000015 | Bad Request | Account blocked or closed can not perform this action | A conta bloqueada ou fechada não pode executar esta ação |
| 400 | TED000016 | Bad Request | Hub account can not perform this action | A conta hub não pode executar esta ação |
| 403 | TED000017 | Unauthorized | Provided account does not have approval credential for the given person | A conta fornecida não possui credencial de aprovação para a pessoa especificada |
| 403 | TED000018 | Unauthorized | Provided account not owned by SELECTED_AGENT | Conta fornecida não pertencente ao SELECTED_AGENT |
| 400 | TED000060 | Bad Request | Billing Account is closed | Conta centralizadora de pagamentos de tarifa fechada |
| 400 | TED000061 | Bad Request | Billing Account without necessary funds | Conta centralizadora de pagamentos sem saldo necessário |
| 409 | TED000064 | Bad Request | request_control_key {request_control_key} already in use | request_control_key {request_control_key} já utilizada |