Skip to main content

Seguro

Na QI Tech disponibilizamos aos nossos clientes a possibilidade de oferecer seguro junto com a operação de crédito, aqui você entenderá como usá-lo em nossas API's e entender melhor sobre esse novo produto.

Atenção

Esse produto está disponível apenas para parceiros cadastrados, por favor consulte um de nossos comerciais para mais detalhes.

Como usar

Para contratar ou simular uma dívida com a contratação de seguro, deverá ser adicionado a lista de rebates um rebate do tipo "insurance_premium_qi", sem nenhum valor declarado, pois ele será calculado de acordo com o valor de emissão da proposta e com o produto de seguro a ser contratado.

Atenção

Não é possível usar rebates do tipo tac ou insurance_premium junto com o insurance_premium_qi.

Objeto Rebate
{
"rebates": [
{
"fee_type": "insurance_premium_qi"
}
]
}

Simulação de dívida

Request

No exemplo abaixo, está descrita uma simulação de dívida, onde é pedido uma cotação de seguro.

ENDPOINT
/fgts_simulation
MÉTODO
POST
Request Body
{
"borrower": {
"person_type": "natural",
"individual_document_number": "46338864879",
"birth_date": "1996-03-20"
},
"financial": {
"desired_installments": [
{
"total_amount": 200,
"due_date": "2023-10-01"
}
],
"interest_type": "pre_price_days",
"disbursement_date": "2023-03-03",
"fine_configuration": {
"monthly_rate": 0,
"interest_base": "calendar_days",
"contract_fine_rate": 0
},
"monthly_interest_rate": 0.018,
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"number_of_installments": 1,
"principal_grace_period": 0,
"rebates": [
{
"fee_type": "insurance_premium_qi"
}
]
}
}

Response

