Systems integration means getting two programs to exchange information on their own, without anyone typing the same data twice. Most of the time this happens through an API, a set of "requests" that one system agrees to receive from the other, such as "create this charge" or "tell me the status of this order". Pix (Brazil's instant payment system), fiscal invoices (nota fiscal), WhatsApp, shipping and ERPs all work this way.

How long it takes and how much it costs depends less on the number of screens and more on the number and quality of the APIs on the other side: clear documentation, a test environment and stable rules shorten the work; the opposite lengthens it. This guide explains the concepts without jargon, shows the most common integrations in Brazil, the risks, and how to assess a provider before you depend on it.

The four concepts that cover 90% of the conversation

You don't need to program, but you do need to understand four terms to talk with your provider.

API

It is a system's "service window" for other programs. Whoever offers the API defines what can be requested, in what format and with what authorization. Usually you receive an access key, which works like a password for your system.

Webhook

It is the reverse path: instead of your system asking every few minutes "has the Pix been paid?", the other system tells you when it happens. You give it an address on your side and the provider "knocks" there with the news. It is faster and uses fewer resources, but your address must be online and secure, because anyone can try to pose as the provider.

Queue

When many things arrive at once, or the other system is offline, the queue holds the tasks and runs them in order, with retries. Without a queue, a five-minute outage at the provider becomes five minutes of lost orders.

Idempotency

A hard word for a simple idea: repeating the same action must not produce a duplicate effect. If the payment notice arrives twice (it happens), the order must not be marked paid twice, and the invoice must not be issued twice. In practice, each operation carries a unique identifier, and the system ignores what it has already processed.

Common integrations in Brazil

IntegrationWhat it doesPoint of attention
PixGenerates the charge and confirms the payment automaticallyConfirm by webhook or query, never only from the customer's screen
Boleto (Brazilian bank payment slip) and cardCharges through a payment providerReconciliation: what was paid, refunded or disputed
Fiscal invoice (nota fiscal)Issues, cancels and stores invoices for ordersRules vary by invoice type, state and municipality
ShippingCalculates delivery time and price, generates the label and trackingContracts and rate tables change; handle failed queries
WhatsAppCustomer service, notices and orders through chatOfficial API, consent and message templates
ERP and accountingSyncs records, inventory and financeQuality of the ERP's API and who owns each piece of data

Pix

Pix is the instant payment method created by the Central Bank of Brazil. For your system, what matters is the confirmation: after generating a charge, you need to know, automatically and reliably, that it was paid. Banks and payment providers offer their own APIs for this, each with its own documentation, limits and authentication rules. Read the one from the provider you hire, and don't assume two are the same.

Fiscal invoice

The São Paulo State Finance Department describes the NF-e (electronic fiscal invoice) as a "document that exists only in digital form", whose legal validity is guaranteed by the issuer's digital signature and by the tax authority receiving the document before the taxable event. For services, the federal government offers the national NFS-e (electronic service invoice), issued through a portal, an app and, for in-house systems, an API that requires prior accreditation. Its use depends on whether the municipality has joined. In other words: issuing invoices through a system is possible, but the rules depend on the type of invoice and the location. Who decides what your company must issue is your accountant, not the developer.

WhatsApp

WhatsApp integration has its own rules set by Meta, such as the customer service window and message templates. They are covered in WhatsApp chatbot for business and, on the side of connecting it to your system, in how to integrate a system with WhatsApp.

ERP and accounting

This brings up the core question: which system is the "owner" of each piece of data? If the customer is registered on the website and in the ERP, which one wins when the two disagree? Decide this before you write any code. The full discussion of keeping an ERP or building your own system is in custom system or ready-made ERP.

Risks of depending on an API

  • Dependence on the supplier. If the API goes down or the supplier changes its plan, your process stops. Have a backup for what is critical, such as temporary manual charging.
  • API changes. Suppliers change versions and retire features. Prefer those who give advance notice and keep older versions running for a while.
  • Usage limits. Many APIs limit how many calls you can make per minute. The system has to respect the limit and try again later.
  • Key security. An API key is a password. It does not go in the mobile app, does not go in a public repository, and must be replaceable without stopping the system.
  • Personal data. Each integration is a new destination for customer data. See LGPD (Brazil's data protection law) for small business systems.
  • Contract and account in the company's name. The payment account, the digital certificate and the keys must be in your company's name, not the developer's.

How to assess the supplier's documentation

Before choosing a payment, shipping or invoicing provider, read the documentation as if you were going to live in the house. A good sign is when it has:

  • a test environment (sandbox) to simulate without real money or real invoices;
  • examples of requests and responses, including the error ones;
  • an explanation of the webhooks: what arrives, when, and how to confirm it came from the supplier;
  • a versioning policy and notice of changes;
  • usage limits and retry rules described;
  • a technical support channel that answers, not only a sales one;
  • a status page or incident history.

If the documentation is confusing, outdated or exists only as an old PDF, time and risk get added to the budget. That is the main reason two "identical" integrations can have such different timelines.

Testing and monitoring

An integration isn't finished when it works once. What separates a stable project from one that causes headaches:

  1. Test in the supplier's environment before using real money or real invoices.
  2. Test the bad scenarios: declined payment, duplicate notice, supplier offline, invalid data.
  3. Log every call (what was sent and what came back), taking care not to store sensitive data without need.
  4. Set up alerts: rising errors, a growing queue, a notice that has stopped arriving.
  5. Reconcile periodically: compare what your system believes was paid and issued with what the supplier and the accountant have on record.

What weighs on cost and timeline

There is no honest "price per integration" table. The amount depends on the number and quality of the APIs, how much data travels between systems, the business rules (what happens if the payment fails?), the test environment available and the monitoring required. A well-documented, stable API is quick to connect; a poorly documented one may require trial and error with the other side's support.

For a sense of scale within the bigger scope, see the ranges published in how much a custom management system costs and use the budget estimator (in Portuguese). When the goal is to take manual work off the team, start with how to automate business processes to decide which integration pays off first.

Checklist before hiring an integration

  • Which data goes from where to where, and which system is the source of truth?
  • Does the supplier have a test environment and up-to-date documentation?
  • What happens when the other system is offline?
  • How does the system prevent duplicate actions?
  • Who keeps the keys and certificates, and in whose name are the accounts?
  • Who monitors, and who is notified when something fails?
  • Has your accountant or the person responsible for tax validated the invoice rules?

Common mistakes

  • Confirming payment from the customer's screen. Reliable confirmation comes from the supplier, through the notice or the query.
  • Not handling duplicate notices. Without idempotency, the same order gets marked paid or invoiced twice.
  • API key inside the app. Anyone who opens the app can extract it.
  • Choosing the supplier on fees alone. Poor documentation and slow support cost more than the difference.
  • Integrating everything at once. Start with one integration, stabilize it, then move on.
  • No monitoring. The integration stops on a Friday and only someone notices on Monday.

How Luna does it

At Luna Next-Gen, we treat each integration as part of the system, with a queue, retries and logging, and we start with a single integration to stabilize it before growing. Theros takes expenses and tasks by WhatsApp message, using the official API, and connects with calendars and health apps. The payment method is agreed in the proposal, and there is a 6-month warranty for bug fixes. Request a quote and bring the list of systems that need to talk to each other.

Frequently asked questions

What is systems integration?

It means making two or more systems exchange information automatically, without double data entry. In most cases this is done through an API, the set of requests that one system agrees to receive from another.

What is a webhook?

It is an automatic notice: instead of your system asking all the time whether something happened, the other system calls an address of yours when the event occurs, such as a confirmed payment.

What is idempotency and why does it matter?

It means ensuring that repeating the same operation does not create a duplicate effect. If the payment notice arrives twice, the order must not be marked paid or invoiced twice.

How much does it cost to integrate a system with an ERP, Pix or fiscal invoices?

It depends on the number and quality of the APIs involved, the business rules and the monitoring required. Without the scope, any figure would be a guess; the proposal should come with a list of what will be integrated.

Can I issue fiscal invoices (nota fiscal) automatically through the system?

Generally yes, but the rules vary by invoice type, state and municipality. For services, the federal government portal describes issuing through an API for in-house systems, with prior accreditation and depending on whether the municipality has joined. Confirm with your accountant.

What do I do when the supplier's API changes or goes down?

Use a queue and retries so operations are not lost, log the calls, set up alerts and keep a manual backup plan for what is critical. Prefer suppliers who announce changes in advance.

How do I tell if an API's documentation is good?

Look for a test environment, examples of responses and errors, an explanation of the webhooks, a versioning policy, described usage limits, technical support and an incident history.