requestCurrentMemberOrderCancellation( )


Requests the cancellation of a specific order of a plan for the currently logged-in member.

The requestCurrentMemberOrderCancellation() function requests the cancellation of an order, after verifying that the site member is logged in.

This function does not immediately cancel the order. The cancellation request is initiated and the status of the order is updated to "PENDING_CANCELLATION". When the cancellation is completed, the order status is updated to "CANCELED".

Keep in mind that a site member can order several subscriptions of the same plan. This API does not cancel the plan and remove all corresponding subscriptions. This API removes only the one specified order of the plan.

If a plan's Allow Plan Cancellation setting is disabled and the currently logged-in site member tries to cancel an order for the plan using the requestCurrentMemberOrderCancellation() function, an error is thrown.

Note:

  • To work with the Pricing Plans API, you need to publish your site.
Method Declaration
Copy
Method Parameters
orderIdstringRequired

The order ID of the order whose cancellation is requested.


effectiveAtstringRequired

When the cancellation should take effect. One of:

  • "IMMEDIATELY". The cancellation occurs immediately and the buyer cannot use the plan at this point.
  • "NEXT_PAYMENT_DATE". The cancellation occurs at the next payment date. The buyer can continue to use the plan until that date.
Was this helpful?
Yes
No