Integrations Overview
MIDDAG Account centralizes your B2B operations without replacing the tools your team already uses. Stripe handles payments, HubSpot manages your CRM pipeline, Jira tracks service requests, and ISSNet issues tax invoices. The plugin sits at the center, connecting data flows and keeping everything in sync.
Philosophy
Three principles guide how MIDDAG Account approaches integrations:
- Centralize, don't replace. Each external system remains the authority for what it does best. MIDDAG Account reads, syncs, and orchestrates -- it does not duplicate functionality.
- Webhook-first. Integrations prefer real-time webhooks over periodic polling. Polling is used only when the external system does not support webhooks (ISSNet).
- Graceful degradation. If an external service is down, the plugin continues to function. Sync recovers automatically when the connection is restored.
ConnectorRegistry
All integrations flow through the ConnectorRegistry, a central component that maps organizations to their configured connectors. When a domain event fires (an order is paid, an entitlement is activated), the registry resolves the correct connector instance for the organization involved.
The registry supports per-organization configuration. An organization linked to the Brazilian entity uses Stripe BR and HubSpot BR; an international organization uses their US counterparts. Configuration is persisted encrypted in WordPress options.
Available integrations
These integrations are implemented and working in the current release.
| Integration | Direction | What it does |
|---|---|---|
| Stripe | Bidirectional | Payment processing, subscriptions, invoices, refunds |
| HubSpot | Bidirectional | CRM sync, deal pipelines, quote lifecycle |
| ISSNet | Outbound | Brazilian tax invoice (NFSe) generation via SOAP |
| Banco Inter | Inbound | Pix and Boleto payments for Brazil |
| Cloudflare | Outbound | D1 edge database and R2 object storage |
| Jira | Bidirectional | Service request sync, worklogs, SLA tracking |
| WooCommerce | Bidirectional | Orders, products, subscriptions |
| SolidAffiliate | Inbound | Partner program, referrals, commissions |
Planned integrations
| Integration | Description |
|---|---|
| Chatwoot | Customer support chat with entitlement context |
| Outbound webhooks | Event catalog for notifying your external systems |
Dual-account support
MIDDAG operates two legal entities: MIDDAG Tecnologia LTDA (Brazil, BRL) and MIDDAG, LLC (United States, USD). Stripe and HubSpot both run in dual-account mode, with separate credentials, webhook endpoints, and customer records per entity. The plugin handles routing automatically based on the organization's billing entity.
Integration health
Every inbound webhook is logged with a timestamp, direction, payload hash, and processing result. Failed events are retried with exponential backoff. The admin dashboard surfaces integration health so you can spot issues before they affect customers.
Key health indicators:
- Webhook processing rate -- percentage of webhooks processed successfully in the last 24 hours.
- Sync lag -- time since the last successful sync for each integration.
- Failed events -- count of events that exhausted retry attempts and require manual review.
Idempotency
All webhook handlers are idempotent. Duplicate events (common during retries) do not create duplicate records. Each handler checks the event ID against previously processed events before taking action.
Audit trail
Every integration event is recorded with:
- Timestamp
- Direction (inbound or outbound)
- Payload hash
- Processing status (success, failed, skipped)
- Source integration and account
This trail is essential for debugging sync issues and for compliance auditing.
Next steps
- Stripe -- dual-account payment processing
- HubSpot -- CRM sync and deal pipelines
- ISSNet -- Brazilian tax invoices
- Banco Inter -- Pix and Boleto payments
- Cloudflare -- edge database and object storage
- Jira -- service request sync
- Chatwoot -- customer support (planned)
- Webhooks -- outgoing event notifications
- Integration Status -- complete status matrix