银行划款 Webhook
注意!
QI Tech 的 webhooks 不应以严格方式进行映射。 API 返回的 webhook payload 中可能会添加额外字段。
Webhook 重发
您可以按照文档中的详细说明查询并重发 webhooks:Webhook 重发。
简介
在我们的系统中创建划款后,将发送包含以下状态的 webhook:
| 枚举值 | 中文 | 描述 |
|---|---|---|
| registered | 已登记 | 划款已登记,可供支付 |
| rejected | 已拒绝 | 划款发行请求被拒绝,当划款登记请求包含阻止登记的语义错误时发生 |
| payment_notice | 付款通知 | 划款付款通知,在划款付款时发送此通知,但尚未完成财务结算 |
| notary_office_payment_notice | 公证处付款通知 | 划款在公证处付款时的通知,但尚未完成财务结算 |
| paid | 已支付 | 划款已支付(已完成财务结算的核销) |
| written_off | 已核销 | 划款已核销但未完成财务结算 |
信息
我们 webhook 的响应超时时间为 10 秒。
示例
登记
Webhook Body
{
"key": "11b13b2c-4204-41b3-8596-2ee7ecbde38c",
"data": {
"expiration": "2020-11-14",
"our_number": 11,
"bank_slip_key": "11b13b2c-4204-41b3-8596-2ee7ecbde38c",
"rebate_amount": 0,
"occurrence_type": "registration",
"occurrence_feedback": "confirmed",
"occurrence_sequence": 2,
"requester_profile_code": "329-01-0001-0078570",
"glados_occurrence_reasons": null,
"cnab_file_occurrence_order": 1,
"registration_institution_occurrence_date": "2020-11-11"
},
"status": "registered",
"webhook_type": "bank_slip.status_change",
"event_datetime": "2020-11-11 21:33:03"
}
付款通知
Webhook Body
{
"key": "03c38d18-d12f-4b5f-841c-afab52fe33c5",
"data": {
"our_number": 142,
"paid_amount": 6676.38,
"payment_bank": 104,
"bank_slip_key": "03c38d18-d12f-4b5f-841c-afab52fe33c5",
"payment_method": 2,
"payment_origin": 3,
"paid_in": {
"name": "QI TECH",
"code_number": "329",
"ispb": "32402502"
},
"occurrence_type": "payment_notice",
"occurrence_feedback": "confirmed",
"occurrence_sequence": 0,
"requester_profile_code": "329-09-0001-0082162",
"registration_institution": "qi_scd",
"cnab_file_occurrence_order": 1,
"registration_institution_occurrence_date": "2021-04-19"
},
"status": "payment_notice",
"webhook_type": "bank_slip.status_change",
"event_datetime": "2021-04-19 20:04:06"
}
支付来源 ID 说明:
| ID | 描述 |
|---|---|
| 1 | 传统网点 |
| 2 | 自动取款机 |
| 3 | 互联网(个人/企业网银) |
| 5 | 银行代理 |
| 6 | 客服中心(电话) |
| 7 | 电子文件 |
| 8 | DDA |
| 9 | 数字代理 |
| 901 | 通过 Pix QR Code 支付 |
支付
Webhook Body:通过 QR Code 支付
{
"key": "505fd25f-89cf-40ca-927c-3800f207146a",
"data": {
"agent_type": "system",
"our_number": 69993012,
"origin_type": "qr_code",
"paid_amount": 551.5,
"payment_bank": "329",
"bank_slip_key": "505fd25f-89cf-40ca-927c-3800f207146a",
"payment_branch": "0001",
"payment_method": "2",
"payment_origin": "901",
"discount_amount": 0.0,
"occurrence_type": "payment",
"payment_account": "1727560-2",
"payment_bank_ispb": "32402502",
"occurrence_reasons": [289],
"occurrence_feedback": null,
"occurrence_sequence": "0",
"payment_credit_date": "2023-01-10",
"selected_user_agent": null,
"paid_in": {
"name": "QI TECH",
"code_number": "329",
"ispb": "32402502"
},
"paid_interest_amount": 0.0,
"requester_profile_code": "329-01-0001-0000002",
"registration_institution": "qi_scd",
"cnab_file_occurrence_order": 1,
"registration_institution_occurrence_date": "2023-01-10"
},
"status": "paid",
"webhook_type": "bank_slip.status_change",
"event_datetime": "2023-01-10 14:08:46"
}
核销
Webhook Body
{
"key": "93e58a9a-287b-4bf2-9cdc-5467a9d3d9bf",
"data": {
"expiration": "2021-05-17",
"our_number": 113,
"bank_slip_key": "93e58a9a-287b-4bf2-9cdc-5467a9d3d9bf",
"rebate_amount": 0,
"occurrence_type": "write_off",
"occurrence_reasons": [],
"occurrence_feedback": "confirmed",
"occurrence_sequence": 3,
"requester_profile_code": "329-09-0001-0082162",
"glados_occurrence_reasons": null,
"cnab_file_occurrence_order": 1,
"registration_institution_occurrence_date": "2021-04-20"
},
"occurrence_reason": {
"bank_reason_code": "16",
"bank_reason_name": "Título Baixado pelo Banco por decurso de Prazo"
},
"status": "written_off",
"webhook_type": "bank_slip.status_change",
"event_datetime": "2021-04-20 11:55:09"
}
核销发生原因说明:
| 代码 | 描述 |
|---|---|
| 00 | 事件已接受 |
| 10 | 客户主动核销 |
| 14 | 已进行公证抗议 |
| 16 | 金融机 构因逾期核销划款 |
| 20 | 划款已核销并转入贴现 |