跳到主要内容

私人薪资抵押贷款手册 - 遗留合同

开发中的 API

该 API 仍处于开发阶段,因此本手册可能会有所更改。

遗留合同的再融资通过创建新债务来实现,遗留合同数据在 collateral_data 字段中提供。

要验证已录入系统的遗留合同,需查询遗留贷款。 如未找到,请联系支持团队申请录入。

由于私人薪资抵押贷款的业务规则,目前工人只能有一份活跃合同。 因此,如果工人有多份遗留合同,只有其中一份可以进行再融资。 同样,如果工人有一份活跃合同,则无法为其创建再融资。

债务创建和签署流程与创建新信贷相同。区别在于债务的核批是在合同签署后由系统自动完成的,无需人工审批,也无需查询 SCR。

1 - 遗留贷款查询

GET
/private_payroll/legacy_contracts

Query Parameters

参数类型必填描述默认值
pageinteger要返回的页码1
page_sizeinteger每页记录数100
document_numberstring无标点符号的客户 CPFN/A
信息

分页从 1 开始,因此第一页是第 1 页。

Response

STATUS
200 OK
{
"data": [
{
"legacy_contract_key": "123e4567-e89b-12d3-a456-426614174000",
"document_number": "29883927061",
"contract_number": "1234567890",
"legacy_contract_data": {
"cet": 0.0637,
"due_balance": 1935,
"total_amount": 2405.76,
"contract_type": "consigned_loan",
"interest_rate": 0.0409,
"period_amount": 129.33,
"contract_end_date": "2026-10-05",
"number_of_periods": 36,
"contract_start_date": "2023-10-06",
"registration_number": "11841",
"number_of_paid_periods": 17,
"employer_document_number": "43028211000145"
},
"status": "active"
}
],
"pagination": {
"current_page": 1,
"next_page": 2,
"rows_per_page": 100,
"total_pages": 1,
"total_rows": 1
}
}

Response Body

分页响应由合同数组(data)和分页对象(pagination)组成。

合同列表

data 数组中各项的描述:

参数类型必填描述
legacy_contract_keystring遗留合同唯一标识符
document_numberstring客户 CPF
contract_numberstring合同编号
legacy_contract_dataobject遗留合同数据
statusstring合同状态

遗留合同数据

legacy_contract_data 对象中的数据:

参数类型必填描述
cetdecimal总有效成本
due_balancedecimal未偿余额
total_amountdecimal合同总金额
contract_typestring合同类型
interest_ratedecimal利率
period_amountdecimal分期金额
contract_end_datestring合同结束日期
number_of_periodsinteger总分期数
contract_start_datestring合同开始日期
registration_numberstring员工工号
number_of_paid_periodsinteger已付分期数
employer_document_numberstring雇主 CNPJ

分页数据

pagination 对象中的数据:

参数类型必填描述
current_pageinteger当前页
next_pageinteger下一页
rows_per_pageinteger每页记录数
total_pagesinteger总页数
total_rowsinteger总记录数

2 - 删除遗留合同

通过以下端点删除遗留合同:

DELETE
/private_payroll/legacy_contract/contract_number

其中路径参数 "contract_number" 应为要删除的合同编号,以字符串格式提供。

Response

成功时将返回以下响应:

STATUS
200 OK

若指向的遗留合同不存在,将返回 NotFound 错误,错误代码为 "PRP000079"。

STATUS
404 NOT FOUND

3 - 创建再融资

遗留合同的再融资通过创建类似新信贷的债务来实现,区别在于遗留合同数据需在 collateral_data 字段中提供,如下例所示:

POST
/debt
{
"simplified": true,
"requester_identifier_key": "05a9c4cc-39d5-48fe-ab47-8f1b37d8bffb",
"purchaser_document_number": "30620610000159",
"borrower": {
"role_type": "issuer",
"person_type": "natural",
"name": "EXEMPLO",
"email": "exemplo@exemplo.com",
"individual_document_number": "48674911013",
"birth_date": "1991-01-01",
"mother_name": "MÃE DO EXEMPLO",
"phone": {
"country_code": "55",
"area_code": "11",
"number": "999999999"
},
"address": {
"street": "RUA EXEMPLO",
"number": "123",
"complement": "APTO 123",
"neighborhood": "BAIRRO EXEMPLO",
"postal_code": "12345678",
"city": "SÃO PAULO",
"state": "SP"
},
},
"disbursement_bank_accounts": [
{
"name": "EXEMPLO",
"document_number": "48674911013",
"pix_transfer_type": "key",
"pix_key": "pix03@pix03.com",
"amount_receivable": 2000
},
{
"name": "Cel-lep Ensino De Idiomas S.a.",
"document_number": "10772420000140",
"digitable_line": "32990001039000210987502864982109595090000063958",
"amount_receivable": 639.58
}
],
"financial": {
"credit_operation_type": "ccb",
"interest_type": "pre_price_days",
"interest_grace_period": 0,
"principal_grace_period": 0,
"limit_days_to_disburse": 1,
"number_of_installments": 12,
"installment_face_value": 250,
"disbursement_date": "2025-05-12",
"disbursed_amount": 2639.58,
"first_due_date": "2025-07-28",
"fine_configuration": {
"interest_base": "calendar_days",
"contract_fine_rate": 0.02,
"monthly_rate": 0.01
},
},
"collaterals": [
{
"percentage": 1,
"collateral_type": "private_payroll",
"collateral_data": {
"registration_number": "g7D1IFvUmq2s7zE9UVsV0HQwfcbHj",
"employer_document_number": "60518978000171",
"operation_category": "legacy_contract_refinancing",
"legacy_contract_numbers": ["0000001523EMP"],
}
}
]
}
信息

