跳到主要内容

银行票据支付确认

此端点用于确认银行票据支付。

银行票据

这是常规银行票据(数字行不以数字8开头)。在银行间支付结算所(CIP/Núclea)注册,可在巴西中央银行授权的金融和支付机构付款。

Request

请求端点

ENDPOINT
/account/ACCOUNT_KEY/payment/PAYMENT_KEY/bank_slip/validate_token
MÉTODO
PATCH

请求路径参数

字段类型描述字符数
account_key *uuid4账户唯一标识键。36
payment_key *uuid4支付唯一标识键。36

通过电子邮件和短信验证

Request Body: 银行票据支付确认
{
"token": "329adf"
}

通过设备验证

要通过设备审批并完成验证,请求需发送空载荷。验证在内部完成,请求正文中无需附加信息。请注意,此端点只应在支付请求已启动后使用。

Request Body: 银行票据支付确认
{

}

Body 参数

字段类型描述字符数
tokenstring发送给账户转账审批人的验证码,通过短信或电子邮件 TFA 时必填6

Response

成功响应

STATUS
200
Response Body: 支付已执行
{
"payment_key":"c4325104-d60b-44f3-aae4-49155564a2ea",
"request_control_key":"b713b2f6-2f48-4d18-b0c9-7186e4edf189",
"payer_name":"COOPERATIVA INDUSTRIAL MURILO",
"payer_document_number":"00037025000160",
"source_account_key":"6dc89d57-fac7-4643-b151-cd2ca0a7f68f",
"transaction_key":"4e80070a-a0bb-4be2-8178-55fbd73a3704",
"transaction_revert_key":null,
"paid_amount":1050.1,
"payment_date":"2024-04-03",
"payment_type":"bank_slip",
"bank_slip": {
"bank_slip_key":"95080ffd-3ac5-48d7-b3fe-659e4aaba81a",
"barcode":"00193967000009910000000003615574000000002417",
"digitable_line":"00190000090361557400500000024174396700000991000",
"payer_name":"COOPERATIVA TESTE",
"payer_document_number":"00037025000160",
"beneficiary_name":"TESTE EQUIPAMENTOS E SERVICOS LTDA",
"beneficiary_trading_name":"TESTE EQUIPAMENTOS E SERVICOS LTDA",
"beneficiary_document_number":"52069937000117",
"beneficiary_bank_ispb":"00000000",
"guarantor_name":null,
"guarantor_document_number":null,
"expiration_date":"2024-03-29",
"max_payment_data": "2026-03-29",
"partial_payment_indicator":"allowed",
"registered_payment_amount":9029.0,
"nominal_amount":9910.0,
"total_amount":10129.1,
"rebate_amount":0.0,
"discount_amount":0.0,
"fine_amount":0.0,
"interest_amount":219.1
},
"collection_slip":null,
"payment_status":"executed"
}
STATUS
202
Response Body: 支付待执行
{
"payment_key":"c4325104-d60b-44f3-aae4-49155564a2ea",
"request_control_key":"b713b2f6-2f48-4d18-b0c9-7186e4edf189",
"payer_name":"COOPERATIVA INDUSTRIAL MURILO",
"payer_document_number":"00037025000160",
"source_account_key":"6dc89d57-fac7-4643-b151-cd2ca0a7f68f",
"transaction_key":"4e80070a-a0bb-4be2-8178-55fbd73a3704",
"transaction_revert_key":null,
"paid_amount":1050.1,
"payment_date":"2024-04-03",
"payment_type":"bank_slip",
"bank_slip": {
"bank_slip_key":"95080ffd-3ac5-48d7-b3fe-659e4aaba81a",
"barcode":"00193967000009910000000003615574000000002417",
"digitable_line":"00190000090361557400500000024174396700000991000",
"payer_name":"COOPERATIVA TESTE",
"payer_document_number":"00037025000160",
"beneficiary_name":"TESTE EQUIPAMENTOS E SERVICOS LTDA",
"beneficiary_trading_name":"TESTE EQUIPAMENTOS E SERVICOS LTDA",
"beneficiary_document_number":"52069937000117",
"beneficiary_bank_ispb":"00000000",
"guarantor_name":null,
"guarantor_document_number":null,
"expiration_date":"2024-03-29",
"max_payment_data": "2026-03-29",
"partial_payment_indicator":"allowed",
"registered_payment_amount":9029.0,
"nominal_amount":9910.0,
"total_amount":10129.1,
"rebate_amount":0.0,
"discount_amount":0.0,
"fine_amount":0.0,
"interest_amount":219.1
},
"collection_slip":null,
"payment_status": "pending_execution"
}
说明

若返回 HTTP Status 202payment_status 字段值为 pending_execution,则不应重试该支付。

