跳到主要内容

单张 Boleto 发行(即时)

重要

要注册 bolePix,必须在将要注册 Boleto 的账户中存在有效的随机 Pix 密钥。

对于即时注册单张 Boleto,创建请求的响应(同步响应)将直接返回已注册(或被拒绝)的 Boleto。Nuclea/CIP 对 Boleto 注册的确认/拒绝时间已包含在此端点的响应时间内。

Request

ENDPOINT
/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/bank_slip/instant
MÉTODO
POST

路径参数

字段类型描述字符数
account_keyuuidv4账户唯一标识密钥,格式为 uuid v436
requester_profile_keyuuidv4钱包唯一标识密钥,格式为 uuid v436
Request Body
{
"request_control_key": "0d496b4d-01f6-48cd-8ec9-9ead1e43f156",
"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": "2024-12-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": "01001000",
"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": "01001000",
"city": "Peaceful Town",
"state": "RJ",
"complement": "House 1",
},
"document_number": "23456789012",
"person_type": "natural",
},
"pix_key": "06797774-e050-419e-a91a-c64c919b52c7",
"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": false,
"send_after_due_date": false,
"send_on_protest": false
}
}

请求体参数

字段类型描述字符数
request_control_key *uuidv4客户请求唯一标识密钥,格式为 uuid v436
our_numberintegerBoleto 在钱包中的唯一识别编号,可由客户提供,若未提供则由 QI Tech 自动生成11
document_numberstringBoleto 识别编号,可为电子发票编号10
participant_control_numberstring参与方控制号码25
amount *floatBoleto 基准金额-
expiration *string到期日10
bank_teller_instructionsstring给付款方的备注。最多接受 320 个字符,分布在最多 7 行中。每行最多 90 个字符,若超过则自动换行320
rebate_amountfloatBoleto 减免金额,将在基准金额之上应用-
max_payment_daysintegerBoleto 到期后可供支付的最大自然日数(最多 365 天)-
financial_instrument_typestringBoleto 类型financial_instrument_type 枚举值
partial_payment_dataobject部分支付配置partial_payment_data 对象
write_off_dataobject核销配置write_off_data 对象
protest_dataobject抗议配置protest_data 对象
bankruptcy_protest_dataobject破产抗议配置bankruptcy_protest_data 对象
fine_dataobject罚款配置fine_data 对象
interest_dataobject利息配置interest_data 对象
discounts_dataobject array折扣配置discount 对象
payer_data *object付款方数据payer_data 对象
guarantor_dataobject担保人数据guarantor_data 对象
pix_keyuuidv4随机类型 Pix 密钥36
BolePix

若在请求中发送可选参数 pix_key,将生成 bolePix。bolePix 是一种付款与 Pix QR Code 绑定的 Boleto。付款方既可通过 Boleto 的可打印行付款,也可扫描关联的 Pix QR Code 付款。若通过 QR Code 付款,资金即时到账,而相关的银行回执和 Webhook 将与普通 Boleto 一样生成。

重要提示: 要注册 bolePix,必须在将要注册 Boleto 的账户中存在有效的随机 Pix 密钥。

钱包默认配置

若请求中未发送 max_payment_dayswrite_off_dataprotest_databankruptcy_protest_datafine_datainterest_datapix_key 字段,且钱包中存在默认配置(即 requester_profileconfiguration_data 中分别有 max_payment_dayswrite_off_settingsprotest_settingsbankruptcy_protest_settingsfine_settingsinterest_settingsqr_code_settings),则发行时将使用这些默认配置。

限制和约束
  • 部分支付 Boleto: 不允许通过 Pix QR Code 付款。因此,不允许在注册时发送 pix_key,也不允许为钱包设置 bolePix 生成的默认配置

  • 信用卡 Boleto: 不需要也不允许发送减免、折扣、罚款和利息信息。这是因为市场惯例中,许多金融机构不接受包含这些信息的信用卡 Boleto 付款。钱包也不能将这些配置设为默认值。因此,此类 Boleto 即使在到期后也可部分支付,当前账单不产生利息、罚款、折扣或减免。若要应用这些值,需要在下一账单中包含,可通过 Boleto 的金额编辑事件或发行包含这些值的新 Boleto 来实现。此类 Boleto 可发送 amount = 0

重要提示: credit_card 类型的 Boleto 必须支持部分支付,因此需要提供 partial_payment_data 信息或在钱包中设置此默认配置。若未发送 financial_instrument_type 字段,默认值为 digital_commercial_invoice

