pauseOrder( )


Pauses a pricing plans order.

The pauseOrder() function returns a Promise that resolves when the order is successfully paused.

For orders with recurring payments, pauseOrder() also pauses the payment schedule. Buyers are not charged when an order is paused. Use pauseOrder(), for example, if the buyer is away and would like to put their pricing plan membership on hold until they return. Pausing an order affects the end date of the order by adding the time the order is paused to the endDate. Can only pause orders with an ACTIVE status.

Pausing an order causes the following changes:

  • The order status changes to "PAUSED".
  • The pausePeriods array is updated.

The endDate and the earliestEndDate for the order are adjusted to include the pause period when the order is resumed.

The onOrderPaused() and onOrderUpdated() event handlers run when an order is paused.

Paused orders can be continued with the resumeOrder() function.

Note: Only site visitors with the Manage Pricing Plans and Manage Subscriptions permissions can pause orders. You can override the permissions by setting the function's suppressAuth option to true.

Method Declaration
Copy
Method Parameters
orderIdstringRequired

ID of the order being paused.


optionsOptions

Options to use when pausing an order.

Did this help?