Skip to main content

Refinancing Creation

Request

ENDPOINT
/debt
METHOD
POST
Request Body
{
"borrower": {
"address": {
"city": "Bauru",
"neighborhood": "Centro",
"number": "343",
"postal_code": "17057770",
"state": "SP",
"street": "Av Um"
},
"birth_date": "1998-03-21",
"document_identification": "2f7bfc50-d7c0-4d4e-a5ce-d8bba2aeb348",
"document_identification_number": "432202821",
"email": "victor.moura@qitech.com.br",
"individual_document_number": "37197645832",
"name": "Urich Oliveira",
"person_type": "natural",
"phone": {
"area_code": "14",
"country_code": "055",
"number": "936180265"
}
},
"disbursement_bank_account": {
"account_digit": "2",
"account_number": "63755",
"bank_code": "329",
"branch_number": "0001"
},
"financial": {
"disbursed_amount": 5000.0
"monthly_interest_rate": 0.0175,
"credit_operation_type": "ccb",
"disbursement_date": "2022-04-25",
"fine_configuration": {
"contract_fine_rate": 0.02,
"interest_base": "calendar_days",
"monthly_rate": 0.01
},
"first_due_date": "2022-06-07",
"interest_grace_period": 0,
"interest_subsidy_percentage": 0,
"interest_type": "pre_price_days",
"issue_date": "2022-04-25",
"number_of_installments": 84,
"principal_grace_period": 0,
"payment_type": "bankslip"
},
"simplified": true,
"refinanced_credit_operations": [
{
"operation_key": "d897f8fa-30d0-4a25-b7e5-5daa61c7480d"
},
{
"operation_key": "f8f0d7a9-4f0c-426c-ac50-33a09d4a0d78"
}
],
"purchaser_document_number": "32402502000135"
}


Attention!

The payload used in a refinancing operation is the same used in a simple debt emission, in addition to the operation list which will be settled in the "refinanced_credit_operations"

Body Params

FieldTypeDescriptionMáx. Caract.
borrower *objectObject Borrower - Credit Operation borrower information-
disbursement_bank_account *objectObject Disbursement Bank Account - Disbursement bank account information-
financial *objectObject Financial - Financial information-
purchaser_document_number *stringPurchaser document number-
refinanced_credit_operations *array of objectsObjects Refinanced Credit Operations Refinanced operations list-

Definitions

Object Request Body

FieldTypeDescriptionMáx. Caract.
borrower *objectObject Borrower - Credit operation borrower information-
disbursement_bank_account *objectObject Disbursement Bank Account - Disbursement bank account information-
financial *objectObject Financial - Financial information-
purchaser_document_number *stringPurchaser document number-

Object Borrower

