Webhook 格式
注意!
QI Tech 的 Webhook 不应以严格方式映射。 我们 API 返回的 Webhook payload 中可能会添加额外字段。
重新发送 Webhook
您可以按照文档中的详细说明查询和重新发送 Webhook:重新发送 Webhook。
DDA 中有两种类型的事件,通过 Webhook 中的 webhook_type 属性加以区分。
银行票据捕获 Webhook
Registration webhook
{
"webhook_type": "baas.dda.bankslip.registration",
"key": "7c52d5f6-9db1-4a3c-bb03-1f76a2e8f9d2",
"data": {
"barcode": "00193000000001000000500000001234567890123456",
"digitable_line": "00193000000001000000500000001234567890123456123",
"status": "registered",
"nominal_amount": 1050,
"total_amount": 999,
"total_payment_amount": null,
"paid_fine": null,
"paid_interest": null,
"discount_amount": null,
"partial_payment_allowed": true,
"expiration": "2024-07-19",
"max_payment_date": "2024-09-02",
"beneficiary": {
"name": "Tech Solutions Ltda.",
"bank_code": "123",
"bank_ispb": "12345678",
"person_type": "legal",
"document_number": "12345678000100"
},
"payer": {
"name": "João Carlos",
"person_type": "natural",
"document_number": "12345678900"
},
"guarantor": {
"name": "Maria Junior",
"person_type": "natural",
"document_number": "03903984900"
},
"rebate_amount": 30.00,
"interest": [
{
"interest_amount_type": "workdays_daily_amount",
"interest_billing_start_date": "2024-07-21",
"interest_amount": 10.00
}
],
"fine": [
{
"fine_billing_start_date": "2024-07-29",
"fine_amount_type": "absolute",
"fine_amount": 100.00
}
],
"discounts": [
{
"discount_limit_date": "2024-07-05",
"discount_type": "absolute",
"discount_amount": 50.00
}
],
"calculations": [],
"calculation_model": "01",
}
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
barcode | string | 银行票据条形码。 | 44 |
digitable_line | string | 银行票据可输入行。 | 47 |
status | enum | 银行票据状态枚举值。 | - |
nominal_amount | float | 银行票据票面金额。 | - |
total_amount | float | 银行票据计算后金额。 | - |
total_payment_amount | float | 银行票据支付金额。 | - |
partial_payment_allowed | boolean | 是否接受部分付款的指标。 | - |
expiration | string | 银行票据到期日期。 | 10 |
max_payment_date | string | 银行票据最终支付日期。 | 10 |
payer | object | 银行票据付款人对象。 | - |
beneficiary | object | 银行票据受益人对象。 | - |
guarantor | object | 银行票据担保人对象。 | - |
rebate_amount | float | 折扣金额。 | - |
interest | list | 利息对象列表。 | - |
fine | list | 罚款对象列表。 | - |
discounts | list | 折扣对象列表。 | - |
calculations | list | 银行票据计算组列表。 | - |
calculation_model | string | 银行票据当前金额的计算方法。 | 2 |
状态枚举值
| 枚举值 | 描述 |
|---|---|
registered | 已注册的银行票据条形码。 |
paid | 已支付的银行票据。 |
partially_paid | 部分支付的银行票据。 |
written_off | 已注销的银行票据。 |
Payer 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
name | string | 付款人姓名。 | - |
person_type | string | 付款人的人员类型。 | 7 |
document_number | string | 付款人的文件号码。 | 14 |
Beneficiary 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
name | string | 受益人姓名。 | - |
person_type | string | 受益人的人员类型。 | 7 |
document_number | string | 受益人的文件号码。 | 14 |
bank_code | string | 受益人银行代码。 | 3 |
bank_ispb | string | 受益人银行的 ISPB。 | 8 |
guarantor 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
name | string | 担保人姓名。 | - |
person_type | string | 担保人的人员类型。 | 7 |
document_number | string | 担保人的文件号码。 | 14 |
interest 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
interest_billing_start_date | string | 利息开始日期。 | 10 |
interest_amount_type | string | 利息类型。 | - |
interest_amount | string | 利息金额。 | - |
fine 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
fine_billing_start_date | string | 罚款开始日期。 | 10 |
fine_amount_type | string | 罚款类型。 | - |
fine_amount | string | 罚款金额。 | - |
discount 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
discount_limit_date | string | 折扣截止日期。 | 10 |
discount_type | string | 折扣类型。 | - |
discount_amount | string | 折扣金额。 | - |
银行票据修改 Webhook
Update webhook
{
"webhook_type": "baas.dda.bankslip.update",
"key": "7c52d5f6-9db1-4a3c-bb03-1f76a2e8f9d2",
"data": {
"barcode": "00193000000001000000500000001234567890123457",
"digitable_line": "00193000000001000000500000001234567890123456123",
"status": "paid",
"nominal_amount": 1050,
"total_amount": 1200,
"total_payment_amount": 1200,
"partial_payment_allowed": false,
"paid_fine": 150,
"paid_interest": 50,
"discount_amount": 0,
"expiration": "2024-05-30",
"max_payment_date": "2024-07-01",
"beneficiary": {
"name": "Tech Solutions Ltda.",
"bank_code": "123",
"bank_ispb": "12345678",
"person_type": "legal",
"document_number": "12345678000100"
},
"payer": {
"name": "João Carlos",
"person_type": "natural",
"document_number": "12345678900"
},
"guarantor": {
"name": "Maria Junior",
"person_type": "natural",
"document_number": "03903984900"
},
"rebate_amount": 30.00,
"interest": [
{
"interest_amount_type": "workdays_daily_amount",
"interest_billing_start_date": "2024-05-21",
"interest_amount": 10.00
}
],
"fine": [
{
"fine_billing_start_date": "2024-05-29",
"fine_amount_type": "absolute",
"fine_amount": 100.00
}
],
"discounts": [
{
"discount_limit_date": "2024-05-05",
"discount_type": "absolute",
"discount_amount": 50.00
}
],
"calculations": [],
"calculation_model": "01",
}
}
Body Params
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
barcode | string | 银行票据条形码。 | 44 |
digitable_line | string | 银行票据可输入行。 | 47 |
status | enum | 银行票据状态枚举值。 | - |
nominal_amount | float | 银行票据票面金额。 | - |
total_amount | float | 银行票据计算后金额。 | - |
total_payment_amount | float | 银行票据支付金额。 | - |
partial_payment_allowed | boolean | 是否接受部分付款的指标。 | - |
paid_fine | float | 支付银行票据时实际发生的罚款总额,从总金额计算。 | - |
paid_interest | float | 支付银行票据时实际发生的利息总额,从总金额计算。 | - |
discount_amount | float | 支付银行票据时的折扣总额,从总金额计算。 | - |
expiration | string | 银行票据到期日期。 | 10 |
max_payment_date | string | 银行票据最终支付日期。 | 10 |
payer | object | 银行票据付款人对象。 | - |
beneficiary | object | 银行票据受益人对象。 | - |
guarantor | object | 银行票据担保人对象。 | - |
rebate_amount | float | 折扣金额。 | - |
interest | list | 利息对象列表。 | - |
fine | list | 罚款对象列表。 | - |
discounts | list | 折扣对象列表。 | - |
calculations | list | 银行票据计算组列表。 | - |
calculation_model | string | 银行票据当前金额的计算方法。 | 2 |