如有法定代理人,应在 related_parties 字段中提供,如新信贷示例所示。

{
"related_parties": [
{
"role_type": "issuer_legal_representative",
"person_type": "natural",
"name": "REPRESENTANTE EXEMPLO",
"email": "representante.exemplo@exemplo.com",
"individual_document_number": "79795844067",
"birth_date": "1970-04-20",
"mother_name": "MÃE DO REPRESENTANTE",
"phone": {
"country_code": "55",
"area_code": "11",
"number": "999999999"
},
"address": {
"street": "RUA EXEMPLO",
"number": "123",
"complement": "APTO 123",
"neighborhood": "BAIRRO EXEMPLO",
"postal_code": "12345678",
"city": "SÃO PAULO",
"state": "SP"
}
}
]
}

Response

STATUS
201 Created
Response Body
{
"webhook_type": "debt",
"key": "<Debt Key>",
"status": "waiting_signature",
"event_datetime": "2025-05-06 10:00:00",
"data": {
"borrower": {
"name": "Nome devedor",
"document_number": "58307769019",
"related_party_key": "28b7fc16-6d1f-467d-9667-62a8c13daea6"
},
"contract": {
"number": "0000644710/NDV",
"urls": [
"https://storage.googleapis.com/sandbox-doc-api/documents/a2e9c83a-3666-4def-8b27-e96fabb8705c/NOME_DEVEDOR-CCB-TST0000644710-20241107231916.pdf"
],
"signature_information": [
{
"signer_name": "Nome devedor",
"signer_document_number": "14471835092",
"signer_role": "issuer",
"signer_email": null,
"signer_external_key": null,
"signature_url": null
}
]
},
"requester_identifier_key": "05a9c4cc-39d5-48fe-ab47-8f1b37d8bffb",
"iof_charge_method": "financed",
"collaterals": [
{
"absolute_amount": null,
"collateral_constituted": false,
"collateral_data": {
"operation_category": "legacy_contract_refinancing",
"legacy_contract_number": "1234567890"
},
"collateral_key": "26c7f4f4-51f3-41fa-b880-9691211136aa",
"collateral_type": "private_payroll",
"created_at": "2024-11-07T23:19:16.413448",
"external_key": null,
"percentage": 1,
"updated_at": "2024-11-07T23:19:16.413441"
}
],
"disbursement_options": [
{
"disbursement_date": "2024-11-07",
"contract_fees": [
{
"fee_type": "spread",
"fee_amount": 4.55
},
{
"fee_type": "ted_fee",
"fee_amount": 1.5
}
],
"external_contract_fees": [
{
"fee_type": "spread",
"fee_amount": 0.0,
"tax_amount": 0.0,
"net_fee_amount": 0.0
}
],
"contract_fee_amount": 6.05,
"external_contract_fee_amount": 0.0,
"net_external_contract_fee_amount": 0.0,
"assignment_amount": 914.3,
"issue_amount": 909.75,
"cet": "2,0100%",
"annual_cet": "27,0481%",
"base_iof": 16.259002146803677,
"additional_iof": 3.45705,
"total_iof": 19.72,
"total_pre_fixed_amount": 108.6508885851,
"installments": [
{
"additional_costs": [],
"business_due_date": "2025-01-21",
"calendar_days": 74,
"due_date": "2025-01-21",
"due_interest": 0.0,
"due_principal": 909.75,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"post_fixed_amount": null,
"pre_fixed_amount": 37.1789024864,
"principal_amortization_amount": 64.6610975136,
"tax_amount": 0.3923635397125248,
"total_amount": 101.84,
"workdays": 49.0,
"installment_status": null,
"installment_type": null
},
{
"additional_costs": [],
"business_due_date": "2025-02-21",
"calendar_days": 31,
"due_date": "2025-02-21",
"due_interest": 0.0,
"due_principal": 845.0889024864,
"fine_amount": null,
"has_interest": true,
"installment_number": 2,
"post_fixed_amount": null,
"pre_fixed_amount": 14.2997636051,
"principal_amortization_amount": 87.5402363949,
"tax_amount": 0.753721435360089,
"total_amount": 101.84,
"workdays": 23.0,
"installment_status": null,
"installment_type": null
},
{
"additional_costs": [],
"business_due_date": "2025-03-21",
"calendar_days": 28,
"due_date": "2025-03-21",
"due_interest": 0.0,
"due_principal": 757.5486660915,
"fine_amount": null,
"has_interest": true,
"installment_number": 3,
"post_fixed_amount": null,
"pre_fixed_amount": 11.5685715131,
"principal_amortization_amount": 90.2714284869,
"tax_amount": 0.9845001990781314,
"total_amount": 101.84,
"workdays": 18.0,
"installment_status": null,
"installment_type": null
}
],
"first_due_date": "2025-01-21",
"prefixed_interest_rate": {
"monthly_rate": 0.0166,
"daily_rate": 0.00054142,
"annual_rate": 0.21843191,
"interest_base": "calendar_days_365"
}
}
]
}
}