STATUS
200
Response Body
{
"type": "debt",
"key": "a445c71c-d752-4159-82bf-097d8125b66c",
"status": "finished",
"event_datetime": "2024-10-03 00:26:26",
"data": {
"interest_type": "pre_price_days",
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"interest_payment_month_period": 1,
"principal_grace_period": 0,
"principal_amortization_month_period": 1,
"operation_type": "structured_operation",
"post_fixed_interest_base": "workdays",
"post_fixed_interest_rate": null,
"prefixed_interest_rate": {
"interest_base": "calendar_days_365",
"annual_rate": 0.23872053,
"monthly_rate": 0.018,
"daily_rate": 0.00058669
},
"issue_date": "2023-03-03",
"number_of_installments": 1,
"requester_key": "9cdbe6f9-0e94-45a7-af5f-2cec36356493",
"final_disbursement_amount": 119.01,
"total_pre_fixed_amount": 23.3844066642,
"iof_amount": 3.74,
"cet": 0.0773,
"annual_cet": 1.44428,
"disbursement_date": "2023-03-03",
"installments": [
{
"calendar_days": 212,
"workdays": 145.0,
"business_due_date": "2023-10-02",
"due_date": "2023-10-01",
"due_principal": 176.62,
"has_interest": true,
"post_fixed_amount": null,
"pre_fixed_amount": 23.3844066642,
"tax_amount": 3.0702854745495474,
"total_amount": 200,
"principal_amortization_amount": 176.6155933358,
"installment_number": 1
}
],
"external_contract_fees": [
{
"fee_type": "spread",
"amount_type": "absolute",
"amount": 0.0,
"fee_amount": 0.0,
"tax_amount": 0.0,
"net_fee_amount": 0.0,
"csll_amount": 0,
"irrf_amount": 0,
"pis_amount": 0,
"cofins_amount": 0,
"amount_released": 0,
"description": null
},
{
"fee_type": "tac",
"amount_type": "absolute",
"amount": 0.0,
"fee_amount": 0.0,
"tax_amount": 0.0,
"net_fee_amount": 0.0,
"csll_amount": 0,
"irrf_amount": 0,
"pis_amount": 0,
"cofins_amount": 0,
"amount_released": 0,
"description": null
},
{
"fee_type": "insurance_premium_qi",
"amount_type": "percentage",
"amount": 30.0,
"fee_amount": 52.99,
"tax_amount": 0.0,
"net_fee_amount": 52.99,
"csll_amount": 0,
"irrf_amount": 0,
"pis_amount": 0,
"cofins_amount": 0,
"amount_released": 52.99,
"description": null
}
],
"contract_fee_amount": 0.88,
"external_contract_fee_amount": 52.99,
"net_external_contract_fee_amount": 52.99,
"contract_fees": [
{
"fee_type": "tac",
"amount_type": "percentage",
"amount": 0.5,
"fee_amount": 0.88
}
],
"issue_amount": 176.62,
"disbursed_issue_amount": 119.01,
"assignment_amount": 176.62,
"disbursement_options": [
{
"iof_amount": 3.74,
"total_pre_fixed_amount": 23.3844066642,
"cet": 0.0773,
"annual_cet": 1.44428,
"contract_fees": [
{
"fee_type": "tac",
"amount_type": "percentage",
"amount": 0.5,
"fee_amount": 0.88
}
],
"external_contract_fees": [
{
"fee_type": "spread",
"amount_type": "absolute",
"amount": 0.0,
"fee_amount": 0.0,
"tax_amount": 0.0,
"net_fee_amount": 0.0,
"csll_amount": 0,
"irrf_amount": 0,
"pis_amount": 0,
"cofins_amount": 0,
"amount_released": 0,
"description": null
},
{
"fee_type": "tac",
"amount_type": "absolute",
"amount": 0.0,
"fee_amount": 0.0,
"tax_amount": 0.0,
"net_fee_amount": 0.0,
"csll_amount": 0,
"irrf_amount": 0,
"pis_amount": 0,
"cofins_amount": 0,
"amount_released": 0,
"description": null
},
{
"fee_type": "insurance_premium_qi",
"amount_type": "percentage",
"amount": 30.0,
"fee_amount": 52.99,
"tax_amount": 0.0,
"net_fee_amount": 52.99,
"csll_amount": 0,
"irrf_amount": 0,
"pis_amount": 0,
"cofins_amount": 0,
"amount_released": 52.99,
"description": null
}
],
"contract_fee_amount": 0.88,
"external_contract_fee_amount": 52.99,
"net_external_contract_fee_amount": 52.99,
"disbursement_date": "2023-03-03",
"first_due_date": "2023-10-01",
"installments": [
{
"calendar_days": 212,
"workdays": 145.0,
"business_due_date": "2023-10-02",
"due_date": "2023-10-01",
"due_principal": 176.62,
"has_interest": true,
"post_fixed_amount": null,
"pre_fixed_amount": 23.3844066642,
"tax_amount": 3.0702854745495474,
"total_amount": 200,
"principal_amortization_amount": 176.6155933358,
"installment_number": 1
}
],
"issue_amount": 176.62,
"disbursed_issue_amount": 119.01,
"assignment_amount": 176.62,
"final_disbursement_amount": 119.01,
"prefixed_interest_rate": {
"interest_base": "calendar_days_365",
"annual_rate": 0.23872053,
"monthly_rate": 0.018,
"daily_rate": 0.00058669
}
}
]
}
}
AVISO

É possível validar a elegibilidade da cobrança de seguro, já na simulação.
Para isso, é obrigatório o envio da data de nascimento (birth_date), CPF do devedor (document_number) e o rebate "insurance_premium_qi".
Se o CPF for elegível, teremos um retorno de sucesso, se não for elegível, a requisição de simulação retornará um erro.

AVISO

O envio da data de nascimento (birth_date) não é obrigatório na simulação com seguro. Porém, na emissão de dívida temos a obrigatoriedade do envio desse campo, caso haja a contração do produto.

Consulta de elegibilidade de CPF para o seguro

Em posse dos dados de CPF, é possível a consulta da elegibilidade do CPF.

Request

ENDPOINT
/debts/borrower/[document_number]/insurance_premium_eligibility?birth_date=1994-06-11&issue_amount=150
METHOD
GET

Params

CampoDescrição
document_numberNúmero de CPF do devedor
birth_dateData de nascimento
issue_amountValor de emissão da operação de crédito

Response

STATUS
200
Response Body
{
"eligible": true
}

Descrição

CampoTipo
elegibleboleean
Atenção

Para um CPF com o retorno "elegible": false, tanto a simulação, quanto a emissão da dívida não serão possíveis com o envio de insurance_premium_qi na lista rebates.

