Why Pix Switch
Historically, supporting Pix across different connectivity providers meant maintaining separate, isolated plugins — one per provider, each with its own codebase, API contracts, and integration patterns. This created real problems:
- Duplicated business logic — The same Pix rules had to be implemented and maintained independently in each plugin
- Different API contracts — Each provider integration exposed a different API to the client, making it harder to switch or add providers
- Higher maintenance cost — Bug fixes, regulatory updates, and new features had to be applied separately to each plugin
- No portability — Moving from one provider to another required a full re-integration
What Pix Switch provides
Pix Switch delivers a complete Pix orchestration layer that handles the full business lifecycle of Pix operations:
- Cash-out and cash-in flows — Send and receive Pix payments with full message lifecycle management
- Pix key management (DICT) — Create, update, delete, and resolve ownership of Pix keys
- Static and dynamic QR Code generation — Issue QR Codes for payment initiation across all supported formats
- MED lifecycle orchestration — Manage the Special Refund Mechanism (Mecanismo Especial de Devolucao) end to end
- Refund handling — Process full and partial refunds with proper regulatory sequencing
- Webhooks, event processing, and background workers — React to provider events in real time and run async jobs reliably
- Native Midaz integration — Midaz is the mandatory ledger for Pix Switch, providing account validation, balance checks, debit/credit posting, and routing
How it works
Pix Switch uses a Provider Adapter Layer to separate your integration from the specifics of any single connectivity provider. The plugin exposes a single API to your application. Behind that API, a provider adapter translates every operation — transactions, key lookups, QR Code registrations, refunds — into the protocol and format required by your configured provider. Your institution selects which provider to use during setup. The plugin resolves everything else. This architecture means that switching providers or supporting additional participation models does not require rewriting your integration. You change the configuration. The API stays the same.
Regulated connectivity is always external. Pix Switch does not connect to BACEN directly. A direct participant or a certified PSTI provides the SPI/DICT gateway layer. Pix Switch operates above that layer, handling all Pix business logic.
Participation models
BACEN defines two regulatory models for Pix participation: direct (your institution connects to BACEN on its own) and indirect (you connect through a licensed direct participant). For a detailed explanation of each model, see What is Pix?. In Pix Switch, the participation model is a configuration — not a different product. Both models are supported through the Provider Adapter Layer. You choose a provider that matches your regulatory status, and the plugin API stays the same. Switching providers or upgrading your participation model does not require re-integrating the plugin.
Integrations in the Lerian ecosystem
Pix Switch requires Midaz as its core ledger. This native integration simplifies:
- Account validation
- Balance checks
- Debit/credit posting
- Routing
- Business rules (fees, authorizations, antifraud triggers)
- CRM (Midaz CRM) — Customer relationship and entity management
- Fee Engine — Automated fee calculation and collection
- Access Manager — Authentication, authorization, and credential governance
- Reporter — Regulatory and COSIF-ready reporting
- Matcher — Reconciliation and identity matching
- Flowker — Workflow orchestration
- Tracer — Observability and distributed tracing
Deployment model
Pix Switch is provided as standalone application software that your institution installs and operates in its own environment:
- BYOC (Bring Your Own Cloud) — Deploy on your preferred cloud provider
- On-premise — Run within your own data center
Target audience
Pix Switch is designed for institutions that:
- Participate in the Pix arrangement (or intend to)
- Maintain their own ledger and control customer accounts and balances
- Own a valid ISPB (identifier assigned by BACEN to financial institutions in Brazil)
- Manage their own production environments
- Prefer autonomy over outsourced processing
Requirements to operate
Before adopting Pix Switch, your institution must have:
- A valid ISPB registered with BACEN
- A contract with a connectivity provider — a direct participant (for indirect participation) or a certified PSTI (for direct participation), depending on your regulatory model
- Your own cloud or on-premise environment to host the plugin
- Full control of the ledger — Midaz must be deployed and operational
- DevOps and SRE readiness — your team manages deployment, monitoring, updates, and incident response
- Security and compliance ownership — your institution is responsible for access control, redundancy, observability, and audit trails
Advantages
Full control
Run everything in your own infrastructure. Define routing rules, business policies, limits, and operational practices without external dependencies.Security and autonomy
Apply your own IAM policies, encryption standards, and governance frameworks. Your data never leaves your environment.Economic efficiency
Size infrastructure for your actual demand. Remove reliance on multi-layer intermediaries that add cost without adding control.Ecosystem-native integrations
Connect to Midaz, Fee Engine, CRM, Matcher, Flowker, Reporter, Tracer, and Access Manager out of the box. Each integration is built into the platform, not bolted on.Customization
Extend or modify business logic to match your institution’s specific requirements. Adapt to regulatory changes at your own pace.Trade-offs
Pix Switch offers maximum control, but that control comes with responsibilities.
Requires technical maturity
Your institution needs DevOps capabilities, observability tooling, and operational management expertise. This is not a managed service.Requires governance discipline
Security, uptime, compliance, and audit readiness must be maintained by your team.More configuration upfront
Flexibility means more orchestration and parameterization during initial setup. Plan for a structured onboarding process.Operational responsibility
Your institution manages software updates, patches, scaling, and continuity plans. Lerian provides the software and documentation — your team operates it. This model is best suited for institutions that value autonomy, scalability, and long-term cost optimization over simplicity of initial setup.Pix use cases with Midaz
See how Pix Switch and Midaz work together in practice:
Pix with Transaction Routes
Model validated, reusable Pix transfer flows using Transaction Routes and Operation Routes — from simple transfers to fee collection.
Pix with automated fees
Combine Pix Switch with the Fee Engine for transparent, automated fee management across fintechs and marketplaces.

