> 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 ## Resource: Sample Use Cases and Flows ## Article: Sample Use Cases and Flows ## Article Link: https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/sample-use-cases-and-flows.md ## Article Content: # Sample Use Cases and Flows This article shares some possible use cases for your site, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point. ## Direct Order of a Pricing Plan Direct ordering mirrors the ordering of a plan using the Pricing Plans app. For standard pricing plan processing, call the [`startOnlinePurchase()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/checkout/start-online-purchase.md) method. The following outlines the steps in a direct order lifecycle: 1. Get and display a list of membership plans from one of the following: * A dataset connected to the Plans collection. * A query on the Plans collection. 1. A *logged-in* site member selects a membership plan by clicking the plan or a button. If the member is not logged in, the sign up page is automatically displayed. 1. The corresponding event handler calls the [`startOnlinePurchase()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/checkout/start-online-purchase.md) method to handle all stages of buying the plan (selecting, ordering, and payment): * If the plan is free, the plan is immediately ordered and is considered paid for. The `wixPayStatus` is `Successful`. * If the plan is not free, the plan is ordered but not yet paid for and the `wixPayStatus` is `Pending` and the order's `status` is `DRAFT`. The site member fills in contact details and selects a payment method. Once payment is completed, the `wixPayStatus` is `Successful` and the order's `status` is `ACTIVE`. ## Customized Pricing Plan Purchases This flow lets buyers (logged-in site members) order and pay for a plan using a customized flow. You customize the entire process of selecting, requesting, and paying for a plan. You can add elements, such as confirmation popups and forms, to customize the buyer's experience. To let the buyer order a plan, call the [`createOnlineOrder()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/checkout/create-online-order.md) method. The following outlines the steps for customizing the pricing plan purchase: 1. Get and display a list of membership plans from one of the following: * A dataset connected to the Plans collection. * A query on the Plans collection. 1. A *logged-in* site member selects a membership plan by clicking the plan or a button. If the member is not logged in, the signup page is automatically displayed. 1. The corresponding event handler calls the [`createOnlineOrder()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/checkout/create-online-order.md) method to handle the initial order of the plan. 1. The site member uses a series of customized elements you created, such as popups, and forms, to continue ordering/purchasing. 1. The site member uses [Wix Pay](https://dev.wix.com/docs/sdk/frontend-modules/pay/introduction.md) to complete the purchase. 1. Handle additional updates when a plan is successfully purchased using the `onOrderPurchased()` event ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/orders/on-order-purchased.md) | [Velo](https://dev.wix.com/docs/velo/events-service-plugins/pricing-plans/events/on-order-purchased.md)).