onOrderPurchased( )


An event that triggers when an order is purchased.

The onOrderPurchased() event handler runs when an order is purchased. The received OrderPurchasedEvent object contains information about the order that was purchased.

An order is considered purchased if:

  • The order is paid for in full, or at least one of its billing cycle payments is paid.
  • An offline order is created, even if not yet marked as paid.
  • A free online order is created.

Note: Backend events don't work when previewing your site.

Method Declaration
Copy
Method Parameters
eventOrderPurchasedEventRequired

Information about the order that was purchased and metadata for the event.

Was this helpful?
Yes
No