Insurance
This manual goes through the steps of the payroll credit issuance flow linked to insurance contracting. The disbursement of these operations will be carried out in an internal account owned by the borrower, opened during the issuance flow. From this account, a split will occur in the credit disbursement, transferring part of the disbursed amount to an external account to QI owned by the borrower and the remainder for the insurance premium payment.
1. BC PROTEGE+ Query
The insurance issuance flow along with a credit operation will involve opening an internal account at QI owned by the borrower. To open the account, it is necessary that the borrower is not on the BC PROTEGE+ list. It is possible to perform the query via API using the following endpoint. If the borrower is on the list, the insurance will be canceled after formalization.
Response Body
- Account opening approved
- Account opening rejected
{
"permission_result": "approved"
}
{
"permission_result": "rejected"
}
CPFs starting with 9 will return rejected permission.
2. Debt simulation and issuance
To simulate and issue a debt linked to insurance issuance, an object must be added to the rebates list within the financial object.
{
"rebates": [
{
"fee_type": "insurance_premium_qi",
"description": "insurance_premium_description"
}
]
}
Simulation payload example
request_body
{
"borrower": {
"person_type": "natural"
},
"financial": {
"first_due_date": "2024-12-07",
"installment_face_value": 100,
"disbursement_date": "2024-11-05",
"limit_days_to_disburse": 3,
"number_of_installments": 4,
"monthly_interest_rate": 0.018,
"interest_type": "pre_price_days",
"fine_configuration": {
"monthly_rate": 0.01,
"interest_base": "calendar_days",
"contract_fine_rate": 0.02
},
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"principal_grace_period": 0,
"rebates": [
{
"fee_type": "insurance_premium_qi",
"description": "insurance_premium_description"
}
]
}
}
Issuance payload example
request_body
{
"borrower": {
"name": "Nome devedor",
"email":"email.devedor@gmail.com",
"phone": {
"number": "999538380",
"area_code": "84",
"country_code": "055"
},
"gender": "female",
"political_exposition": "not_exposed",
"address": {
"city": "Natal",
"state": "RN",
"number": "1984",
"street": "Rua",
"complement": "complemento",
"postal_code": "59065720",
"neighborhood": "bairro"
},
"role_type": "issuer",
"birth_date": "1959-07-08",
"mother_name": "NOME DA MAE",
"nationality": "Brasileiro",
"person_type": "natural",
"marital_status": "single",
"attached_documents_list": [],
"individual_document_number": "14471835092",
"document_identification_date": "2015-10-02",
"document_identification_type": "rg",
"document_identification_number": "003709888"
},
"financial": {
"interest_type": "pre_price_days",
"first_due_date": "2023-09-21",
"disbursement_date": "2024-11-07",
"fine_configuration": {
"monthly_rate": 0.0166,
"interest_base": "calendar_days",
"contract_fine_rate": 0
},
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"monthly_interest_rate": 0.0166,
"installment_face_value": 101.84,
"limit_days_to_disburse": 7,
"number_of_installments": 10,
"principal_grace_period": 0,
"rebates": [ // Opcional
{
"fee_type": "insurance_premium_qi",
"description": "insurance_premium_description"
}
]
},
"simplified": true,
"collaterals": [
{
"percentage": 1,
"collateral_type": "private_payroll",
"collateral_data": {
"employer_document_number": "07940839000159",
"registration_number": "99999999999-A"
}
}
],
"additional_data": {
"contract": {
"contract_number": "TST0000644799"
}
},
"purchaser_document_number": "32402502000135",
"disbursement_bank_accounts": [
{
"name": "NOME DEVEDOR",
"bank_code": "001",
"account_digit": "0",
"branch_number": "2874",
"account_number": "000057555",
"document_number": "14471835092",
"transfer_method": "pix",
"percentage_receivable": 100
}
]
}
The description enumerator is used to define the type of insurance product that will be issued, which directly affects the premium amount and coverages. Consult the operations team to know which enumerators should be used in your integration.
3. Formalization
During the debt formalization flow in QI Sign, some screens will be presented to ensure the borrower's awareness and consent regarding insurance contracting.
It is possible that the borrower decides to abandon the insurance contracting and proceed only with credit contracting. In this case, the amount that would be destined for the insurance premium will also be disbursed to the borrower's account.
Along with the credit formalization webhook, an event will be sent informing whether the insurance was accepted or rejected in the formalization flow.
Webhook Body
- Operation formalized with insurance
- Operation formalized without insurance
{
"data": {
"credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
"payment_account": {
"account_number": "1234567",
"account_digit": "8",
"account_branch": "0001",
"owner_document_number": "98765432100",
"ispb": "32402502"
}
},
"event_datetime": "2023-03-03 22:39:39",
"key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
"status": "accepted",
"webhook_type": "insurance_premium.status_change"
}
{
"data": {
"credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
"rejection_reason": ""
},
"event_datetime": "2023-03-03 22:39:39",
"key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
"status": "rejected",
"webhook_type": "insurance_premium.status_change"
}
The possible rejection reason enumerators can be consulted in the Rejection reasons table.
After debt formalization with insurance, an internal account is opened where the full credit operation disbursement amount will be deposited and from which the split between the amount disbursed to the borrower and the insurance premium amount will be performed. The bank account details are provided in the payment_account object.
4. Internal disbursement
After the endorsement stage, the operation will be disbursed to the internal account opened after formalization and the following disbursement webhook will be sent.
payload
{
"key": "53f23b3be-2bc8-46fb-943f-5d4532eecf5e",
"data": {
"installments": [
{
"due_date": "2026-01-24",
"total_amount": 4645.64,
"installment_key": "80f8f098-0232-4543-1e6b-50f970bac6e2",
"pre_fixed_amount": 74.31,
"installment_number": 1,
"principal_amortization_amount": 4571.33
}
],
"ted_receipt_list": [],
"status": "disbursed",
"webhook_type": "debt",
"event_datetime": "2025-12-26 18:56:45"
}
}
5. Post-disbursement actions
To monitor success or failure in transfer attempts to the external account owned by the borrower, the following webhook should be monitored.
Webhook Body
- Disbursement error
- Disbursement success
{
"data": [
{
"action_error": {
"description": "An error occurred while sending pix_transfer bfea6188-879c-46e5-b842-d1e934d44775 to SPI",
"error_code": "disbursing_error"
},
"status": "error",
"action_data": {
"pix_transfer_type": "manual",
"target_account": {
"document_number": "98765432100",
"financial_institution_code": 1,
"ispb": 0,
"name": "Nome Tomador",
"financial_institution_code_number": "341",
"account_branch": "9123",
"account_digit": "0",
"account_number": "9999"
},
"transaction_amount": 100
},
"action_key": "fcec7529-3598-4ce2-9448-4c24d1cb9df0",
"execution_data": null,
"action_type": "pix"
}
],
"event_datetime": "2025-12-30 13:25:08",
"key": "e7a73248-d737-4cb4-ad07-6d303fc4b96c",
"webhook_type": "debt_actions"
}
{
"key": "29294369-6d9e-4700-a11b-172f80e51802",
"webhook_type": "debt_actions",
"data": [
{
"action_type": "pix",
"action_data": {
"transaction_amount": 100,
"target_account": {
"ispb": 0,
"name": "Nome Tomador",
"account_number": "20001",
"account_branch": "0897",
"document_number": "98765432100",
"account_digit": "0",
"financial_institution_code_number": "341",
"financial_institution_code": 1
},
"pix_transfer_type": "manual"
},
"action_key": "7b529465-fc0e-4a16-ab3b-259699632896",
"execution_data": {
"original_transfer_data": null,
"pdf_encoded_string": "comprovante do desembolso em base64",
"chargeback_unexpected_reason": null,
"transacted_at": "2025-12-30 12:59:46",
"source_subtype_translation_ptbr": "Desembolso PIX da Operação",
"receiver_conciliation_id": null,
"transaction_key": "6c039a31-0d4c-452f-b9aa-9a389ae354d3",
"pix_message": "",
"transaction_amount": 100,
"end_to_end_id": "E32402502202512301259djWNilNGhHj",
"translated_chargeback_reason": null,
"transacted_at_br": "2025-12-30 09:59:46",
"origin_key": "a9d91b03-6a4b-4833-bc89-69afcb07ee75",
"chargeback_reason": null,
"transacted_at_formatted": "30/12/2025, 12:59:46",
"source_account": {
"owner_name": "Nome Tomador",
"account_number": "7617846",
"account_branch": "0001",
"owner_document_number_formatted": "987.654.321-00",
"owner_document_number": "98765432100",
"account_digit": "5",
"financial_institution_compe_number": "329",
"financial_institution_name": "QI SOCIEDADE DE CRÉDITO DIRETO S.A."
},
"target_account": {
"target_pix_key": null,
"owner_document_number_formatted": "***.654.***-**",
"owner_document_number": "***654*****",
"owner_name": "Nome Tomador",
"account_type_str": "Conta Corrente",
"account_type": "checking_account",
"account_number": "020001",
"ispb_number": "60701190",
"is_internal": false,
"account_branch": "0897",
"financial_institution_compe_number": 341,
"account_digit": "0",
"financial_institution_name": "ITAÚ UNIBANCO S.A."
},
"chargeback_returned_amount": null,
"transaction_amount_formatted": "R$ 100,00",
"source_subtype": "operation_pix_disbursement",
"pix_transfer_type": "manual",
"transacted_at_br_formatted": "30/12/2025, 09:59:46"
},
"action_error": null,
"status": "done"
}
],
"event_datetime": "2025-12-30 13:00:58"
}
Post-disbursement action resubmission
In case of failure, the following endpoint should be used for post-disbursement action resubmission
payload
- Manual pix resubmission payload
- Pix key resubmission payload
- TED resubmission payload
{
"pix_transfer_type": "manual",
"target_account": {
"name": "Nome Tomador",
"account_digit": "0",
"account_branch": "9123",
"account_number": "9999",
"document_number": "98765432100",
"financial_institution_code_number": "341"
}
}
{
"pix_transfer_type": "key",
"pix_key": "98765432100"
}
{
"action_type": "funds_transfer",
"destination": {
"account_branch": "3181",
"account_digit": "6",
"account_number": "26284",
"document_number": "48127500211248",
"financial_institution_code_number": "001",
"name": "JOANA LUCILIA GOMES DA SILVA",
"transfer_type": "ted",
},
}
To test a post-disbursement action failure, you can use account number 11581339 for manual pix or key b9380607-dac6-4e17-8ca7-eb761e3aa1dc for pix key.
payload
- Manual pix mocked payload example
- Pix key mocked payload example
"disbursement_bank_accounts": [{
"document_number": "77564023082",
"name": "Jorge Augusto Salgado Salhani",
"pix_transfer_type": "manual",
"bank_code": "001",
"branch_number": "0001",
"account_number": "11581339",
"account_digit": "0",
"percentage_receivable": 100
}]
"disbursement_bank_accounts": [{
"document_number": "61295118092",
"name": "Mock Person Name",
"pix_key": "b9380607-dac6-4e17-8ca7-eb761e3aa1dc",
"pix_transfer_type": "key"
}]
To test a TED transfer refusal, use the endpoint:
Request Body
{
"transaction_key": "\<Chave unitária da transação\>"
}
6. Cancellation in case of post-disbursement action failure
In case of failure where internal disbursement has already been done, post-disbursement action with failure and no action resubmission, the following endpoint should be used for cancellation.
payload
{}
7. Insurance issuance
After success in the post-disbursement action, the premium amount transfer will be performed and insurance will be issued. To monitor the insurance status, the following webhook should be monitored.
Webhook Body
- Insurance issued
- Insurance canceled
{
"data": {
"credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
"insurance_policy_document_key": "9990ce22-aeac-4728-82da-d1f22c33873f",
"insurance_date": "2024-09-11",
"term_start_date": "2024-09-11",
"term_end_date": "2025-09-11",
"insurance_amount": 1600,
"operation_amount": 6400,
"covers": [
{
"cover_amount": 200,
"cover_type": "permanent_disability",
"cover_prize_amount": 572.82
},
{
"cover_amount": 100,
"cover_type": "accidental_death",
"cover_prize_amount": 572.82
},
{
"capitalcover_amount_segurado": 300,
"cover_type": "unemployment",
"cover_prize_amount": 572.82
}
],
"policy_number": "1098200000008",
"prize_number": "3907",
"insurance_premium_net_amount": 1145.63,
"iof_amount": 4.37
},
"event_datetime": "2023-03-03 22:39:39",
"key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
"status": "active",
"webhook_type": "insurance_premium.status_change"
}
{
"key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
"data": {
"cancel_reason": "reversed_operation",
"credit_operation_key": "2fbd6613-3228-5gdg-9377-93db394bf2d4"
},
"status": "canceled",
"webhook_type": "insurance_premium.status_change",
"event_datetime": "2023-03-03 22:39:39"
}
To check the possible reasons for insurance cancellation, consult the Cancellation reason table.
It is mandatory that the policy pdf is sent to the borrower after insurance issuance. The document can be consulted through the document query using the insurance_policy_document_key provided in the insurance issuance webhook.
To test insurance cancellation, you can use the following endpoint:
Insurance query
To actively query insurance information, the following endpoint can be used.
Response Body
{
"insurance_premium_key": "e4fe84e3-cc71-481b-87ea-8a07f7d69079",
"status": "active",
"credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
"disbursement_key": "bd0ea133-ff47-4a21-a3e6-24186e5e2fc1",
"contract_number": "4069550961/QIT",
"requester_key": "1040ce22-aeac-4728-82da-d1f22c33873f",
"insurance_policy_document_key": "9990ce22-aeac-4728-82da-d1f22c33873f",
"insurance_date": "2024-09-11",
"term_start_date": "2024-09-11",
"term_end_date": "2025-09-11",
"insurance_amount": 1600,
"operation_amount": 6400,
"customer": {
"customer_key": "cd587fa8-3abd-4023-99ab-957df60933a5",
"document_number": "08556878350",
"name": "Wilker Oliveiraço",
"birth_date": "1998-03-21",
"gender": "male",
"email": "urich.oliveira@yopmail.com",
"phone": {
"country_code": "55",
"area_code": "11",
"number": "966931427"
},
"address": {
"postal_code": "56821686",
"state": "CE",
"city": "Ceará",
"neighborhood": "Marmiteiros",
"street": "Conjunto João Gabriel da Mata",
"number": "95",
"complement": ""
}
},
"covers": [
{
"cover_amount": 300,
"cover_type": "permanent_disability",
"cover_prize_amount": 572.82
},
{
"cover_amount": 300,
"cover_type": "accidental_death",
"cover_prize_amount": 572.82
},
{
"cover_amount": 300,
"cover_type": "unemployment",
"cover_prize_amount": 572.82
}
],
"policy_number": "1098200000008",
"prize_number": "3907",
"insurance_premium_net_amount": 1145.63,
"iof_amount": 4.37
}
Flowchart
Attachments
Rejection reason
| Enumerator | Description |
|---|---|
| insurance_rejected | insurance rejected |
| bacen_protect | bc protect+ |
Cancellation reason
| Enumerator | Description |
|---|---|
| reversed_operation | Operation reversed and insurance canceled |
| cover_limit_amount_exceeded | Only insurance was canceled. Some coverage limit was exceeded and insurance issuance was not possible |
| insurance_premium_cancel | Only insurance was canceled. Borrower cancellation directly with the insurer |