批量 Boleto 发行
重要
要注册 bolePix,必须在将要注册 Boleto 的账户中存在有效的随机 Pix 密钥。
批量 Boleto 发行仅以异步方式进行。若某张 Boleto 在验证所提供信息时失败,则同一请求中的所有 Boleto 均不会被注册。
注意!
由于这是异步注册,当每张 Boleto 状态从 accepted 变更为 registered 或 rejected 时,申请方将通过 Webhook 收到通知。
Request
ENDPOINT
/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/bank_slip/batchMÉTODO
POST路径参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key | uuidv4 | 账户唯一标识密钥,格式为 uuid v4 | 36 |
requester_profile_key | uuidv4 | 钱包唯一标识密钥,格式为 uuid v4 | 36 |
Request Body
{
"bank_slips": [
{
"request_control_key": "c86d8902-a5ae-4d1f-8872-e6fea1268aab",
"our_number": 123456789,
"document_number": "DOC4561237",
"amount": 5000.00,
"expiration": "2025-01-01",
"bank_teller_instructions": "Confirm payment",
"protest_data": {"days_to_protest": 7},
"bankruptcy_protest_data": {"days_to_bankruptcy_protest": 14},
"max_payment_days": 45,
"fine_data": {"fine_type": "absolute", "fine_amount": 100.00, "days_to_fine": 10},
"interest_data": {
"interest_type": "workdays_daily_amount",
"interest_amount": 10.00,
"days_to_interest": 2,
},
"financial_instrument_type": "digital_commercial_invoice",
"write_off_data": {"days_to_write_off": 365},
"rebate_amount": 200.00,
"discounts_data": [
{
"discount_amount": 50.00,
"discount_number": 1,
"discount_type": "absolute",
"discount_limit_date": "2025-01-01",
}
],
"payer_data": {
"name": "Global Tech",
"contact": {
"email": "finance@globaltech.com",
"phone": {"country_code": "055", "area_code": "11", "number": "987654321"},
},
"address": {
"street": "101 High St.",
"neighborhood": "Tech Park",
"number": "202",
"postal_code": "49069234",
"city": "Innovation City",
"state": "SP",
"complement": "Building A",
},
"document_number": "12345678000195",
"person_type": "legal",
},
"guarantor_data": {
"name": "Jane Doe",
"contact": {
"email": "jane.doe@qitech.com.br",
"phone": {"country_code": "055", "area_code": "11", "number": "999999999"},
},
"address": {
"street": "202 Elm St.",
"neighborhood": "Quiet Neighborhood",
"number": "303",
"postal_code": "35700854",
"city": "Peaceful Town",
"state": "RJ",
"complement": "House 1",
},
"document_number": "23456789012",
"person_type": "natural",
},
"pix_key": "78252991-d26d-4d6b-8c50-be3233ffabf7",
"notification": {
"document_number": "12345678000195",
"name": "Global Tech",
"email": "finance@globaltech.com",
"phone": {"country_code": "055", "area_code": "11", "number": "987654321"},
"send_2_way": true,
"send_before_due_date": true,
"send_after_due_date": true,
"send_on_protest": true
}
},
{
"request_control_key": "b3a428fd-58ee-4d6f-8872-633874ebf5e2",
"our_number": 987654321,
"document_number": "DOC4561237",
"amount": 5000.00,
"expiration": "2025-01-01",
"bank_teller_instructions": "Confirm payment",
"protest_data": {"days_to_protest": 7},
"bankruptcy_protest_data": {"days_to_bankruptcy_protest": 14},
"max_payment_days": 45,
"fine_data": {"fine_type": "absolute", "fine_amount": 100.00, "days_to_fine": 10},
"interest_data": {
"interest_type": "workdays_daily_amount",
"interest_amount": 10.00,
"days_to_interest": 2
},
"financial_instrument_type": "digital_commercial_invoice",
"write_off_data": {"days_to_write_off": 365},
"rebate_amount": 200.00,
"discounts_data": [
{
"discount_amount": 50.00,
"discount_number": 1,
"discount_type": "absolute",
"discount_limit_date": "2025-01-01"
}
],
"payer_data": {
"name": "Global Tech",
"contact": {
"email": "finance@globaltech.com",
"phone": {"country_code": "055", "area_code": "11", "number": "987654321"},
},
"address": {
"street": "101 High St.",
"neighborhood": "Tech Park",
"number": "202",
"postal_code": "79071231",
"city": "Innovation City",
"state": "SP",
"complement": "Building A"
},
"document_number": "12345678000195",
"person_type": "legal"
},
"guarantor_data": {
"name": "Jane Doe",
"contact": {
"email": "jane.doe@qitech.com.br",
"phone": {"country_code": "055", "area_code": "11", "number": "999999999"},
},
"address": {
"street": "202 Elm St.",
"neighborhood": "Quiet Neighborhood",
"number": "303",
"postal_code": "65066380",
"city": "Peaceful Town",
"state": "RJ",
"complement": "House 1"
},
"document_number": "23456789012",
"person_type": "natural"
}
}
]
}
请求体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
bank_slips * | bank_slip 对象 数组 | 待注册的 Boleto 列表 | - |
bank_slip 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key * | uuidv4 | 客户请求唯一标识密钥,格式为 uuid v4 | 36 |
our_number | integer | Boleto 在钱包中的唯一识别编号,可由客户提供, 若未提供则由 QI Tech 自动生成 | 11 |
document_number | string | Boleto 识别编号 | 10 |
participant_control_number | string | 参与方控制号码 | 25 |
amount * | float | Boleto 基准金额 | - |
expiration * | string | 到期日 | 10 |
bank_teller_instructions | string | 注册附加说明,将显示在 Boleto PDF 中。最多接受 320 个字符,分布在最多 7 行中 | 320 |
rebate_amount | float | Boleto 减免金额,将在基准金额之上应用 | - |
max_payment_days | integer | Boleto 到期后可供支付的最大自然日数(最多 365 天) | - |
financial_instrument_type | string | Boleto 类型 | financial_instrument_type 枚举值 |
partial_payment_data | object | 部分支付配置 | partial_payment_data 对象 |
write_off_data | object | 核销配置 | write_off_data 对象 |
protest_data | object | 抗议配置 | protest_data 对象 |
bankruptcy_protest_data | object | 破产抗议配置 | bankruptcy_protest_data 对象 |
fine_data | object | 罚款配置 | fine_data 对象 |
interest_data | object | 利息配置 | interest_data 对象 |
discounts_data | object array | 折扣配置 | discount 对象 |
payer_data * | object | 付款方数据 | payer_data 对象 |
guarantor_data | object | 担保人数据 | guarantor_data 对象 |
pix_key | uuidv4 | 随机类型 Pix 密钥 | 36 |
BolePix
若在请求中发送可选参数 pix_key,将生成 bolePix。重要提示: 要注册 bolePix,必须在将要注册 Boleto 的账户中存在有效的随机 Pix 密钥。
钱包默认配置
若请求中未发送 max_payment_days、write_off_data、protest_data、bankruptcy_protest_data、fine_data、interest_data 和 pix_key 字段,且钱包中存在默认配置,则发行时将使用这些默认配置。
限制和约束
- 部分支付 Boleto: 不允许通过 Pix QR Code 付款。
- 信用卡 Boleto: 不需要也不允许发送减免、折扣、罚款和利息信息。此类 Boleto 必须支持部分支付。若未发送
financial_instrument_type字段,默认值为digital_commercial_invoice。
钱包建议
- 标准 Boleto 钱包: 保持罚款、利息和抗议的默认配置
- 部分支付 Boleto 钱包: 无 Pix 配置,并设置部分支付规则
- 信用卡 Boleto 钱包: 无罚款、利息、折扣或减免配置
状态机
部分支付 Boleto 的状态机有所不同。详情请参阅**简介**。
financial_instrument_type 枚举值
| 枚举值 | 描述 |
|---|---|
| digital_commercial_invoice | DMI 商业发票指定复本 |
| credit_card | 信用卡 |
| check | 支票 |
| digital_commercial | DM 商业复本 |
| digital_service_invoice | 服务复本 |
| digital_service_invoice_indication | DSI 服务复本指定 |
| digital_rural_invoice | DR 农村复本 |
| bill_of_exchange | LC 汇票 |
| commercial_credit_note | NCC 商业信贷票据 |
| export_credit_note | NCE 出口信贷票据 |
| industrial_credit_note | NCI 工业信贷票据 |
| rural_credit_note | NCR 农村信贷票据 |
| promissory_note | NP 本票 |
| rural_promissory_note | NPR 农村本票 |
| mercantile_triplicate | TM 商业三联单 |
| service_triplicate | TS 服务三联单 |
| insurance_note | NS 保险票据 |
| receipt | RC 收据 |
| printed_bank_slip | FAT 票据 |
| debit_note | ND 借记票据 |
| insurance_policy | AP 保险单 |
| school_monthly_fee | ME 学费月付款 |
| consortium_installment | PC 联合体分期付款 |
| invoice | NF 发票 |
| debt_document | DD 债务文件 |
| rural_product_certificate | 农村产品证书 |
| warrant | 权证 |
| state_active_debt | 州活跃债务 |
| municipal_active_debt | 市活跃债务 |
| federal_active_debt | 联邦活跃债务 |
| condominium_charges | 公寓费用 |
| proposal_bank_slip | 提案 Boleto |
| deposit_and_contribution_bank_slip | 存款和认购 Boleto |
| others | 其他 |
partial_payment_data 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
partial_payment_minimum_type * | string | 部分支付最小金额类型 | partial_payment_type 枚举值 |
partial_payment_minimum_percentage | float | 允许的最小部分支付百分比 | - |
partial_payment_minimum_amount | float | 允许的最小部分支付金额 | - |
partial_payment_maximum_type | string | 部分支付最大金额类型 | partial_payment_type 枚举值 |
partial_payment_maximum_percentage | float | 允许的最大部分支付百分比 | - |
partial_payment_maximum_amount | float | 允许的最大部分支付金额 | - |
partial_payment_quantity * | integer | 允许的部分支付次数 | - |
partial_payment_type 枚举值
| 枚举值 | 描述 |
|---|---|
| absolute | 绝对金额 |
| percentage | 百分比 |
write_off_data 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
days_to_write_off * | integer | Boleto 到期后自动核销的天数 | - |
protest_data 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
days_to_protest * | integer | Boleto 到期后自动抗议的天数 | - |
bankruptcy_protest_data 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
days_to_bankruptcy_protest * | integer | Boleto 到期后自动破产抗议的天数 | - |
fine_data 对象
选项 1:绝对值罚款(fine_type=absolute)
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
fine_type * | string | 罚款类型 | fine_type 枚举值 |
fine_amount * | float | 罚款绝对值 | - |
days_to_fine * | integer | 到期后开始收取罚款的天数 | - |
选项 2:百分比罚款(fine_type=percentage)
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
fine_type * | string | 罚款类型 | fine_type 枚举值 |
fine_percentage * | integer | 罚款百分比,1 至 100 | - |
days_to_fine * | integer | 到期后开始收取罚款的天数 | - |
fine_type 枚举值
| 枚举值 | 描述 |
|---|---|
| absolute | 绝对值 |
| percentage | 百分比 |
interest_data 对象
选项 1:绝对值利息
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
interest_type * | string | 利息类型 | interest_type 枚举值 |
interest_amount * | float | 每单位时间(工作日或自然日)收取的利息金额 | - |
days_to_interest * | integer | 到期后开始收取利息的天数 | - |
选项 2:百分比利息
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
interest_type * | string |