跳到主要内容

双因素身份验证银行票据支付请求

此端点用于发起银行票据支付请求。请求应在查询之后进行,使用返回的信息以确保流程正确运行,避免处理过程中出现错误。

银行票据

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

Request

请求端点

ENDPOINT
/account/ACCOUNT_KEY/payment/bank_slip
MÉTODO
POST

请求路径参数

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

通过电子邮件和短信验证

Request Body: 使用数字行通过短信或电子邮件 TFA 发起银行票据支付
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"digitable_line": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8,
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}
Request Body: 使用条形码通过短信或电子邮件 TFA 发起银行票据支付
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"barcode": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8,
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}

通过设备验证

除了现有的 smsemail 验证方式外,还可以使用预先注册的设备对交易进行验证。在这种情况下,session_id 需从设备扫描获取并在 tfa_info 中发送。

Request Body: 使用数字行通过设备 TFA 发起银行票据支付
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"digitable_line": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8,
"tfa_info": {
"approver_document_number": "98765432100",
"session_id": "b2f18d3a-67c2-4a7f-98e5-1d3f5c6b8a72",
"contact_type": "device"
}
}
Request Body: 使用条形码通过设备 TFA 发起银行票据支付
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"barcode": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8,
"tfa_info": {
"approver_document_number": "98765432100",
"session_id": "b2f18d3a-67c2-4a7f-98e5-1d3f5c6b8a72",
"contact_type": "device"
}
}

Body 参数

字段类型描述
request_control_key *uuid4客户请求的唯一标识键。
barcodestring条形码。
digitable_linestring数字行。
payment_amount *number待支付金额。
tfa_info *object包含账户审批人文件和联系方式的对象。
警告

除非银行票据允许部分付款,否则 payment_amount 必须始终等于查询银行票据时返回的 total_amount。对于允许部分付款的票据,客户可以选择 payment_amount,但其与银行票据 registered_payment_amount 之和不得超过 total_amount

tfa_info 对象

字段类型描述
approver_document_number*string账户审批人的文件号码(CPF/CNPJ)。
session_idstringUUID v4 格式的设备会话唯一标识键(设备 TFA 必填)。
contact_type*enumerator身份验证令牌验证方式
枚举值描述
sms通过短信发送至手机
email通过电子邮件发送
device通过设备令牌验证

Response

成功响应

STATUS
201
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_2fa_approval"
}

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_2fa_approval待双因素审批

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 代码标题描述(英文)描述(葡文)
400BIP000001Bad RequestThe barcode or digitable line must have 44 or 47 characters.O código de barras ou linha digitável deve ter 44 ou 47 caracteres.
400BIP000002Bad RequestThe bill sent does not correspond to a bank slip.A conta enviado não corresponde a um boleto bancário.
400BIP000003Bad RequestThe digitable line sent is invalid.A linha digitável enviada é inválida.
404BIP000004Not FoundThe bank slip was not found.O boleto não foi encontrado.
400BIP000005Bad RequestIt was not possible to consult the bank slip at this time. Please try again in a few minutes.Não foi possível consultar o boleto neste momento. Por favor, tente novamente em alguns minutos.
400BIP000006Bad RequestBank slip already written offBoleto já baixado
400BIP000007Bad RequestBank slip blocked for paymentBoleto bloqueado para pagamento
400BIP000008Bad RequestBank slip already paidBoleto já pago
400BIP000009Bad RequestInvalid bank slip. Please consult issuing bankBoleto inválido. Favor consultar banco emissor
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.
400BIP000015Bad RequestPayment date is greater than the maximum payment date.A data de pagamento é maior que a data máxima de pagamento.
400BIP000016Bad RequestPayment date is smaller than the calculation date.A data de pagamento é menor que a data de cálculo.
400BIP000017Bad RequestInvalid payment amount.Valor de pagamento inválido.
400BIP000018Bad RequestPartial payment is not allowed.Pagamento parcial não é permitido.
400BIP000019Bad RequestThe payment amount is greater than the available amount.O valor do pagamento é maior que o valor disponível.
400BIP000020Bad RequestAll partial payments for this bank slip have already been made.Todos os pagamentos parciais deste boleto já foram realizados.
400BIP000024Bad RequestRequest control key already exists.Chave de controle da requisição já existe.
403BIP000052ForbiddenGiven document number does not belong to an approver for this accountNúmero de documento enviado não pertence a um aprovador da conta
400BIP000053Bad RequestError getting approver dataErro ao obter dados do aprovador
400BIP000054Bad RequestTFA info requiredInformações de TFA necessárias
400BIP000055Bad RequestError sending verification tokenErro ao enviar token de verificação
400BIP000065Bad RequestPayment verification time window exceeded.Janela de tempo de verificação de pagamento excedida.
400BIP000079Bad RequestA session_id must be provided tokenUma session_id deve ser fornecida

沙盒环境

在我们的沙盒环境中,我们提供模拟的数字行用于模拟成功支付和错误场景测试。

数字行
00190000090361557400500000024174396700000991000
00190000090282802601919212747174596760001294161
23793390014000000455277000249001596900000103995
75691434020137513680900001040013196770002417240
21390001171200000570700168167484796770000148206
34191090083273252027893634770007296690012513600
42297048060005815702500130494123896770000239491
07090010287045349010776686070590896770001160123
74891123702849020818918378871083196690000050000
23792374119000209350986000372408496610000122810