跳到主要内容

支付工具条目 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_keystringuuid v4 格式的支付工具唯一识别密钥36
payment_instrument_entry_keystringuuid v4 格式的支付工具条目唯一识别密钥36
payment_instrument_entry_amountnumber支付工具条目金额-
payment_instrument_entry_typestring支付工具条目类型payment_instrument_entry_type 枚举值
payment_instrument_entry_statusstring支付工具条目状态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_cancellationcanceled。在这种情况下,不会创建发票项目。