Orders
The Orders screen shows purchase records that flow through WooCommerce. MIDDAG Account does not replace WooCommerce for commerce -- it enriches WooCommerce orders with entitlement data, linking each purchase to the customer lifecycle. This is where you verify that purchases have been properly converted into entitlements.
How orders work in MIDDAG Account
WooCommerce handles products, checkout, and payment processing. MIDDAG Account adds a layer on top:
- A customer pays for an order (via Stripe, Banco Inter, or manual confirmation).
- WooCommerce marks the order as
completed. - MIDDAG Account's provisioning service reads the order's line items and creates entitlements based on each product's configured class.
- Downstream resources (licenses, environments, services) are provisioned automatically.
Orders in MIDDAG Account are read-only -- you create and manage them in WooCommerce. MIDDAG Account shows you the enriched view with entitlement data.
List view
Open MIDDAG Account > Orders to see all orders with their MIDDAG Account context.
Columns
| Column | What it shows |
|---|---|
| Order # | WooCommerce order number (clickable -- opens detail view) |
| Date | Order date |
| Organization | The customer organization this order belongs to |
| Amount | Order total with currency (BRL or USD) |
| Payment Status | Completed, Processing, On Hold, Refunded, Cancelled, or Failed |
| Billing Entity | MIDDAG BR or MIDDAG GLOBAL |
| Entitlements | Entitlement codes created from this order (clickable badges) |
The Entitlements column is the key addition MIDDAG Account provides. Each entitlement code appears as a clickable badge. If an order has no entitlements yet (e.g., still processing), the column shows "Pending" in yellow. If entitlement creation failed, it shows "Error" in red.
Filters
- Search -- by order number, organization name, or entitlement code
- Payment Status -- filter by Completed, Processing, On Hold, Refunded, Cancelled, or Failed
- Billing Entity -- filter by MIDDAG BR, MIDDAG GLOBAL, or All
- Date range -- filter by order date
- Has Entitlements -- filter to show only orders that have (or have not) created entitlements
Detail view
Click an order number to open the detail view. This combines WooCommerce order data with MIDDAG Account entitlement information.
Header
- Order number with payment status badge
- Organization name (clickable link to the Organization detail view)
- Order date, amount, currency, and billing entity
- Payment method (Stripe card, Pix, Boleto, etc.)
Entitlement creation status
The central section of the order detail shows what happened after the order was completed:
| Status | What it means |
|---|---|
| Created | Entitlement was successfully created. Shows the code and link. |
| Pending | Order is not yet completed. Entitlement will be created on completion. |
| Skipped | Product does not have a _middag_entitlement_class meta set. No entitlement was expected. |
| Error | Entitlement creation failed. Shows the error message. |
| Duplicate blocked | A duplicate creation was detected and skipped (idempotency check). |
Each line item in the order is listed with its own entitlement creation status. This lets you see exactly which products generated entitlements and which did not.
Line items with entitlement mapping
The line items table shows:
| Column | What it shows |
|---|---|
| Product | Product name |
| Quantity | Number purchased |
| Price | Unit price and line total |
| Entitlement Class | The class configured for this product (PLG, ENV, SVC, etc.) or "None" |
| Entitlement Created | The entitlement code (clickable) or the status if not yet created |
Linked records
Below the line items, links to related records:
- Organization -- the customer
- Entitlements -- all entitlements created from this order
- Invoices -- financial records generated from this order
- Quote -- the quote that originated this order (if applicable)
- Subscription -- the WooCommerce Subscription record (if this is a recurring order)
Troubleshooting: entitlement not created
If an order is completed but no entitlement was created, check these things in order:
Product meta is missing. Open the product in WooCommerce and verify that the
_middag_entitlement_classmeta field is set to a valid class (PLG, ENV, SVC, ORD, AFL, or EDU). If this field is missing, MIDDAG Account does not know what kind of entitlement to create.Organization is not linked. The order must be associated with a MIDDAG Account Organization. Check that the customer's WooCommerce account is linked to an Organization record. If it is not, the provisioning service cannot assign the entitlement to a customer.
Duplicate detection triggered. If the same order + line item + class combination already has an entitlement, the system skips creation. Check if an entitlement already exists by searching for the order number in the Entitlements list.
Webhook did not fire. If payment was processed by Stripe or Banco Inter, the WooCommerce order status change depends on the payment webhook arriving successfully. Check WooCommerce > Status > Logs for webhook delivery errors.
Error in provisioning. Check the order's entitlement creation status section for error messages. Common causes: invalid product configuration, database errors, or integration timeouts.
If the issue is resolved but the entitlement still needs to be created, you can either wait for the next cron cycle (which retries failed provisioning) or create the entitlement manually.
Subscription orders
For products sold as subscriptions (via WooCommerce Subscriptions), the Orders screen shows both the initial order and renewal orders. Renewal orders extend the expiration date of the existing entitlement rather than creating a new one.
The detail view for subscription orders includes:
- Subscription status -- Active, On Hold, Cancelled, Expired
- Next renewal date
- Renewal history -- list of past renewal orders with dates and amounts
- Entitlement impact -- what happened to the entitlement on each renewal (extended, reactivated, etc.)
Related pages
- Entitlements -- what orders create
- Organizations -- the customer that placed the order
- Dashboard -- pending orders appear in the action items
- Orders (concept) -- the order-to-entitlement pipeline in detail
- Entitlement Classes -- how the product determines the entitlement class