Webhooks
注意!
QI Tech 的 Webhook 不应进行严格映射。 我们 API 返回的 Webhook 载荷中可能会新增额外字段。
重新发送 Webhook
您可以按照文档中的详细说明查询和重新发送 Webhook:重新发送 Webhook。
账户变动 Webhook
任何账户变动都将发送 "account_transaction" Webhook。
每笔交易都有一个分类类型(Source Sub Type)。该分类用于对账户中的每笔变动进行归类。Source Sub Type 列表如下所示。
账户入账
账户入账将产生 data.amount 为正值的 Webhook,其中 data.origin 为资金来源账户,data.destination 为资金目标账户:
WEBHOOK_TYPE
account_transactionResponse Body: Pix
{
"key": "<ACCOUNT-KEY>",
"data": {
"amount": 1000000,
"origin": {
"name": "Treasury Account",
"branch": "0001",
"document": "32402502000135",
"account_key": "5d068423-6094-49e4-b15b-7740038295a8",
"account_digit": "5",
"account_number": "00002"
},
"timestamp": "2022-09-02T21:36:33.446120",
"description": "329 0001 00002-5 32.402.502/0001-35 - QI SOCIEDADE DE CRÉDITO DIRETO S.A.",
"destination": {
"name": "Default",
"branch": "0001",
"document": "09080702000105",
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"account_digit": "2",
"account_number": "2359934"
},
"reference_key": "983b4a28-7de6-4e71-97ef-60fb50c7b013",
"reference_type": "movement_request",
"account_balance": 1000000,
"source_sub_type": "internal_funds_transfer",
"transaction_key": "67a62397-2c32-4768-8485-ec9129a46654",
"source_sub_type_str": "Transferência Interna",
"transaction_details": {
"payer_name": "0001",
"receiver_name": "Default",
"payer_account_digit": "5",
"payer_account_branch": "",
"payer_account_number": "1111111",
"payer_document_number": "66681638999999",
"receiver_account_digit": "6",
"receiver_account_branch": "0000",
"receiver_account_number": "34256449809",
"receiver_conciliation_id": null,
"receiver_document_number": "00809641658"
}
},
"datetime": "2022-09-02T21:36:33.446120",
"webhook_type": "account_transaction"
}
Response Body: 其他交易
{
"key": "<ACCOUNT-KEY>",
"data": {
"amount": 1000000,
"origin": {
"name": "Treasury Account",
"branch": "0001",
"document": "32402502000135",
"account_key": "5d068423-6094-49e4-b15b-7740038295a8",
"account_digit": "5",
"account_number": "00002"
},
"timestamp": "2022-09-02T21:36:33.446120",
"description": "329 0001 00002-5 32.402.502/0001-35 - QI SOCIEDADE DE CRÉDITO DIRETO S.A.",
"destination": {
"name": "Default",
"branch": "0001",
"document": "09080702000105",
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"account_digit": "2",
"account_number": "2359934"
},
"reference_key": "983b4a28-7de6-4e71-97ef-60fb50c7b013",
"reference_type": "movement_request",
"account_balance": 1000000,
"source_sub_type": "internal_funds_transfer",
"transaction_key": "67a62397-2c32-4768-8485-ec9129a46654",
"source_sub_type_str": "Transferência Interna"
},
"datetime": "2022-09-02T21:36:33.446120",
"webhook_type": "account_transaction"
}
账户出账
账户出账将产生 data.amount 为负值的 Webhook,其中 data.origin 为资金目标账户,data.destination 为资金来源账户:
WEBHOOK_TYPE
account_transactionWebhook Body
{
"key": "<ACCOUNT-KEY>",
"data": {
"amount": -45,
"origin": {
"name": "PIX",
"branch": "0001",
"document": "32402502000135",
"account_key": "3d0e7d50-e898-49f3-b23b-05353c8a3c72",
"account_digit": "3",
"account_number": "00003"
},
"timestamp": "2022-09-02T23:00:05.326738",
"description": "212 0001 1017372-2 ***.221.81*-** BANCO ORIGINAL S.A.",
"destination": {
"name": "Default",
"branch": "0001",
"document": "09080702000105",
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"account_digit": "2",
"account_number": "2359934"
},
"reference_key": "cea836b5-b02e-4f94-b1e2-4d575671c33d",
"reference_type": "pix_outgoing",
"account_balance": 999955,
"source_sub_type": "pix_withdrawal",
"transaction_key": "d2ba3817-26d7-4957-ab82-24f78d910a8a",
"source_sub_type_str": "Transferência de PIX"
},
"datetime": "2022-09-02T23:00:05.326738",
"webhook_type": "account_transaction"
}
source_sub_types 列表:
| 枚举值 | 描述 |
|---|---|
| operation_disbursement | 操作放款 |
| protest_expense | 抗议费用 |
| automatic_integrated_payment | 自动集成支付 |
| tax | 税款 |
| electronic_funds_fee | TED 手续费 |
| credit_operation_fee | 信贷开户手续费 |
| internal_funds_transfer | 内部转账 |
| incoming_funds_transfer | 入账转账 |
| outgoing_funds_transfer | TED |
| deposit | 存款 |
| withdrawal | 转账 |
| withdrawal_reversal | 转账冲销 |
| trade_funds_transfer | 让渡支付转账 |
| settlement_funds_transfer | 清算转账 |
| bank_slip_fee | Boleto 手续费 |
| bank_slip_settlement | Boleto 清算 |
| outgoing_funds_transfer_reversal | TED 冲销 |
| incoming_funds_transfer_refusal | 转账被拒 |
| electronic_funds_fee_reversal | TED 手续费冲销 |
| monthly_account_fee_reversal | 账户维护费冲销 |
| bank_slip_fee_reversal | Boleto 手续费冲销 |
| correspondent_bank_transfer | 银行代理转账 |
| credit_analysis_fee | 信贷分析手续费 |
| credit_operation_fee_reversal | 信贷开户手续费冲销 |
| financial_investments_income | 金融投资收益 |
| bank_slip_settlement_reversal | Boleto 清算冲销 |
| bank_slip_settlement_expense_reversal | Boleto 清算手续费冲销 |
| bank_slip_settlement_incoming_reversal | Boleto 清算收款冲销 |
| correspondent_bank_transfer_reversal | 银行代理转账冲销 |
| credit_analysis_fee_reversal | 信贷分析手续费冲销 |
| doc_expense_reversal | DOC 手续费冲销 |
| incoming_doc_reversal | DOC 入账冲销 |
| operation_disbursement_reversal | 操作放款冲销 |
| operation_settling_reversal | 操作付款冲销 |
| outgoing_doc_reversal | DOC 出账冲销 |
| rebate_reversal | 返点冲销 |
| settlement_funds_transfer_reversal | 清算转账冲销 |
| tax_reversal | 税款冲销 |
| trade_funds_transfer_reversal | 让渡支付转账冲销 |
| bank_slip_permanency_fee | 票据保留手续费 |
| bank_slip_cancel_protest_fee | 票据 保留手续费 |
| bank_slip_protest_fee | 申请抗议手续费 |
| bank_slip_notary_office_fee | 公证处抗议费用 |
| bank_slip_registration_fee | 登记手续费 |
| bank_slip_extension_fee | 延期手续费 |
| bank_slip_rebate_fee | 折扣手续费 |
| bank_slip_discount_fee | 折扣手续费 |
| bank_slip_settlement_fee | 清算手续费 |
| bank_slip_write_off_term_fee | 到期注销手续费 |
| bank_slip_write_off_fee | 注销手续费 |
| bank_slip_cancel_protest_write_off_fee | 中止抗议并注销手续费 |
| bank_slip_notary_office_settlement_fee | 公证处清算手续费 |
| rebate_tax_free | 代收转付 |
| rebate_tax_free_reversal | 代收转付冲销 |
| incoming_funds_transfer_reversal | 内部转账冲销 |
| bank_slip_payment | Boleto 支付 |
| bank_slip_payment_reversal | Boleto 支付冲销 |
| warranty_analysis_fee | 担保分析手续费 |
| bank_slip_settlement_deposit | Boleto 清算 |
| bank_slip_payment_withdrawal | Boleto 支付 |
| account_setup_fee | 开户手续费 |
| account_setup_fee_reversal | 开户手续费冲销 |
| bank_slip_payment_withdrawal_reversal | Boleto 支付冲销 |
| incoming_anticipation_of_receivable | - |
| incoming_credit_card_settlement | 信用卡清算 |
| incoming_debit_card_settlement | 借记卡清算 |
| assignment_automatic_transfer | 自动让渡扣款 |
| assignment_automatic_transfer_reversal | 自动让渡扣款冲销 |
| pix_fee | PIX 手续费 |
| incoming_pix_transfer | PIX 入账 |
| outgoing_pix_transfer | PIX 出账 |
| pix_fee_reversal | PIX 手续费冲销 |
| incoming_pix_transfer_reversal | PIX 入账冲销 |
| outgoing_pix_transfer_reversal | PIX 出账冲销 |
| pix_deposit | PIX 存款 |
| pix_withdrawal | PIX 转账 |
| pix_withdrawal_reversal | PIX 转账冲销 |
| pix_chargeback_withdrawal | 发送 PIX 退款 |
| outgoing_pix_chargeback | PIX 退款出账 |
| incoming_pix_chargeback | 收到 PIX 退款 |
| pix_chargeback_deposit | PIX 退款入账 |
| pix_chargeback_withdrawal_reversal | 发送 PIX 退款冲销 |
| outgoing_pix_chargeback_reversal | PIX 退款出账冲销 |
| incoming_pix_chargeback_reversal | 收到 PIX 退款冲销 |
| operation_pix_disbursement | 操作 PIX 放款 |
| operation_pix_disbursement_reversal | 操作 PIX 放款冲销 |
| receivables_inquiry_fee | 应收账款查询手续费 |
| pix_deposit_reversal | PIX 存款冲销 |
| internal_pix_transfer | PIX 转账 |
| automatic_integrated_payment_reversal | 自动集成支付冲销 |
| operation_dibursement_reversal | 操作放款冲销 |
| available_yield | 流动性投资存款 |
| bank_slip_convenant_payment | 协议 Boleto 支付 |
账户冻结 Webhook
账户冻结 Webhook 在特定金额被冻结或解冻时发送。origin_type 字段标识冻结来源类型。
冻结时,blocked_balance 为正值。解冻时,值为负数,表示之前冻结金额的释放。
WEBHOOK_TYPE
baas.account.block_eventWebhook Body: Sisbajud
{
"webhook_type": "baas.account.block_event",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"account_key": "ca2c934e-5970-4c15-bdef-87e1b5c204e3",
"blocked_balance": 100,
"origin_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"origin_type": "sisbajud",
"block_details": {
"block_order_protocol": "20250028399883",
"block_order_sequence": "00005",
"requester_judge": "JUIZ DE DIREITO",
"defendant_document_number": "15717553064",
"case_number": "07279467320148070007",
"court_code": "44815",
"requested_amount": 10000,
"lawsuit_author_name": "Pamela Janssen de Araujo Clemente",
"institution_document_number": null,
"lawsuit_type": "labor",
"protocol_datetime": "2025-02-19T10:00:00.000Z"
}
}
}
Webhook Body Params
| 字段 | 类型 | 描述 | 最大字符数 |
|---|---|---|---|
| webhook_type | string | 定义报告事件类型的枚举值 | 23 |
| blocked_balance | string | Webhook 发送日期和时间 | 20 |
| data | string | 司法令相关数据 | data 对象 |