Settings
The Settings screens configure how MIDDAG Account behaves. Settings are organized into tabs, each covering a specific area of the system. Only WordPress administrators with full MIDDAG Account capabilities can access the Settings page.
Navigate to MIDDAG Account > Settings to open the settings panel.
General settings
The default tab when you open Settings.
| Setting | What it controls |
|---|---|
| Plugin Mode | Production or Development. Development mode enables debug logging and disables cron jobs. |
| Default Currency | The default currency for new quotes and invoices (BRL or USD) |
| Default Language | Admin interface language |
| Date Format | How dates are displayed throughout the admin (Y-m-d, d/m/Y, etc.) |
| Items Per Page | Default pagination size for list views (25, 50, or 100) |
| Migration Complete | Toggle that switches repositories from CCT (JetEngine) to wp_posts. Do not enable unless the data migration has been verified. |
Entity configuration
Configure the dual-entity structure.
| Setting | What it controls |
|---|---|
| MIDDAG BR Name | Display name for the Brazilian entity |
| MIDDAG BR Tax ID | CNPJ for the Brazilian entity |
| MIDDAG BR Address | Registered address |
| MIDDAG GLOBAL Name | Display name for the international entity (LLC) |
| MIDDAG GLOBAL Tax ID | EIN for the US entity |
| MIDDAG GLOBAL Address | Registered address |
| Default Billing Entity | Which entity is pre-selected when creating new records |
These values appear on invoices, contracts, and other customer-facing documents.
Entitlement classes
Manage the entitlement class definitions that determine what downstream resources are provisioned when an entitlement is created.
Class list
A table showing all configured classes:
| Column | What it shows |
|---|---|
| Prefix | The 3-letter code used in entitlement codes (PLG, ENV, SVC, ORD, AFL, EDU) |
| Name | Human-readable class name |
| Description | What this class provisions |
| Downstream | Resources created when an entitlement of this class is provisioned |
| Status | Active or Disabled |
Editing a class
Click any class to edit its configuration:
- Prefix -- read-only after creation (changing would break existing entitlement codes)
- Name and Description -- display values
- Downstream provisioning -- which resources to auto-create (License, Environment, Service, etc.)
- Default period -- default entitlement duration (e.g., 12 months)
- Status -- Active or Disabled (disabled classes cannot be used for new entitlements)
Creating a new class
Click + Create Class to define a new entitlement class. You must specify the prefix (3 uppercase letters), name, description, and downstream provisioning rules.
Policy defaults
Configure the default policy values that apply to all entitlements unless overridden at the organization or individual entitlement level. Policies follow a 5-level hierarchy: System > Billing Entity > Entitlement Class > Organization > Individual.
| Setting | What it controls |
|---|---|
| Grace Period (days) | Days after expiration before cancellation |
| Auto-Renewal | Whether entitlements renew automatically |
| Renewal Reminder (days) | How many days before expiry to send renewal reminders |
| Suspension on Non-Payment | Whether to auto-suspend on missed payment |
| Credit Carry-Over | Whether unused credits roll over to the next period |
| Win-Back Window (days) | Days after cancellation during which reactivation is allowed |
Each policy shows its current value and the level at which it is defined. System-level defaults are set here; override values at lower levels are managed from the relevant Organization or Entitlement detail pages.
For a full explanation of the policy hierarchy, see Policies.
Integration credentials
Configure API keys and credentials for external services. Each integration has its own section.
HubSpot
| Field | What to enter |
|---|---|
| BR Portal ID | HubSpot portal ID for MIDDAG BR |
| BR API Key | Private app access token for BR portal |
| GLOBAL Portal ID | HubSpot portal ID for MIDDAG GLOBAL |
| GLOBAL API Key | Private app access token for GLOBAL portal |
| Webhook Secret (BR) | Secret for validating BR webhook signatures |
| Webhook Secret (GLOBAL) | Secret for validating GLOBAL webhook signatures |
Stripe
| Field | What to enter |
|---|---|
| BR Secret Key | Stripe secret key for MIDDAG BR account |
| BR Publishable Key | Stripe publishable key for BR account |
| BR Webhook Secret | Endpoint signing secret for BR webhooks |
| GLOBAL Secret Key | Stripe secret key for MIDDAG GLOBAL account |
| GLOBAL Publishable Key | Stripe publishable key for GLOBAL account |
| GLOBAL Webhook Secret | Endpoint signing secret for GLOBAL webhooks |
ISSNet (NFSe)
| Field | What to enter |
|---|---|
| CNPJ | MIDDAG BR CNPJ for NFSe issuance |
| Municipal Code | Municipal registration code |
| Certificate Path | Path to the digital certificate (.pfx) file |
| Certificate Password | Password for the digital certificate |
Jira
| Field | What to enter |
|---|---|
| Base URL | Jira instance URL |
| API Email | Service account email |
| API Token | Jira API token |
| Project Key | Default project key for new issues |
Cloudflare
| Field | What to enter |
|---|---|
| API Token | Cloudflare API token |
| Account ID | Cloudflare account identifier |
| D1 Database ID | D1 database identifier |
| R2 Bucket | R2 storage bucket name |
Credentials are stored as WordPress options and are never exposed in API responses. The Settings page masks sensitive values (showing only the last 4 characters) after they are saved.
API settings
Configure the REST API and JWT authentication.
| Setting | What it controls |
|---|---|
| JWT Algorithm | RS256 (read-only -- HS256 is not permitted) |
| JWT Private Key Path | Path to the RSA private key file (must be outside webroot) |
| JWT Public Key Path | Path to the RSA public key file |
| JWT Token Lifetime | Token expiration in seconds (default: 3600) |
| API Rate Limit | Maximum requests per minute per client |
| CORS Allowed Origins | Comma-separated list of allowed origins for the App portal |
Import / Export
Tools for bulk data operations.
Import
- Import Organizations -- upload a CSV to create or update organizations in bulk. The CSV must include columns for name, legal name, tax ID, country, and email. Duplicate tax IDs are detected and reported.
- Import Entitlements -- upload a CSV to create entitlements in bulk. Requires organization ID, class, product name, start date, and expiration date.
Export
- Export Organizations -- download all organizations as CSV
- Export Entitlements -- download all entitlements as CSV
- Export Invoices -- download all invoices as CSV
- Export Full Backup -- download a JSON export of all MIDDAG Account data (organizations, entitlements, quotes, invoices, contracts, environments, services, and service requests)
The full backup export is useful for disaster recovery and for migrating data between environments.
Related pages
- Integrations -- live status of connected services
- Entitlements -- entitlement class behavior in practice
- Organizations -- billing entity assignment per customer
- Policies -- the 5-level policy hierarchy explained
- Entitlement Classes -- class definitions and downstream provisioning