Criação de dívida

Para criação de dívida com seguro é necessário alguns dados obrigatórios do tomador do crédito, como endereço, telefone, email e data de nascimento. Se alguns desses dados for omtido a dívida não será emitida.

Request

ENDPOINT
/debt
MÉTODO
POST
Request Body
{
"borrower": {
"person_type": "natural",
"individual_document_number": "46338864879",
"name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"is_pep": false,
"mother_name": "HELENA DO NASCIMENTO PEREIRA DA SILVA",
"email": "email@email.com",
"birth_date": "1994-06-11",
"phone": {
"number": "900000000",
"area_code": "11",
"country_code": "055"
},
"address": {
"city": "São Paulo",
"state": "SP",
"number": "215",
"street": "Gilberto Sabino",
"complement": "s/c",
"postal_code": "12345012",
"neighborhood": "Pinheiros"
}
},
"financial": {
"desired_installments": [
{
"total_amount": 200,
"due_date": "2023-10-01"
}
],
"interest_type": "pre_price_days",
"disbursement_date": "2023-03-03",
"fine_configuration": {
"monthly_rate": 0,
"interest_base": "calendar_days",
"contract_fine_rate": 0
},
"monthly_interest_rate": 0.018,
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"number_of_installments": 1,
"principal_grace_period": 0,
"rebates": [
{
"fee_type": "insurance_premium_qi"
}
]
},
"disbursement_bank_account": {
"ispb_number": "18236120",
"branch_number": "1",
"account_number": "87823171",
"account_digit": "0",
"document_number": "46338864879",
"name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"percentage_receivable": 1
},
"purchaser_document_number": "32402502000135"
}

Response

