requestCurrentMemberOrderCancellation( )


Starts the process of cancelling the logged-in member's pricing plan order.

The requestCurrentMemberOrderCancellation() function returns a Promise that resolves when the order cancellation is successfully requested.

For orders with recurring payments, a cancellation can be set to occur either immediately or at the next payment date. For orders with one-time payments, a cancellation occurs immediately after the request is processed.

Requesting an order cancellation starts the cancellation process. The event is triggered immediately and the function's promise is fulfilled. However, there may be some operations that continue to be processed before the status of the order is changed to "CANCELED". For example, payments might need to be refunded before the order is fully canceled.

The onOrderUpdated() event handler runs when a cancellation is requested. The onOrderCanceled() event handler runs when the cancellation is completed.

Method Declaration
Copy
Method Parameters
orderIdstringRequired

ID of the order whose cancellation is requested.


effectiveAtstringRequired

The request can be that the order is canceled immediately or at the next payment date. One-time orders can only be canceled immediately. One of:

  • "IMMEDIATELY" The request indicates that the order should be canceled immediately.
  • "NEXT_PAYMENT_DATE". The request indicates that the order be canceled at the next payment date.
Did this help?