跳到主要内容

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_transaction
Response 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_transaction
Webhook 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_feeTED 手续费
credit_operation_fee信贷开户手续费
internal_funds_transfer内部转账
incoming_funds_transfer入账转账
outgoing_funds_transferTED
deposit存款
withdrawal转账
withdrawal_reversal转账冲销
trade_funds_transfer让渡支付转账
settlement_funds_transfer清算转账
bank_slip_feeBoleto 手续费
bank_slip_settlementBoleto 清算
outgoing_funds_transfer_reversalTED 冲销
incoming_funds_transfer_refusal转账被拒
electronic_funds_fee_reversalTED 手续费冲销
monthly_account_fee_reversal账户维护费冲销
bank_slip_fee_reversalBoleto 手续费冲销
correspondent_bank_transfer银行代理转账
credit_analysis_fee信贷分析手续费
credit_operation_fee_reversal信贷开户手续费冲销
financial_investments_income金融投资收益
bank_slip_settlement_reversalBoleto 清算冲销
bank_slip_settlement_expense_reversalBoleto 清算手续费冲销
bank_slip_settlement_incoming_reversalBoleto 清算收款冲销
correspondent_bank_transfer_reversal银行代理转账冲销
credit_analysis_fee_reversal信贷分析手续费冲销
doc_expense_reversalDOC 手续费冲销
incoming_doc_reversalDOC 入账冲销
operation_disbursement_reversal操作放款冲销
operation_settling_reversal操作付款冲销
outgoing_doc_reversalDOC 出账冲销
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_paymentBoleto 支付
bank_slip_payment_reversalBoleto 支付冲销
warranty_analysis_fee担保分析手续费
bank_slip_settlement_depositBoleto 清算
bank_slip_payment_withdrawalBoleto 支付
account_setup_fee开户手续费
account_setup_fee_reversal开户手续费冲销
bank_slip_payment_withdrawal_reversalBoleto 支付冲销
incoming_anticipation_of_receivable-
incoming_credit_card_settlement信用卡清算
incoming_debit_card_settlement借记卡清算
assignment_automatic_transfer自动让渡扣款
assignment_automatic_transfer_reversal自动让渡扣款冲销
pix_feePIX 手续费
incoming_pix_transferPIX 入账
outgoing_pix_transferPIX 出账
pix_fee_reversalPIX 手续费冲销
incoming_pix_transfer_reversalPIX 入账冲销
outgoing_pix_transfer_reversalPIX 出账冲销
pix_depositPIX 存款
pix_withdrawalPIX 转账
pix_withdrawal_reversalPIX 转账冲销
pix_chargeback_withdrawal发送 PIX 退款
outgoing_pix_chargebackPIX 退款出账
incoming_pix_chargeback收到 PIX 退款
pix_chargeback_depositPIX 退款入账
pix_chargeback_withdrawal_reversal发送 PIX 退款冲销
outgoing_pix_chargeback_reversalPIX 退款出账冲销
incoming_pix_chargeback_reversal收到 PIX 退款冲销
operation_pix_disbursement操作 PIX 放款
operation_pix_disbursement_reversal操作 PIX 放款冲销
receivables_inquiry_fee应收账款查询手续费
pix_deposit_reversalPIX 存款冲销
internal_pix_transferPIX 转账
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_event
Webhook 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_typestring定义报告事件类型的枚举值23
blocked_balancestringWebhook 发送日期和时间20
datastring司法令相关数据data 对象

data 对象

字段类型描述最大字符数
account_keystringQI 账户唯一识别密钥36
blocked_balancenumber冻结余额15
origin_keystring司法令来源唯一识别密钥36
origin_typestring司法令来源origin_type 枚举值
block_detailsstring冻结详情block_details 对象

block_details 对象

字段类型描述最大字符数
block_order_protocolnumber司法冻结令协议号14
block_order_sequencenumber冻结序列号5
requester_judgestring法官115
defendant_document_numbernumber被告文件号14
case_numbernumber案件编号30
court_codestring负责法院代码5
requested_amountnumber申请冻结金额15
lawsuit_author_namestring诉讼原告姓名115
institution_document_numbernumber机构文件号14
lawsuit_typeenumerator诉讼类型lawsuit_type 枚举值
protocol_datetimestring冻结令日期和时间20

lawsuit_type 枚举值

枚举值描述
civil民事诉讼
criminal刑事诉讼
labor劳动诉讼
tax税务诉讼
food抚养诉讼

origin_type 枚举值

枚举值类型描述
credit_operationstring信贷操作
credit_operation_installmentstring信贷分期还款
wallet_tradestring钱包操作
wallet_settlementstring钱包清算
ted_incomingstring收到 TED
ted_outgoingstring发送 TED
bank_slip_expensestringBoleto 费用
bank_slipstringBoleto
bank_slip_cnabstringCNAB Boleto
future_transactionstring未来交易
internal_operationstring内部操作
legostringLego
silocstringSILOC
bank_slip_paymentstringBoleto 支付
movement_requeststring变动申请
slcstringSLC
juliusstringJulius
batch_disbursementstring批量放款
card_transactionstring银行卡交易
credit_transferstring信贷转账
pix_outgoingstring发送 PIX
pix_incomingstring收到 PIX
collateralstring担保
celcoinstringCelcoin
investmentstring投资
routingstring路由
c3stringC3
billingstring账单
disbursementstring放款
rebatestring返点
card_invoicestring信用卡账单
b3_operationstringB3 操作
bill_paymentstring账单支付
medstringMED
peer_to_peerstring对等转账
settlement_notificationstring清算通知
reversal_notificationstring冲销通知
insurance_premiumstring保险费
liquidationstring清算
purchasestring购买
lending_billingstring贷款账单
lending_rebatestring贷款返点
sisbajudstringSISBAJUD

lawsuit_type 枚举值

枚举值类型描述
civilstring民事诉讼
criminalstring刑事诉讼
laborstring劳动诉讼
taxstring税务诉讼
foodstring抚养诉讼

账户封锁 Webhook

账户封锁 Webhook 在账户被封锁时发送。

WEBHOOK_TYPE
baas.account.status_change
Webhook Body
{
"webhook_type": "baas.account.status_change",
"webhook_datetime": "2021-10-22T20:30:23.459Z",
"data": {
"account_key":"b91eb198-df87-456d-8ad2-0278f866c1f3",
"account_status":"blocked",
"block_reason":"judicially_suspended"
}
}

block_reason 列表

描述
judicially_suspended司法令冻结
pawn质押冻结
pending_fee待缴手续费冻结
missing_credit_operation_payment未支付信贷操作款项冻结
pending_setup_payment未支付开户手续费冻结
fraud涉嫌欺诈冻结