> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: pauseOrder(orderId: string, options: Options) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> Orders --> pauseOrder # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/orders/pause-order.md # Method Description: 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()`](wix-pricing-plans-backend/events/onOrderPaused) and [`onOrderUpdated()`](wix-pricing-plans-backend/events/onOrderUpdated) event handlers run when an order is paused. Paused orders can be continued with the [`resumeOrder()`](#resumeOrder) function. > **Note**: Only site visitors with the **Manage Pricing Plans** and **Manage Subscriptions** [permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Froles-and-permissions/roles) > can pause orders. You can override the permissions by setting the function's `suppressAuth` > option to `true`. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Pause an order ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans-backend'; // Sample orderId value: '19b28b41-1ef2-42dc-afaa-9dc1854d0191' export const myPauseOrderFunction = webMethod(Permissions.Anyone, async (orderId) => { try { const order = await orders.pauseOrder(orderId); return order; } catch (error) { console.error(error); } }); // Returns a promise that resolves to void ``` ## Pause an order, bypassing permission checks ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { orders } from 'wix-pricing-plans-backend'; /* Sample orderId value: '895fd8d9-f732-444f-a82b-19f7e55e9617' * * Sample options object: * { * suppressAuth : true * } */ export const myPauseOrderWithOptionsFunction = webMethod(Permissions.Anyone, async (orderId, options) => { try { const order = await orders.pauseOrder(orderId, options); return order; } catch (error) { console.error(error); } }); // Returns a promise that resolves to void ``` ---