> 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: wix-pricing-plans-frontend ## Namespace: custom-purchase-flow ## Article: Introduction ## Article Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-frontend/custom-purchase-flow/introduction.md ## Article Content: # Introduction Use the Custom Purchase Flow API to customize the pages in the plan purchase flow on a site. This API provides functionality for directing users to the Plans & Pricing and Checkout pages outside of the default flow. It also allows you to customize the content displayed on the Plan & Pricing, Checkout, and Thank You pages. ### Set up pricing plans To use APIs to customize the plan purchase flow, a site must first be set up to: + Accept payments as described in [Accepting Payments: An Overview](https://support.wix.com/en/article/accepting-payments-an-overview). + Offer membership plans as described in [Pricing Plans: An Overview](https://support.wix.com/en/article/pricing-plans-an-overview). When setting up a site to accept pricing plans, define the plans you want to offer [using the dashboard](https://support.wix.com/en/article/pricing-plans-creating-a-one-time-payment-plan) or using the Pricing Plan APIs. ### Direct users to pages in the purchase flow The Custom Purchase Flow API lets you direct customers to either of 2 pages in the plan purchase flow: + **The Plans & Pricing page**: You can navigate from anywhere in a site to the Plans & Pricing page. + **The Checkout page**: If a site uses a custom Plans & Pricing page, you can navigate to checkout from anywhere in a site, including the Plans & Pricing page. If a site uses the default Plans & Pricing page, visitors will still be directed from Plans & Pricing to the Checkout page without you calling any method. However, you may also direct customers to checkout from any other page in a site. ### Customize the content of the Plans & Pricing and Checkout pages You can use `navigateToPricingPage()` and `navigateToCheckout()` methods to customize pages in the plan purchase flow: + **Customizing the Plans & Pricing page**: You can set page content such as the title and subtitle of the Plans & Pricing page by passing options to `navigateToPricingPage()`. In the same method you can also pass options to customize the content on the Checkout and Thank You pages. + **Customizing the Checkout page**: In `navigateToCheckout()`, you can pass options to customize the content displayed on the Checkout and Thank You pages. + **Retrieving the Pricing Page options**: You can call `getPricingPageOptions()` on the Plans & Pricing page to retrieve the Pricing page options you set in `navigateToPricingPage()`. ### Customize the pricing plan purchase flow You can now add custom pages to the pricing plan flow, as well as build a custom Plans & Pricing page. If you add pages between Plans & Pricing and Checkout, you'll need to store the options set in `navigateToPricingPage()` globally, for example using the Wix Storage API and access them before you call `navigateToCheckout()`. If you are navigating directly from the Plans & Pricing page to Checkout, you can call [`getPricingPageOptions()`](#getPricingPageOptions) and pass the retrieved options directly to [`navigateToCheckout()`](#navigateToCheckout). ### Import the APIs To use the CustomPurchaseFlow API, import `customPurchaseFlow` from the `wix-pricing-plans-frontend` module. ```javascript import { customPurchaseFlow } from 'wix-pricing-plans-frontend'; ```