Skip to content

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:

  1. A customer pays for an order (via Stripe, Banco Inter, or manual confirmation).
  2. WooCommerce marks the order as completed.
  3. MIDDAG Account's provisioning service reads the order's line items and creates entitlements based on each product's configured class.
  4. 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

ColumnWhat it shows
Order #WooCommerce order number (clickable -- opens detail view)
DateOrder date
OrganizationThe customer organization this order belongs to
AmountOrder total with currency (BRL or USD)
Payment StatusCompleted, Processing, On Hold, Refunded, Cancelled, or Failed
Billing EntityMIDDAG BR or MIDDAG GLOBAL
EntitlementsEntitlement 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.

  • 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:

StatusWhat it means
CreatedEntitlement was successfully created. Shows the code and link.
PendingOrder is not yet completed. Entitlement will be created on completion.
SkippedProduct does not have a _middag_entitlement_class meta set. No entitlement was expected.
ErrorEntitlement creation failed. Shows the error message.
Duplicate blockedA 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:

ColumnWhat it shows
ProductProduct name
QuantityNumber purchased
PriceUnit price and line total
Entitlement ClassThe class configured for this product (PLG, ENV, SVC, etc.) or "None"
Entitlement CreatedThe 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:

  1. Product meta is missing. Open the product in WooCommerce and verify that the _middag_entitlement_class meta 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.)