Panelr

Complete Order

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.

An order Panelr already created (its checkout handed the customer to your store with ?panelr_ref and ?panelr_token): send only confirmation_token, payment_transaction_id and payment_amount. The order is marked paid and queued; nothing is created twice, and a repeat call answers already: true.

Request Parameters

FieldTypeRequiredDescription
confirmation_tokenstringOptionalThe token of an order Panelr's own checkout created. When sent, every other field but payment_transaction_id, payment_amount and payment_method_id is ignored
customer_emailstringRequiredCustomer email address
payment_method_idintegerRequiredunless every item is paid with credits, or is_freePanelr payment method ID — the gateway that took the money. Omit when the whole order is paid with credits (pay_with_points): the debit is the payment
itemsarrayRequiredOne or more cart item objects — see Item Object below
customer_namestringOptionalCustomer full name
customer_phonestringOptionalCustomer phone number
customer_addressstringOptionalCustomer address
payment_transaction_idstringOptionalYour transaction or order ID
payment_amountfloatOptionalAmount paid
wc_order_idstringOptionalWooCommerce or external order ID — attached to each cart item
sourcestringOptionalWhere the order came from, as the admin sees it (e.g. your site's name). Default: woocommerce
is_freebooleanOptionalSet true to skip payment method validation for free orders
bouquet_idsarrayOptionalExplicit bouquet IDs to assign. Must belong to the same service as the product — ids from another service mean nothing to that panel
categoriesarrayOptionalCategory filter: live, vod, series
notesstringOptionalInternal admin notes
referral_codestringOptionalInvite code the customer arrived with (?ref). Stale codes are dropped silently; attribution happens when their login is created
coupon_codestringOptionalA coupon to apply to the order's money total. Unlike a stale invite code, a bad coupon fails the request (422) — it changes what the customer pays. Check first with validate_coupon. Applied as its own negative line in cart_json; credit-paid items carry no money and are not discounted
idempotency_keystringOptionalYour own reference for this request (defaults to wc_order_id, then payment_transaction_id). Send the same key again after a timeout or retry and you get the original order back with already: true instead of a second order

Item Object

FieldTypeRequiredDescription
product_idintegerRequiredPanelr product ID
intentstringRequirednew_activation, renewal, or trial_upgrade
activation_idintegerOptional*Required for renewal and trial_upgrade
qtyintegerOptionalDefaults to 1
pay_with_pointsbooleanOptionalPay for this item with the customer’s credits. The plan must be credit-priced on a participating service and the balance must cover every credit-paid item — no partial payments

Response Fields

FieldTypeDescription
work_order_idintegerWork order ID
alreadybooleantrue when this call matched an earlier one by idempotency_key and the original order is being returned
reference_codestringHuman-readable reference code e.g. WO-2026-00042
statusstringAlways queued
typestringDerived from item intents — new_activation takes priority in mixed carts
item_countintegerNumber of items in the cart
credits_spentintegerCredits debited for credit-paid items (0 when none)
coupon_codestring|nullThe coupon that was applied, or null
coupon_discountdecimalWhat the coupon took off the money total (0 when none)