> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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: pricing-plans

## Article: Introduction

## Article Link: https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/introduction.md

## Article Content:

# Introduction
Use the Custom Purchase Flow API to customize the pages in the plan purchase flow on your 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, first set up pricing plans on your site:

 + Accept payments as described in [About Accepting Payments](https://support.wix.com/en/article/about-accepting-payments).

 + Offer membership plans as described in [About Pricing Plans](https://support.wix.com/en/article/about-pricing-plans). When setting up your site to accept pricing plans, 
   define the plans you want to offer [using the Dashboard](https://support.wix.com/en/article/creating-a-plan-in-pricing-plans) or
   [using the Pricing Plan backend APIs](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/introduction.md).

### Direct users to pages in the purchase flow
The Custom Purchase Flow API lets you direct customers to either of two pages in the plan purchase flow:

+ **The Plans & Pricing page**: You can navigate from anywhere in your site to the Plans & Pricing page.
+ **The Checkout page**: If your site uses a custom Plans & Pricing page, you can navigate to checkout from anywhere in your site, including
    the Plans & Pricing page. If your site uses the default Plans & Pricing page, visitors will still be directed from Plans & Pricing to the
    Checkout page without any method call on your part. However, you may also direct users to checkout from any other page in your site.

### Customize the content of the Plans & Pricing and Checkout pages
You can use the [`navigateToPricingPage()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-pricing-page.md) and [`navigateToCheckout()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-checkout.md) 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()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-pricing-page.md). 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 the [`navigateToCheckout()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-checkout.md) method, 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()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/get-pricing-page-options.md) on the Plans & Pricing page to
    retrieve the Pricing page options you set in [`navigateToPricingPage()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-pricing-page.md).

### 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 will need to store the options set in [`navigateToPricingPage()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-pricing-page.md)
globally, for example using the [Wix Storage API](https://dev.wix.com/docs/sdk/frontend-modules/storage/introduction.md),
and access them before you call [`navigateToCheckout()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-checkout.md).

If you are navigating directly from the Plans & Pricing page to Checkout, you can
call [`getPricingPageOptions()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/get-pricing-page-options.md) and pass the retrieved options directly to [`navigateToCheckout()`](https://dev.wix.com/docs/sdk/frontend-modules/pricing-plans/custom-purchase-flow/navigate-to-checkout.md).
