Webhooks
由于转账以异步方式进行,正确映射和处理发送的 webhooks 至关重要。
注意!
QI Tech 的 webhooks 不应以限制性方式映射。 我们 API 返回的 webhook 载荷中可能会添加额外字 段。
待处理交易的 Webhook
此 Webhook 用于更新在 Pix 发送请求中处于待处理状态(状态 202)的转账状态。
Webhook Request Body
Request Body: 已发送交易
{
"webhook_type": "baas.pix_transfer.outgoing_pix",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_status": "sent",
"created_at": "2021-10-22T20:30:23.459Z"
}
}
Request Body: 已拒绝交易
{
"webhook_type": "baas.pix_transfer.outgoing_pix",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"pix_transfer_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"pix_transfer_status": "rejected",
"created_at": "2021-10-22T20:30:23.459Z",
"error_code": "PXT000132",
"error_description": "Target account number is invalid.",
"error_translation": "Número da conta de destino é inexistente ou inválido.",
"error_short_description": null
}
}
Webhook Body Param
| 字段 | 类型 | 描述 | 最大字符数 |
|---|---|---|---|
webhook_type | string | 定义报告事件类型的枚举值 | 23 |
webhook_datetime | string | Webhook 发送日期和时间 | 20 |
request_control_key | string | 用于查询已发起请求的 UUID4。 | 36 |
pix_transfer_key | string | QI 系统中 Pix 转账的标识键 | 36 |
pix_transfer_status | string | 交易状态。 | 200 |
created_at | string | 交易创建日期和时间。 | 20 |
error_code | string | 交易发生的错误代码 | 20 |
error_description | string | 英文错误描述 | 200 |
error_translation | string | 翻译为葡萄牙语的错误描述 | 200 |
error_short_description | string | 错误简短描述 | 100 |