Ações pós-desembolso
1. Webhooks de sucesso ou falha na execução de uma ação pós desembolso
Aviso
A action_key é a chave identificadora de uma ação pós desembolso.
Sucesso
WEBHOOK_TYPE
debt_actionsSTATUS
success- Boleto
- TED
Webhook Body
{
"key": "19dee101-a781-4308-b7d1-f4426c2df111",
"data": [
{
"status": "done",
"action_key": "02f6392b-65d3-4f3e-ae91-cd5b371c7111",
"action_data": {
"digitable_line": "11193708089000014656468000284304297860007686111"
},
"action_type": "bankslip_payment",
"action_error": null,
"execution_data": {
"bank_slip": {
"payer": {
"name": "PAGADOR",
"document_number": "33128940002",
"document_number_formatted": "331.289.400-02"
},
"beneficiary": {
"name": "TESTES FINANCIAMENTO",
"document_number": "16832953000156",
"document_number_formatted": "16.832.953/0001-56"
},
"payment_key": "318aa3a0-01ca-41ac-9e0f-23c24bc67fc9",
"payment_date": "2024-07-23",
"digitable_line": "11193708089000014656468000284304297860007686111",
"expiration_date": "2024-07-23",
"tax_collection_info": {},
"payment_date_formatted": "23/07/2024",
"expiration_date_formatted": "23/07/2024",
"financial_institution_name": "BCO BRADESCO S.A.",
"financial_institution_compe_number": "237"
},
"origin_key": "318aa3a0-01ca-41ac-9e0f-23c24bc67111",
"transacted_at": "2024-07-23 21:31:09",
"source_account": {
"owner_name": "PAGADOR",
"account_digit": "5",
"account_branch": "0001",
"account_number": "4588111",
"owner_document_number": "33128940002",
"financial_institution_name": "QI SCD S.A.",
"owner_document_number_formatted": "331.289.400-02",
"financial_institution_compe_number": 329
},
"source_subtype": "bank_slip_payment",
"transaction_key": "a7af6954-3bc5-4f7e-a872-b4e47800d111",
"transacted_at_br": "2024-07-23 18:31:09",
"pdf_encoded_string": "BASE 64 DO PDF DO COMPROVANTE",
"transaction_amount": 76862.27,
"transacted_at_formatted": "23/07/2024, 21:31:09",
"transacted_at_br_formatted": "23/07/2024, 18:31:09",
"transaction_amount_formatted": "R$ 76.862,27",
"source_subtype_translation_ptbr": "Pagamento de Boleto"
}
}
],
"webhook_type": "debt_actions",
"event_datetime": "2024-07-23 21:31:18"
}
Webhook Body
{
"key": "25f14329-3734-40d8-bc5a-c5349b3cd111",
"data": [
{
"status": "done",
"action_key": "650e9041-65ec-4fd8-9b11-01e37316cf94",
"action_data": {
"qr_code": null,
"destination": {
"name": "TOMAR DIVIDA",
"account_digit": "1",
"account_branch": "0001",
"account_number": "12214111",
"document_number": "61359908021",
"financial_institution_code_number": "380"
},
"digitable_line": null,
"pix_transfer_type": null,
"transaction_amount": 500
},
"action_type": "funds_transfer",
"action_error": null,
"execution_data": {
"origin_key": "ec2112a3-9b75-4cf3-b18e-7af06857fdc5",
"transacted_at": "2024-07-04 10:03:25",
"source_account": {
"owner_name": "Conta de Origem",
"account_digit": "9",
"account_branch": "0001",
"account_number": "2845000",
"owner_document_number": "49783394487",
"financial_institution_name": "QI SCD S.A.",
"owner_document_number_formatted": "494.924.100-10",
"financial_institution_compe_number": 329
},
"source_subtype": "withdrawal",
"target_account": {
"owner_name": "CONTA DESTINO",
"account_type": "checking_account",
"account_digit": "1",
"account_branch": "0001",
"account_number": "12214111",
"account_type_str": "Conta Corrente",
"owner_document_number": "61359908021",
"financial_institution_name": "PICPAY",
"owner_document_number_formatted": "613.599.080-21",
"financial_institution_compe_number": "380"
},
"transaction_key": "eeb35946-099f-4d40-8930-881aa3730d55",
"transacted_at_br": "2024-07-04 07:03:25",
"pdf_encoded_string": "BASE 64 DO PDF DO COMPROVANTE",
"transaction_amount": 500,
"transacted_at_formatted": "04/07/2024, 10:03:25",
"transacted_at_br_formatted": "04/07/2024, 07:03:25",
"transaction_amount_formatted": "R$ 500,00",
"source_subtype_translation_ptbr": "Transferência"
}
}
],
"webhook_type": "debt_actions",
"event_datetime": "2024-07-04 10:03:33"
}
Erro na ação pós-desembolso
Em caso de erro no pagamento da ação pós-desembolso, o parceiro será notificado através do seguinte webhook:
WEBHOOK_TYPE
after_disbursement_action_updateSTATUS
error- Boleto
- TED
Webhook Body
{
"key": "e358e7e3-17b8-4aab-9da1-92f6b78dea00",
"data": {
"status": "error",
"action_key": "e2495e5a-df32-4826-b6f0-419014d3c35a",
"error_data": {
"error_code": "QIT000007",
"description": "Account blocked balance cannot be negative."
},
"action_data": {
"digitable_line": "10495419967200010004900031456924592920008049295"
},
"action_type": "bankslip_payment",
"execution_data": null
},
"webhook_type": "after_disbursement_action_update",
"event_datetime": "2023-03-22 12:06:38"
}
Webhook Body
{
"key": "e358e7e3-17b8-4aab-9da1-92f6b78dea00",
"data": {
"status": "error",
"action_key": "e2495e5a-df32-4826-b6f0-419014d3c35a",
"error_data": {
"error_code": "QIT000007",
"description": "Account blocked balance cannot be negative."
},
"action_data": {
"destination": {
"name": "Nome Credor Original",
"account_digit": "0",
"account_branch": "0897",
"account_number": "20001",
"document_number": "87163234000138",
"financial_institution_code_number": "341"
},
"transaction_amount": 1000
},
"action_type": "funds_transfer",
"execution_data": null
},
"webhook_type": "after_disbursement_action_update",
"event_datetime": "2023-03-22 12:06:38"
}
Estorno da TED da ação pós-desembolso
Caso a TED realizada na ação pós-desembolso seja devolvida pela instituição financeira destinatária, o parceiro será notificado através do seguinte webhook:
WEBHOOK_TYPE
after_disbursement_action_updateSTATUS
refusedWebhook Body
{
"key": "f4b5c36a-2aa1-4865-9678-e5a6fa585845",
"data": {
"status": "refused",
"action_key": "cf3b8809-36dc-4574-8763-3600e413cf5c",
"error_data": {
"code": "agencia_conta_invalida",
"description": "Agência ou Conta Destinatária do Crédito Inválida"
},
"action_data": {
"destination": {
"name": "SILVANA RAMOS DOS SANTOS",
"account_digit": "1",
"account_branch": "0150",
"account_number": "301771620",
"document_number": "30874011884",
"financial_institution_code_number": "237"
},
"transaction_amount": 3200
},
"action_type": "funds_transfer",
"action_amount": 3200.0
},
"webhook_type": "after_disbursement_action_update",
"event_datetime": "2023-03-23 14:46:39"
}
2. Reprocessar ação pós desembolso alterando dados da ação
Caso ocorra um erro/estorno no pagamento da ação pós-desembolso, ela pode ser retentada através do seguinte endpoint
PATH PARAMS
Campo | Tipo | Descrição |
---|---|---|
action_key * | string | Chave da ação devolvida no momento da criação da operação de crédito. |
Request
ENDPOINT
/baas/action/ACTION-KEYMÉTODO
PATCHRequest Body
- Dados Bancários
- Linha digitável Boleto
{
"digitable_line": "10495419967200010004900031456924592920008041111"
}
{
"digitable_line": "10495419967200010004900031456924592920008041111"
}
3. Reprocessar ação pós desembolso sem alteração de dados
Request
ENDPOINT
/baas/action/action_retry/ACTION-KEYMÉTODO
PATCHInformação
As respostas dos dois endpoints são as mesmas
Response
STATUS
200Response Body
{
"action_data": {
"origin_key": "8b8742f0-0b7c-4939-bfcf-9bae8c60c088",
"pdf_encoded_string": "\<BASE 64 DO PDF DO COMPROVANTE\>",
"source_account": {
"account_branch": "0001",
"account_digit": "1",
"account_number": "2788652",
"financial_institution_compe_number": 329,
"financial_institution_name": "QI SCD S.A.",
"owner_document_number": "12345678911",
"owner_document_number_formatted": "123.456.789-11",
"owner_name": "Nome do titular da conta"
},
"source_subtype": "withdrawal",
"source_subtype_translation_ptbr": "Transferência",
"target_account": {
"account_branch": "1012",
"account_digit": "1",
"account_number": "12345",
"account_type": "checking_account",
"account_type_str": "Conta Corrente",
"financial_institution_compe_number": "341",
"financial_institution_name": "ITAÚ UNIBANCO S.A.",
"owner_document_number": "12345678911",
"owner_document_number_formatted": "125.220.107-94",
"owner_name": "Nome do titular da conta destino"
},
"transacted_at": "2023-03-14 17:57:20",
"transacted_at_br": "2023-03-14 14:57:20",
"transacted_at_br_formatted": "14/03/2023, 14:57:20",
"transacted_at_formatted": "14/03/2023, 17:57:20",
"transaction_amount": 2000,
"transaction_amount_formatted": "R$ 2.000,00",
"transaction_key": "ae139d20-396e-4c7e-a675-a8cb01160f5d"
},
"action_key": "fe3f251d-6b85-4d35-96dd-08fc37d09a82"
}
STATUS
400Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
STATUS
402Response Body
{
"data": "{\"title\": \"Block Balance Error\", \"description\": \"Impossible to block an amount greater than account balance\", \"translation\": \"Não é possível blockear uma quantidade maior do que o saldo na conta\", \"extra_fields\": {}, \"code\": \"ACC000018\"}"
}