钱包建议
  • 标准 Boleto 钱包: 保持罚款、利息和抗议的默认配置
  • 部分支付 Boleto 钱包: 无 Pix 配置,并设置部分支付规则
  • 信用卡 Boleto 钱包: 无罚款、利息、折扣或减免配置

创建专用钱包可确保每种类型 Boleto 的默认配置适当,并避免业务规则冲突。

状态机

部分支付 Boleto 的状态机有所不同。详情请参阅**简介**,其中包含如何按照市场最佳实践对 Boleto 应用利息和罚款的说明。

financial_instrument_type 枚举值

枚举值描述
digital_commercial_invoiceDMI 商业发票指定复本
credit_card信用卡
check支票
digital_commercialDM 商业复本
digital_service_invoice服务复本
digital_service_invoice_indicationDSI 服务复本指定
digital_rural_invoiceDR 农村复本
bill_of_exchangeLC 汇票
commercial_credit_noteNCC 商业信贷票据
export_credit_noteNCE 出口信贷票据
industrial_credit_noteNCI 工业信贷票据
rural_credit_noteNCR 农村信贷票据
promissory_noteNP 本票
rural_promissory_noteNPR 农村本票
mercantile_triplicateTM 商业三联单
service_triplicateTS 服务三联单
insurance_noteNS 保险票据
receiptRC 收据
printed_bank_slipFAT 票据
debit_noteND 借记票据
insurance_policyAP 保险单
school_monthly_feeME 学费月付款
consortium_installmentPC 联合体分期付款
invoiceNF 发票
debt_documentDD 债务文件
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_percentagefloat允许的最小部分支付百分比-
partial_payment_minimum_amountfloat允许的最小部分支付金额-
partial_payment_maximum_typestring部分支付最大金额类型partial_payment_type 枚举值
partial_payment_maximum_percentagefloat允许的最大部分支付百分比-
partial_payment_maximum_amountfloat允许的最大部分支付金额-
partial_payment_quantity *integer允许的部分支付次数-
注意!

根据 partial_payment_minimum_typepartial_payment_maximum_type 字段发送的值,需要相应发送 partial_payment_minimum_amountpartial_payment_minimum_percentage,以及 partial_payment_maximum_amountpartial_payment_maximum_percentage

partial_payment_type 枚举值

枚举值描述
absolute绝对金额
percentage百分比

write_off_data 对象

字段类型描述字符数
days_to_write_off *integerBoleto 到期后自动核销的天数-

protest_data 对象

字段类型描述字符数
days_to_protest *integerBoleto 到期后自动抗议的天数-

bankruptcy_protest_data 对象

字段类型描述字符数
days_to_bankruptcy_protest *integerBoleto 到期后自动破产抗议的天数-

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=calendar_days_daily_amountinterest_type=workdays_daily_amount

字段类型描述字符数
interest_type *string利息类型interest_type 枚举值
interest_amount *float每单位时间(工作日或自然日)收取的利息金额-
days_to_interest *integer到期后开始收取利息的天数-

