FGTS 周年提款手册
QI Tech 的 webhook 不应以严格方式映射。 返回的 webhook payload 中可能会包含额外字段。
您可以按照文档中的详细说明查询和重发 webhook:Webhook 重发。
本手册描述了 FGTS 周年提款预付款操作(以 FGTS 周年提款作为担保的个人信用)的查询、模拟、发行、放款及其他操作步骤。
前提条件
1 - 借款人必须选择 FGTS 周年提款模式;
2 - 借款人必须授权 QI 在 CEF(联邦储蓄银行)应用程序中查询其 FGTS 余额;
1 - 查询可用余额
1.1. 执行余额查询:
Request
Request Body
{
"document_number": "06568225037"
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
document_number | string(11) | 是 | 借款人 CPF |
余额查询成功后,主要返回活跃合同数量以及受益人的 FGTS 余额是否可用。
Response
Response Body
{
"available_balance_key": "7521981f-0b06-43d2-9a75-d3a1f215fbbf",
"document_number": "06568225037",
"status": "pending",
"status_events": [{
"event_datetime": "2022-12-26T13:36:16",
"status": "pending"
}]
}
| 字段 | 类型 | 描述 |
|---|---|---|
available_balance_key | string (UUID) | 余额查询的唯一键 |
document_number | string(11) | 借款人 CPF |
status | string | 查询状态(pending、success、failed) |
status_events[] | array | 状态事件历史 |
status_events[].event_datetime | string (datetime) | 事件日期/时间 |
status_events[].status | string | 事件状态 |
1.1.1. 若在 CEF 中余额查询成功,合作伙伴将收到以下 webhook:
Webhooks
Body
{
"webhook_type": "available_balance",
"event_datetime": "2022-12-26T13:36:16",
"key": "7521981f-0b06-43d2-9a75-d3a1f215fbbf",
"status": "success",
"data": {
"reference_date": "2022-07-28",
"periods": [{
"due_date": "2022-08-01",
"amount": 500.1
},
{
"due_date": "2023-08-01",
"amount": 400.2
}
]
}
}
| 字段 | 类型 | 描述 |
|---|---|---|
webhook_type | string | Webhook 类型(available_balance) |
event_datetime | string (datetime) | 事件日期/时间 |
key | string (UUID) | 余额查询键 |
status | string | 状态(success) |
data.reference_date | string (date) | 余额参考日期 |
data.periods[] | array | 可用提款期 |
data.periods[].due_date | string (date) | 提款到期日 |
data.periods[].amount | number | 该期可提款金额 |
1.1.2. 若在 CEF 中余额查询失败,合作伙伴将收到以下 webhook:
Body
{
"webhook_type": "available_balance",
"event_datetime": "2022-12-26T13:36:16",
"key": "7521981f-0b06-43d2-9a75-d3a1f215fbbf",
"status": "failed",
"data": {
"error_description": "Client does not have membership for anniversary withdraw on current date",
"error_enumerator": "inexistent_anniversary_membership"
}
}
| 字段 | 类型 | 描述 |
|---|---|---|
webhook_type | string | Webhook 类型(available_balance) |
event_datetime | string (datetime) | 事件日期/时间 |
key | string (UUID) | 余额查询键 |
status | string | 状态(failed) |
data.error_description | string | 错误描述 |
data.error_enumerator | string | 错误枚举值 |
1.1.3. 若因操作日期不被允许而导致在 CEF 中余额查询失败,合作伙伴将在 "data" 字段中收到包含额外信息的 webhook:
Body
{
"webhook_type": "available_balance",
"event_datetime": "2022-12-26T13:36:16",
"key": "7521981f-0b06-43d2-9a75-d3a1f215fbbf",
"status": "failed",
"data": {
"error_description": "Not permitted action on current date",
"error_enumerator": "on_locked_date_range",
"error_data": {
"operation_not_allowed_until_date": "2023-01-03"
}
}
}
| 字段 | 类型 | 描述 |
|---|---|---|
webhook_type | string | Webhook 类型(available_balance) |
event_datetime | string (datetime) | 事件日期/时间 |
key | string (UUID) | 余额查询键 |
status | string | 状态(failed) |
data.error_description | string | 错误描述 |
data.error_enumerator | string | 错误枚举值 |
data.error_data.operation_not_allowed_until_date | string (date) | 操作被允许的起始日期 |
余额查询失败的可能枚举值列于第 2 节。
1.2. 查询特定余额查询的结果:
可以使用创建时返回的键(available_balance_key)查询已执行余额查询的结果。
Request
Response
Response Body
{
"available_balance_key": "7521981f-0b06-43d2-9a75-d3a1f215fbbf",
"document_number": "06568225037",
"status": "success",
"reference_date": "2022-07-28",
"number_of_active_contracts": 0,
"has_unavailable_balance": false,
"periods": [
{
"due_date": "2022-08-01",
"amount": 500.1
},
{
"due_date": "2023-08-01",
"amount": 400.2
}
],
"has_succeeded": true,
"error_message": null
}
| 字段 | 类型 | 描述 |
|---|---|---|
available_balance_key | string (UUID) | 余额查询的唯一键 |
document_number | string(11) | 借款人 CPF |
status | string | 查询状态(success、pending、failed) |
reference_date | string (date) | 余额参考日期 |
number_of_active_contracts | integer | FGTS 活跃合同数量 |
has_unavailable_balance | boolean | 是否存在不可用余额 |
periods[] | array | 可用提款期 |
periods[].due_date | string (date) | 提款到期日 |
periods[].amount | number | 可提款金额 |
has_succeeded | boolean | 查询是否成功 |
error_message | string/null | 错误信息(如有) |
1.3. 取消待处理的余额查询:
如需取消状态为 pending 的余额查询,请使用以下端点。
Request
Response
该端点返回状态码 204,响应体为空。
在 Playground 中测试2 - 在 Sandbox 中模拟余额查询的成功与失败场景:
2.1. 对于以 0、1、2、3、4、5、6 和 7 开头的 CPF,将通过 Webhook(1.1.1.)返回异步成功响应。
2.2. 对于以 8 开头的 CPF,余额查询将返回异步成功响应(1.1.1.),但期数为零,可用于测试。
2.3. 模拟可用余额查询失败的情况:
所有以 9 开头的 CPF 查询都将通过 webhook(1.1.2. 或 1.1.3.)返回异步错误响应,包含以下错误之一。
以下是在 Sandbox 中测试失败案例的模拟,使用借款人文档前几位数字的逻辑:
| CPF 开头 | error_enumerator | error_description |
|---|---|---|
| 90 | ongoing_operation | There's an ongoing operation |
| 91 | unauthorized_institution | Institution isn't authorized by the client |
| 92, 920 | inexistent_anniversary_membership | Client does not have membership for anniversary withdraw on current date |
| 93 | on_locked_date_range | Not permitted action on current date |
| 94 | anniversary_membership_egress | Client moving away from anniversary membership. It need to be canceled before requesting a reserve |
| 95, 950 | processing_pending_changes | Changes on profile info happened on client's FGTS account |
| 96, 97, 98, 99 | caixa_error | Request wasn't able to process due to an error on CEF |
3 - 余额查询的跟踪与处理措施
查询结果应触发合作伙伴的相应操作,以准确引导客户并避免我们队列中积压丢失的请求。
| 枚举值 | error_description | 描述 | QI 处理措施 | 客户处理措施 |
|---|---|---|---|---|
| ongoing_operation | There's an ongoing operation | 该 CPF 在 Caixa 存在进行中的操作,影响客户余额变更,导致无法提供精确分期金额 | 发送包含对应枚举值和描述的 webhook | 建议等待后重试 |
| unauthorized_institution | Institution isn't authorized by the client | 机构未获客户授权 | 发送包含对应枚举值和描述的 webhook | 引导客户在 FGTS APP 授权"QI SOCIEDADE DE CREDITO S.A"操作 FGTS 周年提款预付款 |
| inexistent_anniversary_membership | Client does not have membership for anniversary withdraw on current date | 劳动者在当前日期未加入周年提款模式 | 发送包含对应枚举值和描述的 webhook | 需要引导客户在 FGTS APP 中加入周年提款模式 |
| on_locked_date_range | Not permitted action on current date | 当前日期不允许该操作 | 发送包含对应枚举值和描述的 webhook | 该操作在下月第二个工作日才被允许。需告知客户,目前在任何金融机构均无法完成该操作 |
| anniversary_membership_egress | Client moving away from anniversary membership. It need to be canceled before requesting a reserve | 劳动者申请退出周年提款模式,须先取消后方可申请担保 | 发送包含对应枚举值和描述的 webhook | 告知客户其已申请退出周年提款模式,这将阻止其提前提款 |
| processing_pending_changes | Changes on profile info happened on client's FGTS account | 因周年提款支付流程存在待处理事项,操作不被允许 | 发送包含对应枚举值和描述的 webhook | 引导客户等待问题处理完成 |
| caixa_error | Request wasn't able to process due to an error on CEF | 因 Caixa 返回错误,请求未能完成 | 发送包含对应枚举值和描述的 webhook | 建议等待后重试 |
在生产环境中,余额查询具有重试机制,取决于 CEF 在查询时返回的错误。 部分错误可以重试,而上述错误为最终错误,不会将查询重新放入异步重试队列。
4 - 最大金额模拟
获取余额查询(第 1 节)返回的每期(每年)可用提款金额后,即可模拟 FGTS 周年提款预付款操作。
本节展示的模拟方式,显示了借款人预付 100% 可用分期金额时可签约的最大金额。
Request
Request Body
{
"borrower": {
"person_type": "natural",
"individual_document_number": "46338864879"
},
"financial": {
"desired_installments": [{
"total_amount": 5448.42,
"due_date": "2023-10-01"
},
{
"total_amount": 2811.86,
"due_date": "2024-10-01"
}
],
"interest_type": "pre_price_days",
"disbursement_date": "2023-06-30",
"fine_configuration": {
"monthly_rate": 0,
"interest_base": "calendar_days",
"contract_fine_rate": 0
},
"annual_interest_rate": 0.274223,
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"number_of_installments": 2,
"principal_grace_period": 0
}
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
borrower | object | 是 | 借款人数据 |
borrower.person_type | string | 是 | 人员类型(natural) |
borrower.individual_document_number | string(11) | 是 | 借款人 CPF |
financial | object | 是 | 操作财务数据 |
financial.desired_installments[] | array | 是 | 期望分期(余额查询返回的金额) |
financial.desired_installments[].total_amount | number | 是 | 分期总金额 |
financial.desired_installments[].due_date | string (date) | 是 | 分期到期日 |
financial.interest_type | string | 是 | 利息类型(pre_price_days) |
financial.disbursement_date | string (date) | 是 | 放款日期 |
financial.fine_configuration | object | 是 | 罚款配置 |
financial.annual_interest_rate | number | 是 | 年利率 |
financial.credit_operation_type | string | 是 | 信用操作类型(ccb) |
financial.interest_grace_period | integer | 是 | 利息宽限期 |
financial.number_of_installments | integer | 是 | 分期数 |
financial.principal_grace_period | integer | 是 | 本金宽限期 |
Response
Response Body
{
"data": {
"annual_cet": 0.3339086001603759,
"assignment_amount": 7195.39,
"cet": 0.0243,
"contract_fee_amount": 43.17,
"contract_fees": [
{
"amount": 0.6,
"amount_type": "percentage",
"fee_amount": 43.17,
"fee_type": "tac"
}
],
"credit_operation_type": "ccb",
"disbursed_issue_amount": 7020.82,
"disbursement_date": "2023-06-30",
"disbursement_options": [
{
"annual_cet": 0.3339086001603759,
"assignment_amount": 7195.39,
"cet": 0.0243,
"contract_fee_amount": 43.17,
"contract_fees": [
{
"amount": 0.6,
"amount_type": "percentage",
"fee_amount": 43.17,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 7020.82,
"disbursement_date": "2023-06-30",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
},
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
}
],
"first_due_date": "2023-10-01",
"installments": [
{
"business_due_date": "2023-10-02",
"calendar_days": 93,
"due_date": "2023-10-01",
"due_principal": 7195.39,
"has_interest": true,
"installment_number": 1,
"post_fixed_amount": null,
"pre_fixed_amount": 458.290020805,
"principal_amortization_amount": 4990.129979195,
"tax_amount": 38.05473122134107,
"total_amount": 5448.42,
"workdays": 64.0
},
{
"business_due_date": "2024-10-01",
"calendar_days": 366,
"due_date": "2024-10-01",
"due_principal": 2205.260020805,
"has_interest": true,
"installment_number": 2,
"post_fixed_amount": null,
"pre_fixed_amount": 606.5994412243,
"principal_amortization_amount": 2205.2605587757,
"tax_amount": 66.0034485241567,
"total_amount": 2811.86,
"workdays": 252.0
}
],
"iof_amount": 131.4,
"issue_amount": 7195.39,
"net_external_contract_fee_amount": 0.0,
"prefixed_interest_rate": {
"annual_rate": 0.274223,
"daily_rate": 0.00066416,
"interest_base": "calendar_days_365",
"monthly_rate": 0.02040001
},
"total_pre_fixed_amount": 1064.8894620293
}
],
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
},
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
}
],
"final_disbursement_amount": 7020.82,
"installments": [
{
"business_due_date": "2023-10-02",
"calendar_days": 93,
"due_date": "2023-10-01",
"due_principal": 7195.39,
"has_interest": true,
"installment_number": 1,
"post_fixed_amount": null,
"pre_fixed_amount": 458.290020805,
"principal_amortization_amount": 4990.129979195,
"tax_amount": 38.05473122134107,
"total_amount": 5448.42,
"workdays": 64.0
},
{
"business_due_date": "2024-10-01",
"calendar_days": 366,
"due_date": "2024-10-01",
"due_principal": 2205.260020805,
"has_interest": true,
"installment_number": 2,
"post_fixed_amount": null,
"pre_fixed_amount": 606.5994412243,
"principal_amortization_amount": 2205.2605587757,
"tax_amount": 66.0034485241567,
"total_amount": 2811.86,
"workdays": 252.0
}
],
"interest_grace_period": 0,
"interest_payment_month_period": 1,
"interest_type": "pre_price_days",
"iof_amount": 131.4,
"issue_amount": 7195.39,
"issue_date": "2023-06-30",
"net_external_contract_fee_amount": 0.0,
"number_of_installments": 2,
"operation_type": "structured_operation",
"post_fixed_interest_base": "workdays",
"post_fixed_interest_rate": null,
"prefixed_interest_rate": {
"annual_rate": 0.274223,
"daily_rate": 0.00066416,
"interest_base": "calendar_days_365",
"monthly_rate": 0.02040001
},
"principal_amortization_month_period": 1,
"principal_grace_period": 0,
"requester_key": "a5c043d3-dec3-4f8d-aa14-01dc9ba85783",
"total_pre_fixed_amount": 1064.8894620293
},
"event_datetime": "2023-06-28 14:07:47",
"key": "9e532b37-e301-4646-80b7-afd8a3d60f51",
"status": "finished",
"type": "debt"
}
5 - 目标金额模拟
本节展示的模拟方式,显示了借款人为放款指定金额需要预付的 FGTS 周年提款分期金额。
Request
Request Body
{
"borrower": {
"person_type": "natural",
"individual_document_number": "46338864879"
},
"target_disbursed_amount": 4000,
"financial": {
"desired_installments": [{
"total_amount": 5448.42,
"due_date": "2023-10-01"
}],
"interest_type": "pre_price_days",
"disbursement_date": "2023-06-30",
"fine_configuration": {
"monthly_rate": 0,
"interest_base": "calendar_days",
"contract_fine_rate": 0
},
"annual_interest_rate": 0.27422288066567435,
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"number_of_installments": 1,
"principal_grace_period": 0
}
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
borrower | object | 是 | 借款人数据 |
borrower.person_type | string | 是 | 人员类型(natural) |
borrower.individual_document_number | string(11) | 是 | 借款人 CPF |
target_disbursed_amount | number | 是 | 期望放款金额 |
financial | object | 是 | 操作财务数据 |
financial.desired_installments[] | array | 是 | 分期(余额查询返回的最大金额) |
financial.desired_installments[].total_amount | number | 是 | 分期总金额 |
financial.desired_installments[].due_date | string (date) | 是 | 分期到期日 |
financial.interest_type | string | 是 | 利息类型(pre_price_days) |
financial.disbursement_date | string (date) | 是 | 放款日期 |
financial.fine_configuration | object | 是 | 罚款配置 |
financial.annual_interest_rate | number | 是 | 年利率 |
financial.credit_operation_type | string | 是 | 信用操作类型(ccb) |
financial.interest_grace_period | integer | 是 | 利息宽限期 |
financial.number_of_installments | integer | 是 | 分期数 |
financial.principal_grace_period | integer | 是 | 本金宽限期 |
"financial.desired_installments" 对象中分期列表里的分期金额应为查询返回的金额。这些金额将在模拟中用作分期的最大金额。
Response
Response Body
{
"data": {
"annual_cet": 0.3655007620895273,
"assignment_amount": 4070.94,
"cet": 0.0263,
"contract_fee_amount": 24.43,
"contract_fees": [
{
"amount": 0.6,
"amount_type": "percentage",
"fee_amount": 24.43,
"fee_type": "tac"
}
],
"credit_operation_type": "ccb",
"disbursed_issue_amount": 4000.0,
"disbursement_date": "2023-06-30",
"disbursement_options": [
{
"annual_cet": 0.3655007620895273,
"assignment_amount": 4070.94,
"cet": 0.0263,
"contract_fee_amount": 24.43,
"contract_fees": [
{
"amount": 0.6,
"amount_type": "percentage",
"fee_amount": 24.43,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 4000.0,
"disbursement_date": "2023-06-30",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
},
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
}
],
"first_due_date": "2023-10-01",
"installments": [
{
"business_due_date": "2023-10-02",
"calendar_days": 93,
"due_date": "2023-10-01",
"due_principal": 4070.94,
"has_interest": true,
"installment_number": 1,
"post_fixed_amount": null,
"pre_fixed_amount": 259.2870755335,
"principal_amortization_amount": 4070.9429244665,
"tax_amount": 31.045010741981528,
"total_amount": 4330.23,
"workdays": 64.0
}
],
"iof_amount": 46.51,
"issue_amount": 4070.94,
"net_external_contract_fee_amount": 0.0,
"prefixed_interest_rate": {
"annual_rate": 0.27422288,
"daily_rate": 0.00066416,
"interest_base": "calendar_days_365",
"monthly_rate": 0.0204
},
"total_pre_fixed_amount": 259.2870755335
}
],
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
},
{
"amount": 0.0,
"amount_released": 0,
"amount_type": "absolute",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"irrf_amount": 0,
"net_fee_amount": 0.0,
"pis_amount": 0,
"tax_amount": 0.0
}
],
"final_disbursement_amount": 4000.0,
"installments": [
{
"business_due_date": "2023-10-02",
"calendar_days": 93,
"due_date": "2023-10-01",
"due_principal": 4070.94,
"has_interest": true,
"installment_number": 1,
"post_fixed_amount": null,
"pre_fixed_amount": 259.2870755335,
"principal_amortization_amount": 4070.9429244665,
"tax_amount": 31.045010741981528,
"total_amount": 4330.23,
"workdays": 64.0
}
],
"interest_grace_period": 0,
"interest_payment_month_period": 1,
"interest_type": "pre_price_days",
"iof_amount": 46.51,
"issue_amount": 4070.94,
"issue_date": "2023-06-30",
"net_external_contract_fee_amount": 0.0,
"number_of_installments": 1,
"operation_type": "structured_operation",
"post_fixed_interest_base": "workdays",
"post_fixed_interest_rate": null,
"prefixed_interest_rate": {
"annual_rate": 0.27422288,
"daily_rate": 0.00066416,
"interest_base": "calendar_days_365",
"monthly_rate": 0.0204
},
"principal_amortization_month_period": 1,
"principal_grace_period": 0,
"requester_key": "a5c043d3-dec3-4f8d-aa14-01dc9ba85783",
"total_pre_fixed_amount": 259.2870755335
},
"event_datetime": "2023-06-28 14:11:15",
"key": "aa0d581b-4332-40e1-adad-0c7724dc880a",
"status": "finished",
"type": "debt"
}
6 - 创建操作
创建 FGTS 周年提款操作需要在请求中提供 4 个对象:
-
borrower:债务借款人(Borrower 对象)
-
collaterals:付款分期信息(FGTS Collateral 对象)
-
financial:操作财务流数据(FGTS 财务对象),与模拟中提供的对象相同。
-
disbursement_bank_account:放款银行账户信息(银行账户对象)
FGTS 周年提款操作合同 PDF 将由 QI 在此时生成并在请 求响应中返回。
对于 "financial.desired_installments" 对象的分期列表中的分期金额,使用 "total_amount" 字段;对于 "collaterals.collateral_data.periods" 对象中的分期金额,使用 "amount" 字段。
Request
Request Body
{
"borrower": {
"person_type": "natural",
"name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"mother_name": "HELENA DO NASCIMENTO PEREIRA DA SILVA",
"birth_date": "1997-10-28",
"profession": "Outros",
"nationality": "brasileira",
"marital_status": "married",
"is_pep": false,
"individual_document_number": "46338864879",
"document_identification_number": "46338864879",
"document_identification_type": "rg",
"document_identification_date": "2023-12-29",
"document_identification": "494598fd-c226-4332-a500-591ae3884673",
"document_identification_back": "494598fd-c226-4332-a500-591ae3884673",
"email": "naotem@gmail.com",
"phone": {
"country_code": "055",
"area_code": "11",
"number": "989073010"
},
"address": {
"street": "Rua José Castrioto",
"state": "SP",
"city": "São José dos Campos",
"neighborhood": "Parque Nova Esperança",
"number": "147",
"postal_code": "12226160",
"complement": "CASA"
}
},
"additional_data": null,
"collaterals": [
{
"collateral_type": "fgts_balance",
"collateral_data": {
"periods": [
{
"due_date": "2024-05-02",
"amount": 1758.2
}
]
},
"percentage": 1
}
],
"financial": {
"desired_installments": [
{
"due_date": "2024-05-02",
"total_amount": 1758.2
}
],
"interest_type": "pre_price_days",
"disbursement_start_date": "2024-01-17",
"disbursement_end_date": "2024-01-22",
"fine_configuration": {
"monthly_rate": 0.01,
"contract_fine_rate": 0.01,
"interest_base": "calendar_days"
},
"monthly_interest_rate": 0.018,
"credit_operation_type": "ccb",
"interest_grace_period": 0,
"number_of_installments": 11,
"principal_grace_period": 0,
"issue_date": "2024-01-17"
},
"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
}
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
borrower | object | 是 | 借款人完整数据 |
borrower.person_type | string | 是 | 人员类型(natural) |
borrower.name | string | 是 | 全名 |
borrower.mother_name | string | 是 | 母亲姓名 |
borrower.birth_date | string (date) | 是 | 出生日期 |
borrower.individual_document_number | string(11) | 是 | CPF |
borrower.document_identification_number | string | 是 | 身份证件号码 |
borrower.document_identification_type | string | 是 | 证件类型(rg、cnh 等) |
borrower.document_identification_date | string (date) | 是 | 证件签发日期 |
borrower.document_identification | string (UUID) | 是 | 证件键(正面) |
borrower.document_identification_back | string (UUID) | 否 | 证件键(背面) |
borrower.email | string | 是 | 借款人电子邮件 |
borrower.phone | object | 是 | 借款人电话 |
borrower.address | object | 是 | 借款人地址 |
collaterals[] | array | 否 | FGTS 担保数据 |
collaterals[].collateral_type | string | 是 | 担保类型(fgts_balance) |
collaterals[].collateral_data.periods[] | array | 是 | 提款期 |
collaterals[].percentage | number | 是 | 担保比例 |
financial | object | 是 | 财务数据(与模拟中的对象相同) |
financial.desired_installments[] | array | 是 | 期望分期 |
financial.disbursement_start_date | string (date) | 是 | 放款开始日期 |
financial.disbursement_end_date | string (date) | 是 | 放款结束日期 |
financial.monthly_interest_rate | number | 是 | 月利率 |
financial.issue_date | string (date) | 是 | 签发日期 |
disbursement_bank_account | object | 是 | 放款银行账户 |
disbursement_bank_account.ispb_number | string | 是 | 银行 ISPB |
disbursement_bank_account.branch_number | string | 是 | 支行号码 |
disbursement_bank_account.account_number | string | 是 | 账户号码 |
disbursement_bank_account.account_digit | string | 是 | 账户校验位 |
disbursement_bank_account.document_number | string | 是 | 账户持有人 CPF |
disbursement_bank_account.name | string | 是 | 账户持有人姓名 |
Response
Response Body
{
"data": {
"borrower": {
"document_number": "46338864879",
"name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"related_party_key": "824e4338-5b22-4e78-84db-94a23c56bf49"
},
"collaterals": [
{
"absolute_amount": null,
"collateral_constituted": false,
"collateral_data": {
"document_number": "46338864879",
"error_message": "None",
"periods": [
{
"amount": 1758.2,
"due_date": "2024-05-02"
}
],
"protocol_number": null,
"reservation_request_closure_status": null,
"reservation_request_closure_status_translation": null,
"reservation_request_key": "1b6ce462-3a28-4601-bd27-ce8ce6b50781",
"reservation_request_status": "pending",
"reservation_request_status_translation": "Em Teimosinha"
},
"collateral_key": "01f511ee-3409-44f8-adb9-31fbeab87b27",
"collateral_type": "fgts_balance",
"created_at": "2024-01-17T14:59:35.434402",
"external_key": "1b6ce462-3a28-4601-bd27-ce8ce6b50781",
"percentage": 1,
"updated_at": "2024-01-17T14:59:35.434387"
}
],
"contract": {
"number": "0000083262/PAD",
"signers": [
{
"signature_url": null,
"signer_document_number": "46338864879",
"signer_email": "naotem@gmail.com",
"signer_external_key": null,
"signer_name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"signer_role": "issuer"
}
],
"urls": [
"https://storage.googleapis.com/sandbox-doc-api/documents/cb10aaac-a6da-4742-b86f-60726d9f6ce7/TESTEINSSS.A.-PATRICIA_APARECIDA_DO_NASCIMENTO_PEREIRA_DA_SILVA-CCB-0000083262-20240117145936.pdf"
]
},
"disbursement_options": [
{
"additional_iof": 6.278436,
"annual_cet": "31,6323%",
"assignment_amount": 1652.22,
"base_iof": 14.361093768373301,
"cet": "2,3200%",
"contract_fee_amount": 8.26,
"contract_fees": [
{
"fee_amount": 8.26,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 1623.32,
"disbursement_date": "2024-01-17",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "insurance_premium",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
}
],
"first_due_date": "2024-05-02",
"installments": [
{
"additional_costs": [],
"business_due_date": "2024-05-02",
"calendar_days": 106,
"due_date": "2024-05-02",
"due_interest": 0.0,
"due_principal": 1652.22,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 105.9802843565,
"principal_amortization_amount": 1652.2197156435,
"tax_amount": 14.361093768373301,
"total_amount": 1758.2,
"workdays": 72.0
}
],
"issue_amount": 1652.22,
"net_external_contract_fee_amount": 0.0,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.23872053,
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"total_iof": 20.64,
"total_pre_fixed_amount": 105.9802843565
},
{
"additional_iof": 6.282122,
"annual_cet": "31,6725%",
"assignment_amount": 1653.19,
"base_iof": 14.233957774255675,
"cet": "2,3200%",
"contract_fee_amount": 8.27,
"contract_fees": [
{
"fee_amount": 8.27,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 1624.4,
"disbursement_date": "2024-01-18",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "insurance_premium",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
}
],
"first_due_date": "2024-05-02",
"installments": [
{
"additional_costs": [],
"business_due_date": "2024-05-02",
"calendar_days": 105,
"due_date": "2024-05-02",
"due_interest": 0.0,
"due_principal": 1653.19,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 105.0109437566,
"principal_amortization_amount": 1653.1890562434,
"tax_amount": 14.233957774255675,
"total_amount": 1758.2,
"workdays": 71.0
}
],
"issue_amount": 1653.19,
"net_external_contract_fee_amount": 0.0,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.23872053,
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"total_iof": 20.52,
"total_pre_fixed_amount": 105.0109437566
},
{
"additional_iof": 6.285808,
"annual_cet": "31,7080%",
"assignment_amount": 1654.16,
"base_iof": 14.10666765817373,
"cet": "2,3200%",
"contract_fee_amount": 8.27,
"contract_fees": [
{
"fee_amount": 8.27,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 1625.5,
"disbursement_date": "2024-01-19",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "insurance_premium",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
}
],
"first_due_date": "2024-05-02",
"installments": [
{
"additional_costs": [],
"business_due_date": "2024-05-02",
"calendar_days": 104,
"due_date": "2024-05-02",
"due_interest": 0.0,
"due_principal": 1654.16,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 104.0410344543,
"principal_amortization_amount": 1654.1589655457,
"tax_amount": 14.10666765817373,
"total_amount": 1758.2,
"workdays": 70.0
}
],
"issue_amount": 1654.16,
"net_external_contract_fee_amount": 0.0,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.23872053,
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"total_iof": 20.39,
"total_pre_fixed_amount": 104.0410344543
},
{
"additional_iof": 6.289494,
"annual_cet": "31,7502%",
"assignment_amount": 1655.13,
"base_iof": 13.979223283044265,
"cet": "2,3200%",
"contract_fee_amount": 8.28,
"contract_fees": [
{
"fee_amount": 8.28,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 1626.58,
"disbursement_date": "2024-01-20",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "insurance_premium",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
}
],
"first_due_date": "2024-05-02",
"installments": [
{
"additional_costs": [],
"business_due_date": "2024-05-02",
"calendar_days": 103,
"due_date": "2024-05-02",
"due_interest": 0.0,
"due_principal": 1655.13,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 103.070556116,
"principal_amortization_amount": 1655.129443884,
"tax_amount": 13.979223283044265,
"total_amount": 1758.2,
"workdays": 70.0
}
],
"issue_amount": 1655.13,
"net_external_contract_fee_amount": 0.0,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.23872053,
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"total_iof": 20.27,
"total_pre_fixed_amount": 103.070556116
},
{
"additional_iof": 6.29318,
"annual_cet": "31,7877%",
"assignment_amount": 1656.1,
"base_iof": 13.851624511675489,
"cet": "2,3300%",
"contract_fee_amount": 8.28,
"contract_fees": [
{
"fee_amount": 8.28,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 1627.68,
"disbursement_date": "2024-01-21",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "insurance_premium",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
}
],
"first_due_date": "2024-05-02",
"installments": [
{
"additional_costs": [],
"business_due_date": "2024-05-02",
"calendar_days": 102,
"due_date": "2024-05-02",
"due_interest": 0.0,
"due_principal": 1656.1,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 102.099508408,
"principal_amortization_amount": 1656.100491592,
"tax_amount": 13.851624511675489,
"total_amount": 1758.2,
"workdays": 70.0
}
],
"issue_amount": 1656.1,
"net_external_contract_fee_amount": 0.0,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.23872053,
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"total_iof": 20.14,
"total_pre_fixed_amount": 102.099508408
},
{
"additional_iof": 6.296866,
"annual_cet": "31,8319%",
"assignment_amount": 1657.07,
"base_iof": 13.723871206771127,
"cet": "2,3300%",
"contract_fee_amount": 8.29,
"contract_fees": [
{
"fee_amount": 8.29,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 1628.76,
"disbursement_date": "2024-01-22",
"external_contract_fee_amount": 0.0,
"external_contract_fees": [
{
"description": null,
"fee_amount": 0.0,
"fee_type": "spread",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "tac",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
},
{
"description": null,
"fee_amount": 0.0,
"fee_type": "insurance_premium",
"net_fee_amount": 0.0,
"rebate_bank_account": null,
"tax_amount": 0.0
}
],
"first_due_date": "2024-05-02",
"installments": [
{
"additional_costs": [],
"business_due_date": "2024-05-02",
"calendar_days": 101,
"due_date": "2024-05-02",
"due_interest": 0.0,
"due_principal": 1657.07,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 101.127890996,
"principal_amortization_amount": 1657.072109004,
"tax_amount": 13.723871206771127,
"total_amount": 1758.2,
"workdays": 69.0
}
],
"issue_amount": 1657.07,
"net_external_contract_fee_amount": 0.0,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.23872053,
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"total_iof": 20.02,
"total_pre_fixed_amount": 101.127890996
}
],
"entry": null,
"iof_charge_method": "financed",
"prefixed_interest_rate": {
"annual_rate": 0.23872053,
"created_at": "2024-01-17T14:59:35",
"daily_rate": 0.00058669,
"interest_base": "calendar_days_365",
"monthly_rate": 0.018
},
"requester_identifier_key": "2fedb18e-207b-4bb5-954a-0e6e19bb6e50"
},
"event_datetime": "2024-01-17 14:59:40",
"key": "2fedb18e-207b-4bb5-954a-0e6e19bb6e50",
"status": "waiting_signature",
"webhook_type": "debt"
}
7 - 操作正式化
默认情况下,QI Tech 通过 QI Sign 收集签名,合同在发行时发送给签署人。但合作伙伴也可以独立收集签名,并将已签名的文件或签名证据发送给 QI Tech 以继续操作。
接受的签名类型
QI Sign
通过 QI Sign 签名在 QI Tech 平台上自动进行。一旦创建操作,文件就会通过 QI Sign 发送收集签名,签名完成后操作会自动更改状态,等待放款。
pdf-signature
此类型表示通过 "/debt" 发行的 PDF 将被签名,已签名 PDF 的链接将通过 API 4.1 作为认证方式发送。
Request
Request Body
{
"type": "pdf-signature",
"path-pdf-signed": "https://www.google.com/"
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
type | string | 是 | 签名类型(pdf-signature) |
path-pdf-signed | string (URL) | 是 | 已签名 PDF 的 URL |
Response
Response Body
{
"data": {},
"event_datetime": "2023-01-17 17:17:28",
"key": "4630cd58-ab00-49b3-b8cb-cb0f4a5af7a4",
"status": "signature_received",
"webhook_type": "debt"
}
| 字段 | 类型 | 描述 |
|---|---|---|
data | object | 附加数据(签名为空) |
event_datetime | string (datetime) | 事件日期/时间 |
key | string (UUID) | 操作键 |
status | string | 状态(signature_received) |
webhook_type | string | Webhook 类型(debt) |
data-signature
此类型表示通过 "/debt" 发行的 PDF 将通过附加在最后一页的哈希值进行签名。
数据认证可分为 3 种类型:
- Opt-in
通过 opt-in 签名意味着客户将通过前端接受合同。
为使此签名有效,必须强制发送某些数据。
Request
Request Body
{
"type": "data-signature",
"signatures": [{
"signed_object": {
"document_key": "095bd363-a5be-4561-955d-f199bf664972",
"document_md5": "06d19d6664f20a73158d277d41c8c7d3",
"raw_text": "Lorem ipsum dolor sit amet, consectetur a...."
},
"authenticity": {
"timestamp": "1970-01-01 00:00:01",
"ip_address": "179.104.42.245",
"session_id": "ddb1d063-4fdf-4430-af9c-3316e9142ff3",
"fingerprint": {
"lat": -7.205088,
"long": -48.2414106,
"name": "SM-A015M",
"model": "SM-A015M",
"calendar": "AM",
"regionCode": "BR",
"systemName": "Android",
"orientation": "Portrait",
"currencyCode": "BRL",
"languageCode": "pt",
"systemVersion": "11",
"userinterface": "Android",
"localizedModel": "SM-A015M",
"decimalSeparator": ",",
"usesMetricSystem": "true",
"preferredLanguages": "pt-BR,en-BR",
"supportsMultiTasking": "true"
}
},
"signer": {
"name": "VITOR",
"email": "vitor.castello@qitech.com.br",
"phone": {
"country_code": "055",
"area_code": "11",
"number": "999999999"
},
"document_number": "645236363652"
},
"authentication_type": "opt_in"
}]
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
type | string | 是 | 签名类型(data-signature) |
signatures[] | array | 是 | 签名列表 |
signatures[].signed_object.document_key | string (UUID) | 是 | 文件键 |
signatures[].signed_object.document_md5 | string | 是 | 文件 MD5 哈希 |
signatures[].signed_object.raw_text | string | 是 | 合同文本 |
signatures[].authenticity.timestamp | string (datetime) | 是 | 签名时间戳 |
signatures[].authenticity.ip_address | string | 是 | 签署人 IP 地址 |
signatures[].authenticity.session_id | string (UUID) | 否 | 会话 ID |
signatures[].authenticity.fingerprint | object | 否 | 设备数据 |
signatures[].signer.name | string | 是 | 签署人姓名 |
signatures[].signer.email | string | 是 | 签署人电子邮件 |
signatures[].signer.phone | object | 是 | 签署人电话 |
signatures[].signer.document_number | string | 是 | 签署人 CPF |
signatures[].authentication_type | string | 是 | 认证类型(opt_in) |
- Zip
通过 zip 签名包含发送证明文件,例如录音电话。
Request
Request Body
{
"type": "data-signature",
"signatures": [
{
"signed_object": {
"raw_text": "Lorem ipsum dolor sit amet, consectetur a....",
"document_key": "79003de0-2590-455d-9b73-426b8ca284eb",
"document_md5": "7521bd5621d97af26b2c1721fc4023a8"
},
"authenticity": {
"timestamp": "1970-01-01 00:00:01",
"document_key": "79003de0-2590-455d-9b73-426b8ca284eb",
"document_md5": "7521bd5621d97af26b2c1721fc4023a8"
},
"signer": {
"name": "IVANILDO DE SENA LIMA",
"email": "ivanlima2604@gmail.com",
"phone": {
"country_code": "055",
"area_code": "11",
"number": "999999999"
},
"document_number": "61766976204"
},
"authentication_type": "zip"
}
]
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
type | string | 是 | 签名类型(data-signature) |
signatures[].signed_object.raw_text | string | 是 | 合同文本 |
signatures[].signed_object.document_key | string (UUID) | 是 | 文件键 |
signatures[].signed_object.document_md5 | string | 是 | 文件 MD5 哈希 |
signatures[].authenticity.timestamp | string (datetime) | 是 | 签名时间戳 |
signatures[].authenticity.document_key | string (UUID) | 是 | 证明文件键(zip) |
signatures[].authenticity.document_md5 | string | 是 | 证明文件 MD5 哈希 |
signatures[].signer.name | string | 是 | 签署人姓名 |
signatures[].signer.email | string | 是 | 签署人电子邮件 |
signatures[].signer.phone | object | 是 | 签署人电话 |
signatures[].signer.document_number | string | 是 | 签署人 CPF |
signatures[].authentication_type | string | 是 | 认证类型(zip) |
- Selfie
通过自拍认证适用于使用 QI Tech CaaS 服务的合作伙伴,通过自拍进行认证验证并生成证明 ID。
Request
Request Body
{
"type": "data-signature",
"signatures": [
{
"signed_object": {
"raw_text": "Lorem ipsum dolor sit amet, consectetur a...."
},
"authenticity": {
"timestamp": "1970-01-01 00:00:01",
"facial_recognition_key": "79003de0-2590-455d-9b73-426b8ca284eb"
},
"signer": {
"name": "IVANILDO DE SENA LIMA",
"email": "ivanlima2604@gmail.com",
"phone": {
"country_code": "055",
"area_code": "11",
"number": "999999999"
},
"document_number": "61766976204"
},
"authentication_type": "selfie"
}
]
}
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
type | string | 是 | 签名类型(data-signature) |
signatures[].signed_object.raw_text | string | 是 | 合同文本 |
signatures[].authenticity.timestamp | string (datetime) | 是 | 签名时间戳 |
signatures[].authenticity.facial_recognition_key | string (UUID) | 是 | 人脸识别键(CaaS) |
signatures[].signer.name | string | 是 | 签署人姓名 |
signatures[].signer.email | string | 是 | 签署人电子邮件 |
signatures[].signer.phone | object | 是 | 签署人电话 |
signatures[].signer.document_number | string | 是 | 签署人 CPF |
signatures[].authentication_type | string | 是 | 认证类型(selfie) |
Response
Response Body
{
"data": {},
"event_datetime": "2023-01-17 17:17:28",
"key": "4630cd58-ab00-49b3-b8cb-cb0f4a5af7a4",
"status": "signature_received",
"webhook_type": "debt"
}
所有通过 /debt/{debt_key}/signed 端点执行的操作,响应均相同。
8 - 状态机与 Webhook
在我们系统中创建债务后,可能出现以下状态:
| 状态 | 说明 |
|---|---|
| waiting_signature | 等待签名 |
| signature_finished | 签名完成 |
| disbursed | 操作已放款(已支付) |
| canceled | 操作已取消 |
| cancel_permanently | 操作已永久取消 |
8.1. signature_finished: 通知操作已签名并提供已签名文件的 URL。
Webhook
Body
{
"data": {
"borrower": {
"document_number": "46338864879",
"name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"related_party_key": "9878573b-4ccf-4f72-be82-5ba70d25d5a7"
},
"collaterals": [{
"absolute_amount": null,
"collateral_constituted": false,
"collateral_data": {
"document_number": "46338864879",
"error_message": "None",
"periods": [{
"amount": 222.21,
"due_date": "2024-01-01"
},
{
"amount": 382.14,
"due_date": "2025-01-01"
},
{
"amount": 311.43,
"due_date": "2026-01-01"
},
{
"amount": 342.38,
"due_date": "2027-01-01"
},
{
"amount": 194.29,
"due_date": "2028-01-01"
},
{
"amount": 97.15,
"due_date": "2029-01-01"
},
{
"amount": 48.57,
"due_date": "2030-01-01"
},
{
"amount": 24.29,
"due_date": "2031-01-01"
},
{
"amount": 12.14,
"due_date": "2032-01-01"
},
{
"amount": 6.07,
"due_date": "2033-01-01"
}
],
"protocol_number": null,
"reservation_request_closure_status": null,
"reservation_request_closure_status_translation": null,
"reservation_request_key": "e2edaa95-69b8-47d3-8ca7-5e48fd3440c5",
"reservation_request_status": "pending",
"reservation_request_status_translation": "Em Teimosinha"
},
"collateral_key": "e9cf1551-5b95-4edf-827f-29bd4d4f0b2f",
"collateral_type": "fgts_balance",
"created_at": "2023-05-26T14:55:25.335308",
"external_key": "977075c1-d529-4cc2-931c-188cab4aa761",
"percentage": 1,
"updated_at": "2023-05-26T14:55:25.335291"
}],
"contract": {
"number": "0000064547/PAD",
"signers": [{
"signature_url": null,
"signer_document_number": "46338864879",
"signer_email": "naotem@gmail.com",
"signer_external_key": null,
"signer_name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
"signer_role": "issuer"
}],
"urls": [
"https://storage.googleapis.com/sandbox-doc-api/documents/8a370979-727b-4865-a03a-27f8d6208f57/SYNGENTASANDBOX-PATRICIA_APARECIDA_DO_NASCIMENTO_PEREIRA_DA_SILVA-CCB-0000070572-20230526145531.pdf"
]
},
"disbursement_options": [{
"additional_iof": 3.282668,
"annual_cet": "29,8407%",
"assignment_amount": 872.5,
"base_iof": 24.828504537437023,
"cet": "2,2000%",
"contract_fee_amount": 8.64,
"contract_fees": [{
"fee_amount": 8.64,
"fee_type": "tac"
}],
"disbursed_issue_amount": 827.11,
"disbursement_date": "2023-05-26",
"external_contract_fee_amount": 8.64,
"external_contract_fees": [{
"description": null,
"fee_amount": 8.64,
"fee_type": "spread",
"net_fee_amount": 7.84,
"rebate_bank_account": null,
"tax_amount": 0.8
},
{
"description": null,
"fee_amount": 0,
"fee_type": "tac",
"net_fee_amount": 0,
"rebate_bank_account": null,
"tax_amount": 0
}
],
"first_due_date": "2024-01-01",
"installments": [{
"additional_costs": [],
"business_due_date": "2024-01-02",
"calendar_days": 220,
"due_date": "2024-01-01",
"due_interest": 0,
"due_principal": 863.86,
"fine_amount": null,
"has_interest": true,
"installment_number": 1,
"installment_status": null,
"installment_type": null,
"post_fixed_amount": null,
"pre_fixed_amount": 135.8606707299,
"principal_amortization_amount": 86.3493292701,
"tax_amount": 1.557741900032604,
"total_amount": 222.21,
"workdays": 149
},
...
],
"issue_amount": 863.86,
"net_external_contract_fee_amount": 7.84,
"number_of_installments": null,
"pre_fixed_interest_rate": {
"annual_rate": 0.274223,
"daily_rate": 0.00066416,
"interest_base": "calendar_days_365",
"monthly_rate": 0.02040001
},
"total_iof": 28.11,
"total_pre_fixed_amount": 776.8144015216
},
...
],
"entry": null,
"iof_charge_method": "financed",
"prefixed_interest_rate": {
"annual_rate": 0.274223,
"created_at": "2023-05-26T14:55:31",
"daily_rate": 0.00066416,
"interest_base": "calendar_days_365",
"monthly_rate": 0.02040001
},
"requester_identifier_key": "e99ed7c8-ecb3-441d-9130-45feb0ad9c36"
},
"event_datetime": "2023-05-26 14:55:38",
"key": "e99ed7c8-ecb3-441d-9130-45feb0ad9c36",
"status": "waiting_signature",
"webhook_type": "debt"
}
8.2. signature_finished(简化版): 通知操作已签名的简化 Webhook。
Webhook
Body
{
"webhook_type": "debt",
"key":"57f8e1ce-1080-4d0d-a195-89709b961561",
"event_datetime": "2022-09-29 20:00:54",
"status":"signature_finished",
}
8.3. disbursed: 表示资金已发送至客户账户。 还提供付款转账数据以及已执行放款的 PDF 收据。
Webhook
Body
{
"webhook": {
"key": "4475d350-a63f-4d93-8e76-40386ce942b0",
"data": {
"installments": [
{
"due_date": "2024-08-01",
"total_amount": 1264.12,
"installment_key": "526ca3da-d669-4db5-a16c-67a687c4a755",
"pre_fixed_amount": 141.15866647,
"principal_amortization_amount": 1122.96133353
}
],
"ted_receipt_list": [
{
"fee": 0,
"url": "https://storage.googleapis.com/sandbox-doc-api/documents/099e04d7-3fe5-41ba-bef3-4165d0a09a99/099e04d7-3fe5-41ba-bef3-4165d0a09a99.pdf",
"amount": 1100,
"origin": {
"name": "QI SOCIEDADE DE CRÉDITO DIRETO S.A.",
"type": "payment_account",
"branch": "0001",
"document": "32402502000135",
"bank_code": "329",
"account_key": "5d068423-6094-49e4-b15b-7740038295a8",
"branch_digit": null,
"account_digit": "5",
"account_branch": "0001",
"account_number": "00002",
"financial_institution_name": "QI SOCIEDADE DE CRÉDITO DIRETO S.A."
},
"timestamp": "2024-01-11T13:28:45",
"description": "00360305 0465 100071066-1 24182533410 - Mock Person Name",
"destination": {
"name": "Mock Person Name",
"type": "checking_account",
"branch": "0465",
"purpose": "Crédito PIX em Conta",
"document": "24182533410",
"bank_ispb": "00360305",
"branch_digit": null,
"account_digit": "1",
"account_number": "100071066",
"financial_institution_name": "CAIXA ECONOMICA FEDERAL"
},
"end_to_end_id": "E32402502202401111328RqgXuWz64uU",
"transaction_key": "cffe9c42-fec0-49fc-b9f6-7a5b431f8374",
"origin_transaction_key": "e8ef9c9f-b813-418a-b19c-8fab0dfcb67e"
}
],
"requester_identifier_key": null
},
"status": "disbursed",
"webhook_type": "debt",
"event_datetime": "2024-01-11 13:28:46"
}
}
8.4. canceled: 表示操作取消。这可能是由于付款尝试时银行账户数据不正确、缺少签名、超过放款日期限制或与余额背书相关的问题所致。
操作取消并不表示该操作将在 Caixa 中取消背书。若要触发客户余额取消背书请求,必须永久取消该操作。
在此枚举值列表中,您可以找到因背书错误导致操作取消的所有可能原因。
Webhook
Body
{
"key": "6613ebf5-b41d-4257-b2f9-89ce261c5041",
"data": {
"cancel_reason": "Available Balance is not sufficient for given periods amount",
"cancel_reason_enumerator": "fgts_insufficient_balance"
},
"status": "canceled",
"webhook_type": "debt",
"event_datetime": "2022-12-22 21:27:41"
}
| 字段 | 类型 | 描述 |
|---|---|---|
key | string (UUID) | 操作键 |
data.cancel_reason | string | 取消原因描述 |
data.cancel_reason_enumerator | string | 取消枚举值 |
status | string | 状态(canceled) |
webhook_type | string | Webhook 类型(debt) |
event_datetime | string (datetime) | 事件日期/时间 |
8.5. 已构成担保:
Webhook
Body
{
"key": "767b4ca4-0afc-4e28-a7d7-645bef1873c2",
"data": {
"collateral_type": "fgts",
"collateral_constituted": true
},
"event_time": "2022-12-09 19:02:32",
"webhook_type": "credit_operation.collateral"
}
| 字段 | 类型 | 描述 |
|---|---|---|
key | string (UUID) | 操作键 |
data.collateral_type | string | 担保类型(fgts) |
data.collateral_constituted | boolean | 表示担保是否已构成 |
event_time | string (datetime) | 事件日期/时间 |
webhook_type | string | Webhook 类型(credit_operation.collateral) |
9 - 在 Sandbox 中模拟背书的成功与失败场景:
9.1. 对于以 0、1、2 或 3 开头的 CPF,模拟理想场景。
| CPF 开头 | 操作 |
|---|---|
| 0、1、2 或 3 | 操作成功进行至放款 |
9.2. 模拟背书失败的情况:
所有以 9 开头的 CPF 背书都会出现错误,有些可以处理,有些会触发重试,还有些是意外错误。
所有以 8 开头的 CPF 背书都会因余额不足而出错。
某些背书错误即使触发了取消 webhook,也可以重试背书。因此,需要
因背书错误导致取消的 Webhook 枚举值
| cancel_reason_enumerator | cancel_reason | 描述 | QI 处理措施 |
|---|---|---|---|
| fgts_invalid_given_period | Given periods date does not match with CEF system | 提供的一个或多个提款预测日期与 Caixa 系统预测日期不符,或发送的分期金额大于可用金额 | 操作取消,不重试背书 |
| fgts_unauthorized_institution | Institution isn't authorized by the client | 机构未获客户授权 | 操作取消并重试背书 |
| fgts_processing_pending_changes | Changes on profile info happened on client's FGTS account | 因客户 FGTS 账户个人信息发生变更,操作不被允许 | 操作取消,不重试背书 |
| fgts_on_locked_date_range | Not permitted action on current date | 当前日期不允许该操作 | 操作取消,在允许的日期重试背书 |
| fgts_insufficient_balance | Available Balance is not sufficient for given periods amount | 劳动者没有足够余额用于信托操作 | 操作取消,不重试背书 |
| fgts_inexistent_anniversary_membership | Client does not have membership for anniversary withdraw on current date | 劳动者在当前日期未加入周年提款模式 | 操作取消,不重试背书 |
| fgts_period_rejected | Reservation period not accepted | Caixa 拒绝协议 | 操作取消,不重试背书 |
| fgts_deletion_request | Deletion request was before the reservation was completed | 取消背书请求在预留完成前提出 | 操作取消,不重试背书 |
| fgts_protocol_removed | Protocol was removed | Caixa 删除协议 | 操作取消,不重试背书 |
| fgts_insufficient_balance_available | The indicated value is not available for contracting | 指定金额不可用于签约 | 操作取消,不重试背书 |
| fgts_insufficient_balance_for_guarantee | Available balance is not sufficient for the required guarantee | 可用余额不足以满足所需担保 | 操作取消,不重试背书 |
| fgts_fgts_accounts_not_found | The informed worker does not have FGTS accounts | 提供的劳动者没有 FGTS 账户 | 操作取消,不重试背书 |
10 - 操作重新提交
在某些情况下,操作选择的放款日期可能在合同签署仍有待处理的情况下过期,导致合同被取消。
为了重新启动已取消合同的流程,需要重新计算操作。我们有两种提交方式:更改放款日期或更改放款银行账户数据。