该支付将异步处理。需要通过支付查询来验证转账状态,或等待webhooks 页面中描述的待处理支付 webhook。

Response Body 参数

字段类型描述
payment_key *uuid4支付唯一标识键。
request_control_key *uuid4客户请求唯一标识键。
payer_name *string实际付款人名称。
payer_document_number *string实际付款人文件号码(CPF/CNPJ)。
source_account_key *uuid4被扣款账户密钥。
transaction_key *uuid4支付交易密钥。
transaction_revert_keyuuid4支付冲销交易密钥。
paid_amount *number实际支付金额。
payment_date *string支付日期。
payment_type *enum支付类型。
bank_slipobject银行票据。
collection_slipobject征税发票。
payment_status *enum支付状态。

payment_type 枚举值

枚举值类型描述
bank_slipstring银行票据
collection_slipstring征税发票
警告

collection_slip 枚举值不适用于银行票据流程,同样 collection_slip 对象始终为空。

payment_status 枚举值

枚举值描述
pending_execution待执行
executed已执行
reverted已冲销
rejected已拒绝
error错误
警告

对于 QI 在两分钟内未收到 CIP 响应的支付,支付将以 pending_execution 状态返回。QI 收到 CIP 响应后,将向客户发送webhooks 页面中描述的待处理支付 webhook。

bank_slip 对象

字段类型描述
barcode *string条形码。
digitable_line *string数字行。
payer_name *string付款人名称。
payer_document_number *string付款人文件号码(CPF/CNPJ)。
beneficiary_name *string受益人名称。
beneficiary_trading_namestring受益人商业名称。
beneficiary_document_number *string受益人文件号码(CPF/CNPJ)。
beneficiary_bank_ispb *string受益人银行 ISPB 代码。
guarantor_namestring保证人名称。
guarantor_document_numberstring保证人文件号码(CPF/CNPJ)。
expiration_date *string到期日期。
max_payment_date *string最大支付日期。
partial_payment_indicator *enum部分付款指示符。
registered_payment_amountstring已登记的总支付金额。
nominal_amount *number原始金额。
total_amount *number总金额。
rebate_amount *number折扣金额。
discount_amount *number优惠金额。
fine_amount *number罚款金额。
interest_amount *number利息金额。

partial_payment_indicator 枚举值

枚举值类型描述
allowedstring允许
not_allowedstring不允许

错误响应

STATUS
4XX
Response Body
{
"title": "Título",
"description": "Description in english",
"translation": "Descrição em português",
"code": "Código"
}
HTTP 代码QI 代码标题描述(英文)描述(葡文)
403BIP000010ForbiddenUser is not allowed to do this actionUsuário não tem autorização para fazer essa ação
404BIP000011Not FoundThe source account key was not found.A chave da conta de origem não foi encontrada.
400BIP000012Bad 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.
400BIP000013Bad RequestThe source account is closed.A conta de origem está fechada.
400BIP000014Bad RequestThe source account is blocked.A conta de origem está bloqueada.
400BIP000022Bad RequestBank slip payment service is closed.Serviço de pagamento de boleto está fechado.
400BIP000023Bad RequestThe source account has insufficient balance. Payment cannot be made.A conta de origem possui saldo insuficiente. Pagamento não pode ser realizado.
400BIP000025Bad RequestIt was not possible to pay the bank slip at this time. Please verify your information and, if necessary, contact us for assistance.Não foi possível pagar o boleto neste momento. Por favor, verifique suas informações e, se necessário, entre em contato conosco para assistência.
400BIP000028Bad RequestThe source account has blocked balance. Payment cannot be made.A conta de origem possui saldo em conta bloqueado. Pagamento não pode ser realizado.
400BIP000029Bad RequestBank slip payment write off rejected.Baixa de pagamento de boleto rejeitada.
404BIP000056Not FoundPayment not found.Pagamento não encontrado.
400BIP000057Bad RequestPayment status is not pending approval.Status de pagamento não é de aprovação pendente.
400BIP000058Bad RequestError while validating verification tokenErro ao validar token de verificação
400BIP000059Bad RequestNumber of verification token validation attempts exceeded.Número de tentativas de validação de token de verificação excedido.
400BIP000060Bad RequestVerification token expired.Token de verificação expirado.
400BIP000061Bad RequestVerification token validation failed.Falha na validação do token de verificação.
400BIP000062Bad RequestPayment type is not bank slip.Tipo de pagamento não é boleto.
400BIP000065Bad RequestPayment verification time window exceeded.Janela de tempo de verificação de pagamento excedida.
400BIP000080Bad RequestA token is required for SMS or email validation.Um token é necessário para validação via SMS ou email.