Webhooks
注意!
QI Tech 的 webhooks 不应以严格方式进行映射。 返回的 API webhooks payload 中可能会包含额外字段。
Webhook 重发
您可以按照文档中的详细说明查询和重发 webhooks:重发 Webhooks。
支付 Webhook
Webhook 请求体
Request Body: 支付已执行
{
"webhook_type": "baas.bill_payment.payment",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"source_account_key": "ca2c934e-5970-4c15-bdef-87e1b5c204e3",
"payment_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"payment_schedule_key": null,
"transaction_key": "5f67e4fc-d3bd-4831-a9b1-20859dcee7a9",
"barcode":"00193967000009910000000003615574000000002417",
"digitable_line":"00190000090361557400500000024174396700000991000",
"payment_status": "executed",
"payment_type":"bank_slip",
"error_code": null,
"error_message": null
}
}
Request Body: 支付待执行
{
"webhook_type": "baas.bill_payment.payment",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"source_account_key": "ca2c934e-5970-4c15-bdef-87e1b5c204e3",
"payment_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"payment_schedule_key": null,
"transaction_key": "5f67e4fc-d3bd-4831-a9b1-20859dcee7a9",
"barcode":"00193967000009910000000003615574000000002417",
"digitable_line":"00190000090361557400500000024174396700000991000",
"payment_status": "pending_execution",
"payment_type":"bank_slip",
"error_code": null,
"error_message": null
}
}
Request Body: 支付已拒绝
{
"webhook_type": "baas.bill_payment.payment",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"source_account_key": "ca2c934e-5970-4c15-bdef-87e1b5c204e3",
"payment_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"payment_schedule_key": null,
"transaction_key": null,
"barcode":"00193967000009910000000003615574000000002417",
"digitable_line":"00190000090361557400500000024174396700000991000",
"payment_status": "rejected",
"payment_type":"bank_slip",
"error_code": "BIP000023",
"error_message": "The source account has insufficient balance. Payment cannot be made."
}
}
Request Body: 支付已冲销
{
"webhook_type": "baas.bill_payment.payment",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"source_account_key": "ca2c934e-5970-4c15-bdef-87e1b5c204e3",
"payment_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"payment_schedule_key": null,
"transaction_key": "5f67e4fc-d3bd-4831-a9b1-20859dcee7a9",
"barcode":"81620000000000336592028110120200020214942099",
"digitable_line":"816200000007000336592027811012020004202149420996",
"payment_status": "reverted",
"payment_type":"collection_slip",
"error_code": "BIP000029",
"error_message": "Bank slip payment write off rejected."
}
}
Webhook Body 参数
| 字段 | 类型 | 描述 |
|---|---|---|
webhook_type | string | 定义所报告事件类型的枚举值 |
webhook_datetime | string | webhook 发送的日期和时间 |
request_control_key | uuid4 | 客户请求唯一标识键。 |
source_account_key * | uuid4 | 被扣款账户的键。 |
payment_key | uuid4 | 支付唯一标识键。 |
payment_schedule_key | uuid4 | 预约唯一标识键(仅适用于由预约生成的支付)。 |
barcode | string | 条形码。 |
digitable_line | string | 数字行。 |
payment_type | enum | 支付类型。 |
payment_status | enum | 支付状态。 |
error_code | string | 错误代码。 |
error_message | string | 错误信息。 |