Legal Entities
MIDDAG operates through two legal entities: MIDDAG Tecnologia LTDA (Brazil) and MIDDAG, LLC (United States). Every financial transaction in MIDDAG Account -- quotes, orders, invoices, tax documents -- is routed to the correct entity automatically. This page explains how dual-entity routing works and what it means for day-to-day administration.
The two entities
| Aspect | MIDDAG BR | MIDDAG GLOBAL |
|---|---|---|
| Legal name | MIDDAG Tecnologia LTDA | MIDDAG, LLC |
| Country | Brazil | United States |
| Tax ID | CNPJ | EIN |
| Currency | BRL | USD |
| Payment gateways | Stripe BR + Banco Inter (Pix, Boleto) | Stripe US |
| Tax documents | NFSe via ISSNet (Brasilia/DF) | Stripe Invoice |
| CRM | HubSpot BR | HubSpot GLOBAL |
| Products sold | Plugins, Services, Campus EAD | Plugins, digital products |
| Support language | Portuguese | English |
Each entity has its own Stripe account, its own HubSpot instance, and its own set of tax rules. They share the same WordPress installation and the same MIDDAG Account plugin.
How routing works
When a transaction occurs (a quote is created, an order is placed), the system determines which entity handles it using this decision tree:
The routing determines which Stripe account processes the payment, which HubSpot instance tracks the deal, and whether a Brazilian tax invoice (NFSe) is generated.
What each entity handles
| Capability | MIDDAG BR | MIDDAG GLOBAL |
|---|---|---|
| Plugin sales | Yes (BRL) | Yes (USD) -- priority for international |
| Professional services | Yes (always) | Rare (toggle, disabled by default) |
| SaaS (Campus EAD) | Yes (domestic market) | Future |
| Pix / Boleto payments | Yes (Banco Inter) | No |
| NFSe tax invoices | Yes (ISSNet, Brasilia/DF) | No |
| Stripe invoices | Yes | Yes |
Professional services are routed to MIDDAG BR by default. A toggle in the admin allows enabling services through the LLC for specific cases.
Organization fields
Each organization stores fields that support dual-entity routing:
| Field | Purpose |
|---|---|
billing_entity | Explicit assignment: middag_br, middag_global, or null (auto-detect) |
preferred_currency | BRL or USD -- used as fallback when no tax ID is available |
stripe_customer_id_br | Stripe customer ID in the BR account |
stripe_customer_id_global | Stripe customer ID in the GLOBAL account |
hubspot_company_id_br | HubSpot company ID in the BR instance |
hubspot_company_id_global | HubSpot company ID in the GLOBAL instance |
tax_id | CNPJ, EIN, VAT -- free format |
tax_id_type | Label for the tax ID type |
An organization can have customer IDs in both Stripe accounts, which happens when the same company purchases from both entities.
Admin override
Admins can override the automatic routing on a per-transaction basis. When creating a quote or order, the admin can explicitly select which entity handles it. This override takes precedence over all automatic rules.
Product-level configuration
Each product defines which entities it is available through using a channels block:
stripe_br.enabled: true-- product syncs with Stripe BR (BRL)stripe_global.enabled: true-- product syncs with Stripe US (USD)
A product can be enabled for one entity, both, or neither. The product-level entity tag takes priority over the organization-level setting.
Brand and white-label support
The dual-entity architecture supports brand differentiation. Communications, invoices, and portal experiences can be customized per entity: different logos, different legal footers, different support contacts. This is configured in the admin under entity settings.
Related pages
- Organizations -- the customer entity that stores entity routing fields
- Invoices -- financial records routed per entity
- Quotes -- proposals that follow entity routing
- Orders -- purchases processed through the correct entity