CampoTipoDescriptionMáx. Caract.
name *stringCreditors name100
emailstringCreditors email254
phoneobjectObject Phone - Creditors Telefphone-
is_pep *booleanIndicador de PEP (http://www.portaldatransparencia.gov.br/download-de-dados/pep)-
address *objectObject Address - Creditors Address-
role_type *enumdefault: issuer-
birth_date *dateCreditors birth date ("AAAA-MM-DD" format)-
mother_name *stringCreditors monthers name100
nationalitystringCreditors nationality50
person_type *stringNatural person indicator - default: natural-
individual_document_number *stringCreditors document number (apenas números)11
document_identification *stringCreditors DOCUMENT_KEY in PDF format (RG ou CNH)-
document_identification_backstringCreditors DOCUMENT_KEY (BACK)11
wedding_certificatestringCreditors wedding DOCUMENT_KEY. In the case their marital satus is "Single" must be null11
proof_of_residence *stringCreditors address DOCUMENT_KEY11

Object Address

FieldTypeDescriptionMx. Charact.
city *stringAddress city100
state *stringAddress state (2 upper-case letters)2
number *stringAddress number10
street *stringAddress street100
complement *stringAddress complement (free text)100
postal_code *stringAddress CEP (http://www.buscacep.correios.com.br/sistemas/buscacep/)8
neighborhood *stringAddress neighborhood100

Object Phone

FieldDescriptionExampleMax. Charact.
number *stringTelephone number10
area_code *stringTelefone DDD area code (https://ddd.guiamais.com.br/)2
country_code *stringTelefone country code (https://ddi.guiamais.com.br/)3

Object Disbursement Bank Account

A debt emission must contain disbursement bank account informations in the same titularity as the creditor

FieldTypeDescriptionMax. Charact.
namestringCreditor name50
document_numberstringCreditor document number11
bank_code *stringBank Code (https://www.bcb.gov.br/pom/spb/estatistica/port/ASTR003.pdf)3
branch_number *stringBranch number - Do NOT send the verification number4
account_number *stringAccount number - Do NOT send the verification number10
account_digit *stringAccount verification number1
account_typeenumEnumerator Account Type Account Type1

Object Financial

The financial object describes the credit operations financial information

FieldTypeDescriptionMax. Charact.
amoutfloatCredit issue amount-
interest_typeobjectEnumerator Interest Type - Interest calculation enumerator-
credit_operation_typeobjectEnumerator Credit Operation Type - credit operation type-
annual_interest_ratefloatPre-fixed anual interest rate-
disbursement_datedateOperation disbursement date-
interest_grace_periodintInterest grace period (in months)-
principal_grace_periodintPrincipal grace period-
number_of_installmentsintCredit operation installment number-
fine_configurationobjectObject Fine Configuration - Fine configuration-

Object Fine Configuration

In the object fine configuration, the interest and fine values are set for this operation

FieldTypeDescriptionMax. Charact.
contract_fine_ratefloatDefault fine configuration-
interest_baseenumEnumerator Interest Base - Interest calculation base-
monthly_ratefloatMonthly default rate-

Object Refinanced Credit Operations

FieldTypeDescriptionCharacters
operation_keystringRefinanced operation keyuuid key

Enumerators

Enumerator Person Type

EnumeratorDescription
legalLegal person
naturalNatural person

Enumerator Account Type

EnumeratorDescription
checking_accountChecking account
deposit_accountDeposit account
guaranteed_accountguaranteed account
investment_accountInvestment account
payment_accountPayment account
saving_accountSavings account
salary_accountSalary account

Enumerator Interest Type

EnumeratorDescription
pre_price_daysAmortization method: Fixed installments with interest calculated daily
pre_priceAmortization method: Fixed installments with fixed period calculations (30 days)
pre_sacAmortization method: Constant amortization with pre-fixed daily interest rate
post_sacAmortization method: Constant amortization with pre-fixed daily interest rate + post-fixed integrated benchmark (IPCA, CBD, ETC) calculated daily
post_priceAmortization method: Fixed installments with pre-fixed daily interest rate + post-fixed integrated benchmark (IPCA, CBD, ETC) with fixed period calculations (30 days)
post_price_daysAmortization method: Fixed installments with pre-fixed daily interest rate + post-fixed integrated benchmark (IPCA, CBD, ETC) calculated daily

Enumerator Credit Operation Type

EnumeratorDescription
ccbCédula de Crédito Bancário
cceCédula de Crédito à Exportação
cciCédula de Crédito Imobiliário
nceNota de Crédito à Exportação

Enumerator Interest Base

EnumeratorDescription
workdaysInterest basis: 252 days
calendar_daysInterest basis: 360 days
calendar_days_365Interest basis: 365 days

Enumerator Fee Type

Each enumerator type must be previously set and configured by QI Tech

EnumeratorDescription
tacOpening fee
spreadAdditional fee charged on credit operation
warranty_analysisWarranty analysis fee
ted_feeTED fee
spread_ted_feeTED additional fee charged on credit operation

Response

STATUS
200
Response Body
{
"data": {
"additional_iof": 469.1328,
"annual_cet": "283,3821%",
"assignment_amount": 124690.56,
"base_iof": 473.6829374063069,
"borrower": {
"document_number": "96969879003",
"name": "Alan Mathison Turing"
},
"cet": "11,8500%",
"collaterals": [],
"contract": {
"number": "0000067563/AMT",
"signature_information": [
{
"signature_url": null,
"signer_document_number": "15627918004",
"signer_email": "alan.turing@email.com",
"signer_external_key": null,
"signer_name": "Alan Mathison Turing",
"signer_role": "issuer"
}
],
"urls": [
"https://storage.googleapis.com/sandbox-doc-api/documents/5af36fcd-8e4c-4421-ad45-7bcba899c0d3/SYNGENTASANDBOX-ALAN_MATHISON_TURING-CCB-0000067563-20230302234816.pdf"
]
},
"contract_fee_amount": 1234.56,
"contract_fees": [
{
"fee_amount": 1234.56,
"fee_type": "tac"
}
],
"external_contract_fee_amount": 1234.56,
"external_contract_fees": [
{
"fee_amount": 1234.56,
"fee_type": "spread",
"net_fee_amount": 1120.36,
"tax_amount": 114.2
}
],
"installments": [
{
"accrual_reference_date": null,
"additional_costs": [],
"advanced_paid_amount": 0,
"bank_slip_key": null,
"business_due_date": "2023-04-03",
"calendar_days": 31,
"digitable_line": null,
"due_date": "2023-04-02",
"due_interest": 0,
"due_principal": 123456,
"fine_amount": null,
"has_interest": true,
"installment_history": [],
"installment_key": "da264e95-2bbd-47de-876b-bfea7d25e266",
"installment_number": 1,
"installment_payment": [],
"installment_status": "created",
"installment_type": "principal",
"original_due_principal": 123456,
"original_pre_fixed_amount": 13245.468714162304,
"original_principal_amortization_amount": 58473.151285837695,
"original_total_amount": 71718.62,
"paid_amount": 0,
"paid_at": null,
"post_fixed_amount": 0,
"pre_fixed_amount": 13245.468714162304,
"principal_amortization_amount": 58473.151285837695,
"qr_code_key": null,
"qr_code_url": null,
"renegotiation_proposal_key": null,
"tax_amount": 148.63875056859942,
"total_accrual_amount": null,
"total_amount": 71718.62,
"total_paid_amount": 0,
"workdays": 21
},
{
"accrual_reference_date": null,
"additional_costs": [],
"advanced_paid_amount": 0,
"bank_slip_key": null,
"business_due_date": "2023-05-02",
"calendar_days": 30,
"digitable_line": null,
"due_date": "2023-05-02",
"due_interest": 0,
"due_principal": 64982.848714162305,
"fine_amount": null,
"has_interest": true,
"installment_history": [],
"installment_key": "cac7064b-2310-45e1-a91f-5e8f39f0f0ea",
"installment_number": 2,
"installment_payment": [],
"installment_status": "created",
"installment_type": "principal",
"original_due_principal": 64982.848714162305,
"original_pre_fixed_amount": 6735.77577015044,
"original_principal_amortization_amount": 64982.84422984956,
"original_total_amount": 71718.62,
"paid_amount": 0,
"paid_at": null,
"post_fixed_amount": 0,
"pre_fixed_amount": 6735.77577015044,
"principal_amortization_amount": 64982.84422984956,
"qr_code_key": null,
"qr_code_url": null,
"renegotiation_proposal_key": null,
"tax_amount": 325.0441868377075,
"total_accrual_amount": null,
"total_amount": 71718.62,
"total_paid_amount": 0,
"workdays": 19
}
],
"iof_charge_method": "financed",
"issue_amount": 123456,
"net_external_contract_fee_amount": 1120.36,
"number_of_installments": 2,
"prefixed_interest_rate": {
"annual_rate": 2.32,
"created_at": "2023-03-02T23:48:15",
"daily_rate": 0.00329298,
"interest_base": "calendar_days_365",
"monthly_rate": 0.10516767
},
"requester_identifier_key": "1c2ca4dc-2a20-4dd4-bd5f-af143fadadf4",
"total_iof": 942.82,
"total_pre_fixed_amount": 19981.244484312745
},
"event_datetime": "2023-03-02 23:48:20",
"key": "1c2ca4dc-2a20-4dd4-bd5f-af143fadadf4",
"status": "waiting_signature",
"webhook_type": "debt"
}
STATUS
400
Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}