Skip to main content

Simulation - BNPL Refinancing

Summary

Before creating a refinancing, you can simulate the values of the new operation. The simulation uses the same payload as a simple debt simulation, with the addition of the refinanced_credit_operations field.

Request - Existing refinanced operation

When the operation to be refinanced already exists in QI Tech, simply provide the operation_key.

ENDPOINT
/debt_simulation
METHOD
POST
Request Body
{
"complex_operation": true,
"operation_batch": [
{
"borrower": {
"person_type": "natural"
},
"refinanced_credit_operations": [
{
"operation_key": "a9630d51-f08f-4763-b269-c1947e97c260"
}
],
"financial": {
"amount": 1900.83,
"interest_type": "pre_price_days",
"credit_operation_type": "ccb",
"annual_interest_rate": 2.32,
"disbursement_date": "2023-04-01",
"interest_grace_period": 0,
"principal_grace_period": 0,
"number_of_installments": 2,
"fine_configuration": {
"contract_fine_rate": 0.02,
"interest_base": "calendar_days",
"monthly_rate": 0.01
}
}
}
]
}

Request - Non-existing refinanced operation

When the operation to be refinanced does not exist in QI Tech, you must provide the data needed to calculate the settlement amount.

Request Body
{
"complex_operation": true,
"operation_batch": [
{
"borrower": {
"person_type": "natural"
},
"refinanced_credit_operations": [
{
"original_deadline": 5,
"monthly_interest_rate": "0.0133",
"disbursement_date": "2024-06-30",
"due_balance": 1050
}
],
"financial": {
"amount": 1900.83,
"interest_type": "pre_price_days",
"credit_operation_type": "ccb",
"annual_interest_rate": 2.32,
"disbursement_date": "2023-04-01",
"interest_grace_period": 0,
"principal_grace_period": 0,
"number_of_installments": 2,
"fine_configuration": {
"contract_fine_rate": 0.02,
"interest_base": "calendar_days",
"monthly_rate": 0.01
}
}
}
]
}
Attention

The fields disbursement_date and monthly_interest_rate within refinanced_credit_operations are only required when it is necessary to calculate the settlement value of the refinanced operation for various disbursement options.

Body Params

FieldTypeDescription
complex_operation*booleanIndicates this is a complex operation (must be true)
operation_batch*arrayList of operations to be simulated

operation_batch Object

FieldTypeDescription
borrower*objectBorrower data (minimum: person_type)
refinanced_credit_operations*arrayList of operations to be refinanced
financial*objectFinancial data for the new operation

refinanced_credit_operations Object (existing operation)

FieldTypeDescription
operation_key*stringKey of the operation to be refinanced (UUID)

refinanced_credit_operations Object (non-existing operation)

FieldTypeDescription
original_deadline*integerOriginal term of the operation (in months)
monthly_interest_rate*stringMonthly interest rate of the original operation
disbursement_date*stringDisbursement date of the original operation
due_balance*floatOutstanding balance of the original operation

Response

STATUS
200
Response Body
[
{
"data": {
"annual_cet": 0.6252134981,
"assignment_amount": 1919.84,
"cet": 0.0413,
"contract_fee_amount": -179.13,
"credit_operation_type": "ccb",
"disbursed_issue_amount": 2079.96,
"disbursement_date": "2023-04-01",
"disbursement_options": [
{
"annual_cet": 0.6252134981,
"assignment_amount": 1919.84,
"cet": 0.0413,
"disbursed_issue_amount": 2079.96,
"disbursement_date": "2023-04-01",
"first_due_date": "2023-05-01",
"installments": [
{
"business_due_date": "2023-05-02",
"calendar_days": 30,
"due_date": "2023-05-01",
"due_principal": 1900.83,
"has_interest": true,
"installment_number": 1,
"pre_fixed_amount": 199.91,
"principal_amortization_amount": 904.68,
"total_amount": 1104.59,
"workdays": 18
},
{
"business_due_date": "2023-06-01",
"calendar_days": 31,
"due_date": "2023-06-01",
"due_principal": 996.15,
"has_interest": true,
"installment_number": 2,
"pre_fixed_amount": 108.44,
"principal_amortization_amount": 996.15,
"total_amount": 1104.59,
"workdays": 22
}
],
"issue_amount": 1900.83,
"number_of_installments": 2,
"total_iof": 0
}
],
"issue_amount": 1900.83,
"number_of_installments": 2
}
}
]