STATUS
201
Response Body
{
"webhook_type": "debt",
"key": "7a9bb512-7b38-4dbc-a109-1bc122b67a4a",
"status": "waiting_signature",
"event_datetime": "2023-03-03 18:06:18",
"data": {
"borrower": {
"name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"document_number": "46338864879",
"related_party_key": "1b98cff5-b1eb-4f3d-b337-716d76137770"
},
"contract": {
"number": "0000062201/PAD",
"urls": [
"https://storage.googleapis.com/live-doc-api/documents/45e5b9c0-0f56-40a8-aace-d206f72c164d/QISCD-NOME_DO_DEVEDOR-CCB-0000000002-20230317183044.pdf"
],
"external_contract_key": "35b882b1-9937-41d3-bf43-e0d30062dc1b",
"signature_information": [
{
"signer_name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"signer_document_number": "46338864879",
"signer_role": "issuer",
"signer_email": "email@email.com",
"signer_external_key": "3a50f3cd-8178-49c8-9fc2-984b4caa4a5b",
"signature_url": "https://sandbox.sign.qitech.com.br/s/ml9Myfp"
}
]
},
"requester_identifier_key": "7a9bb512-7b38-4dbc-a109-1bc122b67a4a",
"iof_charge_method": "financed",
"collaterals": [],
"contract_fees": [],
"external_contract_fees": [
{
"fee_type": "insurance_premium_qi",
"fee_amount": 52.99,
"tax_amount": 0,
"net_fee_amount": 52.99
}
],
"external_contract_fee_amount": 52.99,
"net_external_contract_fee_amount": 52.99,
"contract_fee_amount": 0,
"issue_amount": 176.62,
"assignment_amount": 176.62,
"cet": "7,6200%",
"annual_cet": "141,3472%",
"number_of_installments": 1,
"base_iof": 3.0702854745495474,
"additional_iof": 0.671156,
"total_iof": 3.74,
"prefixed_interest_rate": {
"annual_rate": 0.23872053,
"created_at": "2024-09-11T18:06:07",
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"installments": [
{
"accrual_reference_date": null,
"additional_costs": [],
"advanced_paid_amount": 0,
"bank_slip_key": null,
"business_due_date": "2023-10-02",
"calendar_days": 212,
"digitable_line": null,
"due_date": "2023-10-01",
"due_interest": 0,
"due_principal": 176.62,
"fine_amount": null,
"has_interest": true,
"installment_history": [],
"installment_key": "6087c6c1-d665-4ba8-bfb2-b447cd57d3e3",
"installment_number": 1,
"installment_payment": [],
"installment_status": "created",
"installment_type": "principal",
"original_due_principal": 176.62,
"original_pre_fixed_amount": 23.3844066642,
"original_principal_amortization_amount": 176.6155933358,
"original_total_amount": 200,
"paid_amount": 0,
"paid_at": null,
"post_fixed_amount": null,
"pre_fixed_amount": 23.3844066642,
"principal_amortization_amount": 176.6155933358,
"qr_code_key": null,
"qr_code_url": null,
"renegotiation_proposal_key": null,
"tax_amount": 3.0702854745495474,
"total_accrual_amount": null,
"total_amount": 200,
"total_paid_amount": 0,
"workdays": 145
}
],
"total_pre_fixed_amount": 23.3844066642
}
}

Webhooks

Seguro emitido

A emissão do seguro será feito após o desembolso da operação, o seguinte webhook será enviado quando o seguro terminar de ser emitido com os dados do seguro.

Atenção

Ao receber o webhook de bilhete emitido é obrigatório a transmissão do documento do bilhete gerado para o tomador de crédito.

Webhook Body
{
"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"
}

Seguro cancelado

O seguro pode ser cancelado quando o tomador do crédito queira desistir de operação de crédito e a operação for revertida ou quando tomador acaba desistindo somente do seguro.

Atenção

O bilhete de seguro só pode ser cancelado totalmente dentro de 7 dias corridos do desembolso da operação de crédito, caso queira cancelar após isso o valor devolvido vai ser proporcional a duração do seguro.

Webhook Body
{
"data": {
"cancel_reason": "reversed_operation"
},
"event_datetime": "2023-03-03 22:39:39",
"key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
"status": "canceled",
"webhook_type": "insurance_premium.status_change"
}

Motivos de cancelamento

cancel_reasonDescrição
reversed_operationOperação revertida e seguro cancelados
insurance_premium_cancelSomente o seguro foi cancelado

Consulta do seguro

Request

ENDPOINT
/debt/[debt_key]/insurance_premiums
METHOD
GET

Response

STATUS
200
Response Body
{
"data": [
{
"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",
"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": 200,
"cover_type": "permanent_disability",
"cover_prize_amount": 572.82
},
{
"cover_amount": 100,
"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
}
],
"pagination": {
"current_page": 0,
"next_page": 0,
"rows_per_page": 1
}
}

Request

ENDPOINT
/debt/[DEBT-KEY]/insurance_premium/[INSURANCE-PREMIUM-KEY]
METHOD
GET

Response

STATUS
200
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
}

Consulta do documento bilhete

Atenção

O link do documento é expirável e tem uma duração de 15 minutos.

Request

ENDPOINT
/document/[DOCUMENT-KEY]/url
METHOD
GET

Response

STATUS
200
Response Body
{
"document_key": "a11dc0fe-51ed-41aa-bb40-bca80d6e515b",
"signed_document_url": null,
"document_url": "https://storage.googleapis.com/dev-doc-api-private/documents/a11dc0fe-51ed-41aa-bb40-bca80d6e515b/TESTEELECTRONIC2.pdf?Expires=1726081733&GoogleAccessId=doc-api-signed-url-service-acc%40qicredit-dev.iam.gserviceaccount.com&Signature=CNY8ch%2BQ2FuLXrbRZGLhH41A7SkNJRUUq%2FJoegTIMeXEiNImD%2FkPoEHyNtOXWUUR8JtEL6ppT0s1tXA9oFfLjzOtvzMOfpal0TwJDLSsX9r4HxcxvzFZUJELAn9yIAcRhqR%2BnzUn0WYyQA%2B0hAalz%2Bj274pXhIExqJJR4LiDUAkzRE3WD0GOvsV7afAoqQ8P3Xxj4mvOM3P%2BuFhgP6hcJmq0K%2B5qHssF3DtvpQFLcLaQ7T45YoQDCnDFGztD0Un0%2BNBwv4n2142rV3rMu9h3DzLmQbEjaeYgHb4wq2kOfyfEUSbaU683d6hA7CNyrPWMeoi%2F%2BgTfFFadbcGCMGX2%2BQ%3D%3D",
"expiration_datetime": "2023-03-03T19:08:53.000Z"
}