onOrderCanceled( )


Notes:

Triggered when an order is canceled.

This webhook is triggered either immediately or at the end of the current payment cycle, as follows:

  • If the order is canceled and effectiveAt is set to IMMEDIATELY, the webhook is triggered immediately when canceled.
  • If the order is canceled and effectiveAt is set to NEXT_PAYMENT_DATE, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately.
Permissions
Manage Orders
Read Orders
Manage Events
Learn more about app permissions.
Method Declaration
Copy
function onOrderCanceled(handler: function): void;
Method Parameters
handlerfunction

handler(event: OrderCanceledEnvelope): void | Promise<void>

JavaScript
import { orders } from "@wix/pricing-plans"; orders.onOrderCanceled((event) => { // handle your event here });
Did this help?