选项 2:百分比利息(interest_type=calendar_days_monthly_percentage

字段类型描述字符数
interest_type *string利息类型interest_type 枚举值
interest_percentage *integer每单位时间(工作日或自然日)收取的利息百分比-
days_to_interest *integer到期后开始收取利息的天数-

interest_type 枚举值

枚举值描述
calendar_days_daily_amount按自然日计算的每日金额
workdays_daily_amount按工作日计算的每日金额
calendar_days_monthly_percentage按自然日计算的月利率百分比

discount 对象

选项 1:绝对值折扣

字段类型描述字符数
discount_amount *float每单位时间的绝对折扣金额-
discount_number *integer折扣编号-
discount_type *string折扣类型(绝对值)discount_type 枚举值
discount_limit_date *string折扣截止日期10

选项 2:百分比折扣

字段类型描述字符数
discount_percentage *float每单位时间的折扣百分比-
discount_number *integer折扣编号-
discount_type *string折扣类型(百分比)discount_type 枚举值
discount_limit_date *string折扣截止日期10
注意!

一张 Boleto 最多可有三个折扣,且所有折扣必须为同一类型,即具有相同的 discount_type。折扣编号必须从 1 开始,按递增顺序编号,最大到 3

discount_type 枚举值

枚举值描述
absolute固定金额
anticipation_calendar_days_daily_amount按自然日计算的提前还款每日折扣金额
anticipation_workdays_daily_amount按工作日计算的提前还款每日折扣金额
percentage固定百分比
anticipation_calendar_days_daily_percentage按自然日计算的提前还款月折扣百分比
anticipation_workdays_daily_percentage按工作日计算的提前还款年折扣百分比

payer_data 和 guarantor_data 对象

字段类型描述字符数
name *string全名100
document_number *string证件号码(CPF/CNPJ)11 或 14
person_type *string人员类型person_type 枚举值
contactobject联系信息contact 对象
addressobject地址address 对象

person_type 枚举值

枚举值描述
natural自然人
legal法人

contact 对象

字段类型描述字符数
emailstring联系邮箱320
phoneobject联系电话phone 对象

phone 对象

字段类型描述字符数
country_code *string国际区号(DDI)3
area_code *string地区区号(DDD)2
number *string电话号码9

address 对象

字段类型描述字符数
street *string街道500
number *string门牌号6
complementstring补充500
neighborhood *string社区100
postal_code *string邮编8
city *string城市100
state *string州(UF)state 枚举值

state 枚举值

枚举值描述
ACAcre
ALAlagoas
AMAmazonas
APAmapá
BABahia
CECeará
DFDistrito Federal
ESEspírito Santo
GOGoiás
MAMaranhão
MGMinas Gerais
MSMato Grosso do Sul
MTMato Grosso
PAPará
PBParaíba
PEPernambuco
PIPiauí
PRParaná
RJRio de Janeiro
RNRio Grande do Norte
RORondônia
RRRoraima
RSRio Grande do Sul
SCSanta Catarina
SESergipe
SPSão Paulo
TOTocantins
EX其他

notification 对象

字段类型描述字符数
document_number *string接收通知者的证件号码(CPF/CNPJ)11 或 14
name *string接收通知者姓名100
emailstring通知发送邮箱320
phoneobject通知发送联系电话phone 对象
send_2_way *boolean发送副本-
send_before_due_date *boolean在到期日前向付款方发送通知-
send_after_due_date *booleanBoleto 到期时向付款方发送通知-
send_on_protest *boolean进入抗议流程时发送通知-

Response

STATUS
201
Response Body: 已注册 Boleto
{
"request_control_key": "6e290347-330d-4b3a-8ebb-2ac217ad6eb3",
"bank_slip_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"bank_slip_status": "registered",
"our_number": 92580722204,
"barcode": "32998995900000892812147469258072220406456140",
"digitable_line": "32992147466925807222704064561402899590000089281",
"qr_code_data": {
"qr_code_key": "bc5cb30c-8f98-4273-b405-3546da1d8d7a",
"pix_key": "06797774-e050-419e-a91a-c64c919b52c7",
"receiver_conciliation_id": "01GVGV9NXBCY287Z6CJ4S0ENW9",
"url": "00020126830014br.gov.bcb.pix2561qrcode.qitech.app/bacen/cobv/58fd5103a8e64bbbab2fd49b0bd580145204000053039865802BR5925GONNFUNDODEINVESTIMENTOEM6012RiodeJaneiro6107226401262070503***6304EA0D",
"image": "<base64 encoded QR code image>"
}
}
STATUS
202
Response Body: 待注册 Boleto
{
"request_control_key": "f14e9bac-94ed-4eb1-87b4-7fd7b7a2d280",
"bank_slip_key": "e8599844-5cad-40b4-8716-cb4770d415b4",
"bank_slip_status": "accepted"
}
说明

若返回 HTTP Status 202bank_slip_status 值为 accepted,则不应重试发行。

此发行将异步处理。需要通过查询 Boleto 来验证状态,或等待接收Webhook 页面中描述的确认 Webhook。

响应体参数

字段类型描述字符数
request_control_key *uuidv4客户请求唯一标识密钥,格式为 uuid v436
bank_slip_key *uuidv4Boleto 唯一标识密钥,格式为 uuid v436
bank_slip_status *stringBoleto 状态bank_slip_status 枚举值
our_number *integerBoleto 在钱包中的唯一识别编号11
barcode *stringBoleto 条形码44
digitable_line *stringBoleto 可打印行47
qr_code_dataobjectQR Code 数据qr_code_data 对象
created_at *string事件创建日期,ISO 格式(UTC - "YYYY-MM-DDTHH:MM:SSZ")20

bank_slip_status 枚举值

枚举值描述
acceptedBoleto 已接受但尚未注册
registeredBoleto 已注册

qr_code_data 对象

字段类型描述字符数
qr_code_keyuuidv4QR Code 唯一标识密钥36
pix_keyuuidv4与 QR Code 关联的 PIX 密钥36
receiver_conciliation_iduuidv4QR Code 对账标识符36
urlstringQR Code 的 URL(Pix 复制粘贴)-
imagestringQR Code URL 的 base64 编码图片-

错误响应

STATUS
4xx
Response Body: 错误
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP 状态码
status
QI 代码
code
标题
title
英文描述
description
葡语描述
translation
400QIT000001Bad RequestSchema ErrorSchema Inválido
404BKS000004Not FoundPix key not found: {pix_key}Chave pix não encontrada: {pix_key}
403BKS000005ForbiddenUser is not allowed to do this actionUsuário não tem autorização para fazer essa ação
404BKS000006Not FoundThe source account key was not found.A chave da conta de origem não foi encontrada.
400BKS000007Bad RequestIt was not possible to consult the source account at this time. Please try again in a few minutes.Não foi possível consultar a conta de origem neste momento. Por favor, tente novamente em alguns minutos.
400BKS000008Bad RequestThe source account is closed.A conta de origem está fechada.
400BKS000009Bad RequestThe source account is blocked.A conta de origem está bloqueada.
403BKS000010ForbiddenThe pix key owner does not match the account owner.O proprietário da chave pix não corresponde ao proprietário da conta.
404BKS000013Not FoundRequester profile not foundCarteira não encontrada
409BKS000014ConflictRequest control key already sent or duplicated sent: {request_control_key}Chave de controle da requisição já utilizada ou enviada duplicada: {request_control_key}
400BKS000016Bad RequestExpiration date must be greater than the current date and have a maximum of 3650 days from the current date.A data de vencimento deve ser maior que a data atual e possuir no máximo 3650 dias corridos a partir da data atual.
409BKS000017ConflictOur number already used or duplicated sent: {our_number}Nosso número já utilizado ou enviado duplicado: {our_number}
400BKS000018Bad RequestThe discount dates must be less than the expiration date and increasing.A data dos descontos devem ser menores que a de expiração e crescentes.
400BKS000019Bad RequestPayer address is required for protest.Endereço do pagador é obrigatório para protesto.
500BKS000021Internal Server ErrorError while trying to generate QR Code.Erro ao tentar gerar QR Code de pagamento.
400BKS000022Bad RequestRequester profile is not opened.Carteira não está aberta.
400BKS000023Bad RequestThe amount must be greater than zero.O valor deve ser maior que zero.
400BKS000024Bad RequestError while registering bank slip.Erro ao registrar boleto.
400BKS000026Bad RequestGuarantor address is required for protest.Endereço do sacador é obrigatório para protesto.
404BKS000028Not FoundNotary office attended region not found for postal code: {postal_code}Região de cartório não encontrada para o CEP: {postal_code}
400BKS000043Bad RequestInvalid discount numbering. Discounts must be numbered in ascending order and start on 1.Numeração dos descontos inválida. Os descontos devem ser numerados em ordem crescente e começar em 1.
400BKS000045Bad RequestRebate amount can not be equal or greater than the bank slip amount.O valor do rebate não pode ser igual ou maior do que o valor do boleto.
400BKS000047Bad RequestIt was not possible to consult the sent pix key at this time. Please try again in a few minutes.Não foi possível consultar a chave pix enviada no momento. Por favor, tente novamente em alguns minutos.
400BKS000125Bad RequestPartial payment data is required for this bank slip species type.Os dados de pagamento parcial são obrigatórios para o tipo de boleto fornecido.
400BKS000128Bad RequestQR code payment is not allowed for partial payment.Pagamento via QR code não é permitido para pagamento parcial.
400BKS000131Bad RequestRebate amount is not allowed for this bank slip species type.O valor de abatimento não é permitido para o tipo de boleto fornecido.
400BKS000132Bad RequestDiscount data is not allowed for this bank slip species type.Os dados de desconto não são permitidos para o tipo de boleto fornecido.
400BKS000133Bad RequestFine data is not allowed for this bank slip species type.Os dados de multa não são permitidos para o tipo de boleto fornecido.
400BKS000134Bad RequestInterest data is not allowed for this bank slip species type.Os dados de juros não são permitidos para o tipo de boleto fornecido.
400BKS000136Bad RequestOnly credit card financial instrument type can have zero amount.Apenas o tipo de instrumento financeiro cartão de crédito pode ter valor zero.