POST ?action=complete_order

Creates a work order from a confirmed automatic payment and queues it for immediate provisioning. Use this for non-manual gateways (Stripe, PayPal, etc.) where payment is confirmed automatically. The line is provisioned within approximately 1 minute.

For manual payment methods, use create_work_order instead.

Request Parameters

customer_email — string — Required. Customer email address.

payment_method_id — integer — Required. Panelr payment method ID.

items — array — Required. One or more cart item objects (see Item Object below).

customer_name — string — Optional. Customer full name.

customer_phone — string — Optional. Customer phone number.

customer_address — string — Optional. Customer address.

payment_transaction_id — string — Optional. Your transaction or order ID.

payment_amount — float — Optional. Amount paid.

wc_order_id — string — Optional. WooCommerce or external order ID, attached to each cart item.

is_free — boolean — Optional. Set true to skip payment method validation for free orders.

bouquet_ids — array — Optional. Explicit bouquet IDs to assign.

categories — array — Optional. Category filter: live, vod, series.

notes — string — Optional. Internal admin notes.

Item Object

product_id — integer — Required. Panelr product ID.

intent — string — Required. new_activation, renewal, or trial_upgrade.

activation_id — integer — Required for renewal and trial_upgrade. The activation to renew or upgrade.

qty — integer — Optional. Defaults to 1.

Response Fields

work_order_id — integer — Work order ID

reference_code — string — Human-readable reference code e.g. WO-2026-00042

status — string — Always queued

type — string — Derived from item intents. new_activation takes priority in mixed carts.

item_count — integer — Number of items in the cart

Example

curl -X POST "https://YOUR_DOMAIN/api/api.php?action=complete_order" \
  -H "X-Panelr-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "customer_email": "[email protected]",
  "customer_name": "John Doe",
  "payment_method_id": 1,
  "payment_transaction_id": "stripe_pi_abc123",
  "payment_amount": 9.99,
  "items": [
    {
      "intent": "new_activation",
      "product_id": 1,
      "qty": 1
    }
  ]
}'