Skip to content
For Business Owners

Bank Slip and Pix API Integration: Lessons Learned From Each Bank

By Ana da Forcoder6 min read

Issuing bank slips and receiving Pix payments directly through the bank's API, with automatic settlement once the client pays, is the kind of integration that transforms the finance team's routine. Without it, someone has to generate the bank slip using internet banking, download the return file, check the statement, and manually settle the entries. With it, the title is created in the system, the bank slip is registered instantly, and the payment updates automatically.

Forcoder has been integrating bank payment APIs for quite some time. In LogFrota, Sicoob payments are live, with real bank slips issued from the system, and integrations for Banco do Brasil, Bradesco, Santander, Itaú, Sicredi, and QI Tech are implemented based on each bank’s official specifications. In this article, we show how a real-world bank slip and Pix integration works and what we learned from each bank.

  • Sicoob logo
  • Banco do Brasil logo
  • Bradesco logo
  • Itaú logo
  • Sicredi logo
  • Santander logo
  • QI Tech logo
Banks integrated via API by Forcoder: Sicoob in production; Banco do Brasil, Bradesco, Itaú, Sicredi, Santander and QI Tech implemented.

What a Bank Collection Integration Does

  1. Title in the system. The charge originates from a sale, a service, or, in transport, an issued CT-e.
  2. Bank slip registration. The system calls the bank's API, which registers the bank slip and returns the digitable line, barcode, and, when available, the Pix QR Code.
  3. Sending to the client. PDF, public link, and email can be sent directly from the system.
  4. Payment notification. The bank notifies via webhook; a scheduled check covers any missing notifications.
  5. Settlement and reconciliation. The title is settled and the statement confirms the funds received.

Authentication: The Usual Bottleneck

Serious bank APIs require two layers. The first is OAuth, with application credentials registered on the bank's developer portal. The second is mTLS: the company's digital certificate is used during the handshake itself, and it must match the public key linked to the application.

A few details that have cost time and are now part of our code:

  • The A1 certificate needs a client authentication purpose; not every certificate works;
  • Scopes requested and granted may differ. At Sicoob, we check all scopes on credential save and tell which is missing;
  • At Banco do Brasil, the scope is required in the token request, the credential goes in the header, and the token should be reused during its validity because the test environment limits how many tokens can be requested in a short timeframe;
  • Each bank uses different hosts for testing and production, and the system follows your company’s selected environment switch.

Lessons Learned at Each Bank

Sicoob: Field-by-field Audit

Before going live, we compared every request with the official Bank Collection v3 spec, example collections from the bank, and the developer portal’s documentation, and made test calls to the public sandbox to see real responses. All differences were fixed with tests. After that, the integration went into production.

Banco do Brasil: Everything Ready Before Credentials

We implemented bank slips, settlement webhook, Pix on the bank slip, Pix API with on-demand and due-date charging, refunds, statements, and batch payments based on the official spec and guides. Anything not clearly defined in the public documentation is made configurable to adjust without code changes when the first real call happens.

Bradesco: The System Doesn't Deduplicate

If slip registration times out, blindly retrying may result in duplicate slips, since the bank doesn't reject a repeated client-side number. The retry now checks for the slip in the bank's list before registering, and with an uncertain registration, the system doesn't auto-register again.

QI Tech: Accepted Doesn’t Mean Registered

The acceptance response arrives before the clearing house confirms the bank slip. The item waits for registration until a scheduled query confirms or rejects it, and a rejection is handled as an error with reasons provided—instead of a slip that might not exist.

Pix: On the Slip or Separate

There are two ways to offer Pix on a charge. The first is a hybrid bank slip with a Pix QR code printed on the slip, handled by the same integration, as seen at Banco do Brasil, Sicredi, and Itaú. The second is a standalone Pix charge, through the Central Bank’s standard Pix API, with either instant or due-date billing and its own webhook. The choice depends on the bank and how clients pay.

Extend and Modify Without Cancelling

Cancelling and reissuing a slip when extending the due date confuses clients and finance staff alike. We've implemented modifications and extensions via the bank’s own API where the feature is available, and the bank choice can be per branch—a company may use different banks for each branch.

For gateway-based payments—offering Pix, slips, and cards in one place—see our article on bank and payment integration. Charging freight in transportation is explained in the article about carrier integrations, and our payment gateway solutions have their own page.

Reconciliation: When Webhook Doesn't Notify

Bank webhooks can fail. The bank may delay a notification, the server might be under maintenance, or the webhook subscription may have expired on the developer portal. If the system relies only on the webhook, a paid title remains open and the client may get charged for something they’ve already paid. That’s why every integration we deliver uses a scheduled check that queries the bank for any open titles and settles those already paid.

The statement via API closes the process: it confirms that the money was credited and allows fees and payments to be reconciled. With both ends managed, finance teams can stop checking spreadsheets and instead focus on handling exceptions.

In practice, this means collections remain accurate, even when one side fails for a few hours.

Checklist for Contracting Integration With Your Bank

  • OAuth and mTLS authentication with the correct certificate
  • Scope check on credential save
  • Slip registration without duplicates after timeouts
  • Payment webhook and scheduled checks
  • Pix on slip or standalone Pix charges, as per bank
  • Modification and extension without canceling
  • Statement via API for reconciliation
  • Staging environment before production

Hire Forcoder

Forcoder integrates bank payment APIs live at LogFrota and already has ready-to-use integrations for the main banks. See our services, contact us, or reach out via WhatsApp.

Frequently Asked Questions

Which banks do you integrate with?

Sicoob in production; Banco do Brasil, Bradesco, Santander, Itaú, Sicredi, and QI Tech implemented using official specs. For other banks, we assess the API documentation.

Do I need a digital certificate?

For most payment APIs, yes: your company’s certificate authenticates the connection. The bank will advise which APIs require it.

How long until I can go live?

The code is usually ready before the bank is. The critical path is application setup at the developer portal, enabling the product on the account, and certification.

Can I use several banks at once?

Yes. Bank selection can be branch-based, and each branch has its own credential.

Keep reading

Products by Forcoder and our clients

Software Forcoder built and maintains, for itself and for its clients.

Client case

Nexus Finanças

Banking as a Service (BaaS) platform for Nexus Finanças: a digital account for each partner, with Pix, transfers, bill payments, charges with automatic split and cards, admin and partner dashboards, plus the company's corporate website.

Client case

Torela Real Estate

Real estate portal and system for Torela, in Gramado, Canela and the Rio Grande do Sul coast, integrated with Loft: listings reach the website without double entry, with search by region, city and neighborhood, property pages with photo galleries, favorites, comparison, vacation...

Have a project in mind? Let's make it happen.

Custom websites, systems and integrations, focused on results. Tell us what you need and the Forcoder team will get in touch.