支付工具条目 Webhooks
注意!
QI Tech 的 webhooks 不应以严格方式映射。 我们 API 返回的 webhook 载荷中可能包含额外字段。
重发 Webhooks
您可以按照文档中的详细说明查询和重发 webhooks:重发 Webhooks。
简介
在我们系统中创建支付工具条目(payment_instrument_entry)后,将发送以下状态的 webhooks:
| 枚举值 | 翻译 | 描述 |
|---|---|---|
| processing_conclusion | 正在处理结算 | 支付工具条目正在处理结算 |
| processing_cancellation | 正在处理取消 | 支付工具条目正在处理取消 |
| concluded | 已结算 | 支付工具条目已结算 |
| canceled | 已取消 | 支付工具条目已取消 |
说明
我们 webhooks 的响应超时时间为 10 秒。
示例
创建确认
Webhook Body
{
"webhook_type": "baas.invoice.payment_instrument_entry",
"webhook_datetime": "2024-08-13T21:35:55.679Z",
"data": {
"payment_instrument_key": "ecf87b4b-fa6e-49c0-a7f0-f2cad6b42d79",
"payment_instrument_entry_key": "fd86d9b1-2a5e-4e03-9a59-a043c7632c97",
"payment_instrument_entry_amount": 150.00,
"payment_instrument_entry_type": "purchase",
"payment_instrument_entry_status": "concluded"
}
}
取消确认
Webhook Body
{
"webhook_type": "baas.invoice.payment_instrument_entry",
"webhook_datetime": "2024-08-13T21:35:55.679Z",
"data": {
"payment_instrument_key": "ecf87b4b-fa6e-49c0-a7f0-f2cad6b42d79",
"payment_instrument_entry_key": "fd86d9b1-2a5e-4e03-9a59-a043c7632c97",
"payment_instrument_entry_amount": 150.00,
"payment_instrument_entry_type": "purchase",
"payment_instrument_entry_status": "canceled"
}
}
正在处理激活
Webhook Body
{
"webhook_type": "baas.invoice.payment_instrument_entry",
"webhook_datetime": "2024-08-13T21:35:55.679Z",
"data": {
"payment_instrument_key": "ecf87b4b-fa6e-49c0-a7f0-f2cad6b42d79",
"payment_instrument_entry_key": "fd86d9b1-2a5e-4e03-9a59-a043c7632c97",
"payment_instrument_entry_amount": 150.00,
"payment_instrument_entry_type": "purchase",
"payment_instrument_entry_status": "processing_conclusion"
}
}
正在处理取消
Webhook Body
{
"webhook_type": "baas.invoice.payment_instrument_entry",
"webhook_datetime": "2024-08-13T21:35:55.679Z",
"data": {
"payment_instrument_key": "ecf87b4b-fa6e-49c0-a7f0-f2cad6b42d79",
"payment_instrument_entry_key": "fd86d9b1-2a5e-4e03-9a59-a043c7632c97",
"payment_instrument_entry_amount": 150.00,
"payment_instrument_entry_type": "purchase",
"payment_instrument_entry_status": "processing_cancellation"
}
}
Webhook 字段
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
| payment_instrument_key | string | uuid v4 格式的支付工具唯一识别密钥 | 36 |
| payment_instrument_entry_key | string | uuid v4 格式的支付工具条目唯一识别密钥 | 36 |
| payment_instrument_entry_amount | number | 支付工具条目金额 | - |
| payment_instrument_entry_type | string | 支付工具条目类型 | payment_instrument_entry_type 枚举值 |
| payment_instrument_entry_status | string | 支付工具条目状态 | payment_instrument_entry_status 枚举值 |
payment_instrument_entry_type 枚举值
| 枚举值 | 描述 |
|---|---|
| purchase | 购买 |
| withdrawal | 提款 |
| postpaid_card_issuance | 后付费卡发卡 |
payment_instrument_entry_status 枚举值
| 枚举值 | 描述 |
|---|---|
| processing_conclusion | 支付工具条目正在处理结算 |
| processing_cancellation | 支付工具条目正在处理取消 |
| concluded | 支付工具条目已结算 |
| canceled | 支付工具条目已取消 |
说明
支付工具条目可以直接从 processing_conclusion 转换为 processing_cancellation 和 canceled。在这种情况下,不会创建发票项目。