Make payment of Boleto
This endpoint allows the payment of bank slips (boletos). The payment should be made after a consultation, using the returned information to ensure the correct flow, avoiding failures during the payment process.
This is the conventional bank slip (with digitable lines not starting with the digit 8). It is registered with the Interbank Payment Clearinghouse (CIP/Núclea) and can be paid at financial institutions and payment institutions authorized to operate by the Central Bank.
Request
Request Endpoint
Request Path Params
Field | Type | Description | Characters |
---|---|---|---|
account_key * | uuid4 | Unique account identification key. | 36 |
Request Body: Payment of boleto with digitable line
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"digitable_line": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8
}
Request Body: Payment of boleto with barcode
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"barcode": "00190000090361557400500000024174396700000991000",
"payment_amount": 1156.8
}
Body Params
Field | Type | Description |
---|---|---|
request_control_key * | uuid4 | Unique identification key for the client's request. |
barcode | string | Barcode. |
digitable_line | string | Digitable line. |
payment_amount * | number | Amount to be paid. |
The payment_amount
must always be equal to the total_amount
returned in the bank slip query if partial payment is not allowed for the bank slip. For titles where partial payment is allowed, the client can choose the payment_amount
, as long as its sum with the bank slip's registered_payment_amount
does not exceed the total_amount
.
Response
Success Response
Response Body: Payment executed
{
"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"
}
Response Body: Payment pending execution
{
"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"
}
If HTTP Status 202 is returned with the field payment_status
having the value pending_execution, the payment should not be retried.
This payment will be processed asynchronously. It is necessary to check the transfer status through the payment query, or wait for the pending payment webhook described on the webhooks page.
Response Body Params
Field | Type | Description |
---|---|---|
payment_key * | uuid4 | Unique payment identification key. |
request_control_key * | uuid4 | Unique identification key for the client's request. |
payer_name * | string | Name of the effective payer. |
payer_document_number * | string | Document number of the effective payer (CPF/CNPJ). |
source_account_key * | uuid4 | Key of the debited account. |
transaction_key * | uuid4 | Payment transaction key. |
transaction_revert_key | uuid4 | Payment reversal transaction key. |
paid_amount * | number | Amount effectively paid. |
payment_date * | string | Payment date. |
payment_type * | enum | Payment type. |
bank_slip | object | Bank slip. |
collection_slip | object | Collection invoice. |
payment_status * | enum | Payment status. |
Enumerators payment_type
Enumerator | Type | Description |
---|---|---|
bank_slip | string | Bank slip |
collection_slip | string | Collection invoice |
The enumerator collection_slip
does not apply to the bank slip flow, and the collection_slip object will always be null.
Enumerators payment_status
Enumerator | Description |
---|---|
pending_execution | Pending execution |
executed | Executed |
reverted | Reverted |
rejected | Rejected |
error | Error |
For payments where QI does not receive a response from CIP within two minutes, the payment will be returned with the status pending_execution
. After QI receives the response from CIP, the pending payment webhook described on the webhooks page will be sent to the client.
Object bank_slip
Field | Type | Description |
---|---|---|
barcode * | string | Barcode. |
digitable_line * | string | Digitable line. |
payer_name * | string | Payer's name. |
payer_document_number * | string | Payer's document number (CPF/CNPJ). |
beneficiary_name * | string | Beneficiary's name. |
beneficiary_trading_name | string | Beneficiary's trade name. |
beneficiary_document_number * | string | Beneficiary's document number (CPF/CNPJ). |
beneficiary_bank_ispb * | string | ISPB code of the beneficiary's bank. |
guarantor_name | string | Name of the guarantor. |
guarantor_document_number | string | Guarantor's document number (CPF/CNPJ). |
expiration_date * | string | Due date. |
max_payment_date * | string | Maximum payment date. |
partial_payment_indicator * | enum | Partial payment indicator. |
registered_payment_amount | string | Total registered payment amount. |
nominal_amount * | number | Original amount. |
total_amount * | number | Total amount. |
rebate_amount * | number | Rebate amount. |
discount_amount * | number | Discount amount. |
fine_amount * | number | Fine amount. |
interest_amount * | number | Interest amount. |
Enumerators partial_payment_indicator
Enumerator | Type | Description |
---|---|---|
allowed | string | Allowed |
not_allowed | string | Not allowed |
Error Response
Response Body
{
"title": "Título",
"description": "Description in english",
"translation": "Description in portuguese",
"code": "Código"
}
HTTP Code | QI Code | Title | Description (eng) | Description (pt-br) |
---|---|---|---|---|
400 | BIP000001 | Bad Request | The 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. |
400 | BIP000002 | Bad Request | The bill sent does not correspond to a bank slip. | A conta enviado não corresponde a um boleto bancário. |
400 | BIP000003 | Bad Request | The digitable line sent is invalid. | A linha digitável enviada é inválida. |
404 | BIP000004 | Not Found | The bank slip was not found. | O boleto não foi encontrado. |
400 | BIP000005 | Bad Request | It 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. |
400 | BIP000006 | Bad Request | Bank slip already written off | Boleto já baixado |
400 | BIP000007 | Bad Request | Bank slip blocked for payment | Boleto bloqueado para pagamento |
400 | BIP000008 | Bad Request | Bank slip already paid | Boleto já pago |
400 | BIP000009 | Bad Request | Invalid bank slip. Please consult issuing bank | Boleto inválido. Favor consultar banco emissor |
403 | BIP000010 | Forbidden | User is not allowed to do this action | Usuário não tem autorização para fazer essa ação |
404 | BIP000011 | Not Found | The source account key was not found. | A chave da conta de origem não foi encontrada. |
400 | BIP000012 | Bad Request | It 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. |
400 | BIP000013 | Bad Request | The source account is closed. | A conta de origem está fechada. |
400 | BIP000014 | Bad Request | The source account is blocked. | A conta de origem está bloqueada. |
400 | BIP000015 | Bad Request | Payment date is greater than the maximum payment date. | A data de pagamento é maior que a data máxima de pagamento. |
400 | BIP000016 | Bad Request | Payment date is smaller than the calculation date. | A data de pagamento é menor que a data de cálculo. |
400 | BIP000017 | Bad Request | Invalid payment amount. | Valor de pagamento inválido. |
400 | BIP000018 | Bad Request | Partial payment is not allowed. | Pagamento parcial não é permitido. |
400 | BIP000019 | Bad Request | The payment amount is greater than the available amount. | O valor do pagamento é maior que o valor disponível. |
400 | BIP000020 | Bad Request | All partial payments for this bank slip have already been made. | Todos os pagamentos parciais deste boleto já foram realizados. |
400 | BIP000022 | Bad Request | Bank slip payment service is closed. | Serviço de pagamento de boleto está fechado. |
400 | BIP000023 | Bad Request | The source account has insufficient balance. Payment cannot be made. | A conta de origem possui saldo insuficiente. Pagamento não pode ser realizado. |
400 | BIP000024 | Bad Request | Request control key already exists. | Chave de controle da requisição já existe. |
400 | BIP000025 | Bad Request | It 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. |
400 | BIP000028 | Bad Request | The source account has blocked balance. Payment cannot be made. | A conta de origem possui saldo em conta bloqueado. Pagamento não pode ser realizado. |
Sandbox Environment
In our sandbox environment, we provide mocked digitable lines for simulating successful payments and testing error scenarios.
Success scenarios
Digitable line |
---|
00190000090361557400500000024174396700000991000 |
00190000090282802601919212747174596760001294161 |
23793390014000000455277000249001596900000103995 |
75691434020137513680900001040013196770002417240 |
21390001171200000570700168167484796770000148206 |
pending_execution
scenarios
The simulation of this scenario is better described on the simulation page.
Digitable line |
---|
75691333790100505390300569460017397220000306867 |
Error scenarios
Digitable line | Error code |
---|---|
34191090083273252027893634770007296690012513600 | BIP000007 |
07090010287045349010776686070590896770001160123 | BIP000007 |
42297048060005815702500130494123896770000239491 | BIP000006 |
74891123702849020818918378871083196690000050000 | BIP000009 |
23792374119000209350986000372408496610000122810 | BIP000008 |