Search.../

onOrderPurchased( )

Developer Preview

Triggered when an order is purchased.

Description

This webhook is triggered for any of the following events:

  • Order is paid in full.
  • At least 1 order cycle payment is paid for.
  • Offline order is created, even if not yet marked as paid.
  • Free order is created.

Syntax

function wixPricingPlans_onOrderPurchased(event: OrderPurchasedEvent): void

onOrderPurchased Parameters

NAME
TYPE
DESCRIPTION
event
Optional
OrderPurchasedEvent

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

onOrderPurchased example

Copy Code
1
2 export function wixPricingPlans_onOrderPurchased(event) {
3 const eventId = event.metadata.id
4 const entityId = event.data.order._id;
5 }
6
7