// 02 Payment systems

Payment systems development: PIX, cards and remittances

Payment systems development for PIX, boletos, cards and remittances: event-driven architecture, idempotency and reconciliation so no transaction is ever lost.

A payment system that loses a transaction, duplicates a charge or doesn’t match the bank statement costs money and trust. Payment systems development demands engineering designed for failure: timeouts, repeated messages, partners going down and volume spikes. Arko Labs builds and evolves platforms for PIX, boletos, cards and international remittances with squads of AI agents supervised by a senior architect.

The challenge

In Brazil, a single company often runs several payment methods at once, each with its own rules, schedules and ways of failing. PIX, Brazil’s instant payment system, works in real time; the boleto, a bank-issued payment slip, depends on files and clearing; cards go through acquirers and card networks; and international remittances involve foreign exchange and partners in other countries.

The most common problems on payment platforms are:

  • Duplicate transactions. Retries without idempotency produce double charges or transfers.
  • Inconsistent states. Payments stuck “pending” forever because a response got lost between the system and the partner.
  • Manual reprocessing. Failures fixed with ad hoc scripts run straight against the database, with no trail and high risk.
  • Reconciliation by hand. Spreadsheets to match statements, return files and internal records, with discrepancies found days later.
  • Little visibility. When something goes wrong, nobody can quickly say at which stage the transaction stopped.
  • Volume spikes. Shopping events, payroll and campaigns that bring down overly coupled services.

On top of that comes the need to comply with LGPD, Brazil’s data protection law, and, for regulated institutions, the cybersecurity and business continuity requirements of the Banco Central, Brazil’s central bank.

How the Arko Labs squad works

  1. Mapping the money flows. The agents read the code and integrations and chart each payment flow end to end: where the transaction starts, which states it goes through, which partners it calls and where it can fail.
  2. Plan approved by the architect. The architect agent proposes the changes, such as introducing idempotency keys, an explicit state machine or splitting stages into events. The senior human architect reviews and approves the plan before implementation.
  3. Failure scenario tests. The QA agent writes tests for what usually breaks: partner timeouts, duplicate responses, out-of-order messages, a crash mid-transaction.
  4. Incremental implementation. The developer agents ship in small increments, keeping current flows running while the new model is validated.
  5. Security and infrastructure. The security agent checks the handling of sensitive data, secrets and dependencies. The DevOps agent sets up queues, topics, pipelines and gradual rollouts.
  6. Review and integration. Every change passes the Sentinel Method gates and the architect’s review before reaching the main branch.

The agents work 24/7, which speeds up the implementation and validation cycle without taking the human out of the decisions.

What we deliver

  • Event-driven architecture with Kafka, with topics, partitions and consumers sized to your business volume.
  • End-to-end idempotency: idempotency keys on APIs, message deduplication and database constraints.
  • An explicit state machine for each transaction type, with auditable transitions.
  • Safe reprocessing with dead letter queues, retries with backoff and operational tools for controlled resending.
  • Integrations with PIX, boletos, card acquirers and international remittance partners, with timeouts and circuit breakers.
  • Patterns such as the transactional outbox and sagas to keep services consistent.
  • Automated reconciliation across internal records, return files, statements and partner APIs, with discrepancy reports.
  • Per-transaction observability: distributed tracing, structured logs with correlation IDs, business metrics and alerts.
  • Automated failure scenario tests and load tests for expected peaks.
  • CI/CD pipelines and infrastructure as code on Kubernetes, AWS, Azure or GCP.

Security, compliance and control

Payment data demands extra care. The agents operate with least-privilege access, using client credentials that can be revoked at any time. The work respects the company’s internal policies and LGPD, with attention to personal and financial data in logs, test environments and integrations.

Every plan, decision and commit is recorded in an audit trail, which makes it possible to reconstruct why a payment rule changed and who approved it.

Every change passes the four gates of the Sentinel Method, Arko Labs’ open-source framework: tests, security, performance and maintainability. The performance gate is especially relevant in payments, where latency and throughput affect conversion and cost. Nothing reaches the main branch without review by a human architect.

Why Arko Labs

Arko Labs’ architects bring more than 19 years in financial systems, including a global remittance platform handling more than 10 million transactions a day across more than 200 countries with 99.99% uptime. The track record also includes a fintech rewards platform processing more than 250,000 transactions per hour and an e-commerce operation that handled more than 1 million concurrent users on Black Friday with 99.99% uptime.

That experience comes from real payment problems at scale: idempotency, reprocessing, reconciliation and volume spikes. Our founding architect is an IEEE Senior Member and holds a postgraduate degree in AI and Machine Learning from UT Austin.

Arko Labs is the brand of Girardelli Tecnologia Ltda, a Brazilian company founded in 2019 in Ribeirão Preto (SP). We work remotely with clients in Brazil and abroad, with contracts in USD, overlap with US business hours and direct conversation with the senior architect. We know the local ecosystem, from PIX to the boleto, and how to integrate it with cards and international remittances in a single reliable payment platform.

// faq

Questions about payment systems development

What is idempotency in payment systems and why does it matter?

Idempotency ensures that the same request processed more than once produces a single effect. In payments, it prevents duplicate charges or transfers when there are retries, timeouts or repeated messages. In practice, it is implemented with idempotency keys, transaction state control and database constraints.

How do you reprocess failed payments without duplicating transactions?

Safe reprocessing depends on idempotency, a clear state for each transaction and message queues with error handling, such as dead letter queues. That way, failed events can be resent with the certainty that anything already settled will not be repeated.

Do you build PIX integrations?

Yes. We build and evolve PIX flows (PIX is Brazil's instant payment system), such as charges, collections, refunds and reconciliation, integrated with the provider or infrastructure the client already uses. The work follows the institution's security policies and LGPD, Brazil's data protection law.

What is the best architecture for a high-volume payment system?

There is no single answer, but event-driven architectures with Kafka or similar tend to work well: they decouple stages, absorb peaks and allow reprocessing. Add idempotency, per-transaction observability and automated reconciliation on top of that.

How does automated payment reconciliation work?

Reconciliation matches internal records against files and APIs from acquirers, banks, PIX providers and boleto issuers. Discrepancies are classified and reported automatically, which cuts manual work and shortens the financial close.

Shall we put a squad on this challenge?

An Arko Labs architect reviews your case and replies within one business day.

Book an assessment

// other services

// related reading