批量重组
注意
批量重组只能由同一发行人和相同集成 key 的操作创建。
注意
每次批量重组最多包含 50 个操作。
1. 模拟批量重组
请求
ENDPOINT
/renegotiation/batch_proposal_simulation方法
POSTRequest Body
{
"amortization_type": "installment_payment",
"reference_date": "2022-07-20",
"discount_percentage": 0.0,
"operations": [
{
"debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
"installments": [{
"installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88"
}]
},
{
"debt_key": "2cbfb9b1-1gdb-5g8d-9967-b338e5eb83g9",
"installments": [{
"installment_key": "2ef25ed8-7124-44f5-9e3d-1d1a7196166e"
}]
}
]
}
折扣字段
在请求中添加以下任一字段,可为重组方案的创建或模拟设置百分比或绝对值折扣。
百分比折扣
{
"discount_percentage": 0.5
}
绝对值折扣
{
"discount_amount": 200
}
2. 创建批量重组
注意
request_control_key 字段为可选字段,用于保证请求的唯一性。
请求
ENDPOINT
/renegotiation/batch_proposal方法
POST注意
discount_amount 和 discount_percentage 字段不能在同一 payload 中同时发送。
Body Params
| 字段 | 类型 | 描述 | 字符 |
|---|---|---|---|
debt_key | string | QI 内信贷操作的唯一 key | UUID |
amortization_type | string | 摊销类型 | 摊销类型枚举 |
reference_date | string | 重组现值计算的参考日期(需为 D+1) | 10 |
proposal_due_date | string | 重组方案到期日期 | 10 |
payment_type | string | 支付类型 | 支付类型枚举 |
discount_percentage | float | 折扣百分比 | 10 |
discount_amount | float | 折扣金额 | 10 |
installments | array of objects | 重组的分期列表 | Installments 对象 |
摊销类型枚举(Amortization Type)
| 字段 | 描述 |
|---|---|
| installment_payment | 创建用于支付 payload 中指定分期的重组方案。 使用此摊销类型时,需传入分期的 installment_key。 |
| overdue_installment_payment | 创建专门针对逾期分期支付的重组方案。 使用此摊销类型时,需传入分期的 installment_key。 |
支付类型枚举(Payment Type)
| 字段 | 描述 |
|---|---|
| bankslip | 通过银行划款支付(同时生成划款和 Pix 支付) |
| pix | 通过 Pix 支付(仅生成 Pix) |
| manual | 手动支付(不生成支付方式) |
Installments 对象
| 字段 | 类型 | 描述 | 字符 |
|---|---|---|---|
installment_key | string | 待重组分期的 key | uuid 格式 |
3. 查询批量重组列表
Path params
| 字段 | 类型 | 描述 | 字符 |
|---|---|---|---|
batch_proposal_status * | string | 批量重组方案状态 | - |
issuer_document_number * | string | 发行人证件号码 | - |
request_control_key * | string | 请求者标识 key | - |
请求
ENDPOINT
/renegotiation/batch_proposal方法
GET4. 查询单个批量重组
请求
ENDPOINT
/renegotiation/batch_proposal/BATCH-PROPOSAL-KEY方法
GET5. 取消批量重组
ENDPOINT
/renegotiation/batch_proposal/BATCH-PROPOSAL-KEY方法
DELETE响应
HTTP 状态
2046. Webhooks
6.1. 批量重组支付 Webhook
Webhook Body
{
"webhook_type": "renegotiation.batch_proposal",
"key": "\<BATCH-PROPOSAL-KEY\>",
"event_datetime": "\<DATA E HORA DO ENVIO DO WEBHOOK\>",
"status": "paid",
"data": {
"paid_method_type": "<METODO DE PAGAMENTO>",
"paid_in": {
"code_number": "<CODIGO DO BANCO LIQUIDANTE>",
"ispb": "<ISPB DO BANCO LIQUIDANTE>",
"name": "<NOME DO BANCO LIQUIDANTE>"
}
}
}
6.2. 批量重组拒绝 Webhook
注意
批量重组可能因支付超时或在重组外单独支付了分期而被拒绝。
Webhook Body
{
"webhook_type": "renegotiation.batch_proposal",
"key": "\<BATCH-PROPOSAL-KEY\>",
"event_datetime": "\<DATA E HORA DO ENVIO DO WEBHOOK\>",
"status": "rejected",
"data": {}
}