Search...
navigateToPricingPage( )
Directs site visitor to the Pricing & Plans page in the plan purchase flow.
Description
The navigateToPricingPage()
function directs the site visitor to the active Plans & Pricing page from any other page on your site.
It also provides options to customize the Checkout and Thank You pages that come later in the plan purchase flow. This allows you to
customize each of the pages in the flow with a single function call.
Notes:
- Setting the
minStartDate
andmaxStartDate
parameters will have no effect unless you've allowed customers to set the plan start date.- To work with the Pricing Plans API, you need to publish your site.
Syntax
function navigateToPricingPage(options: PricingPageOptions): void
navigateToPricingPage Parameters
NAME
TYPE
DESCRIPTION
options
PricingPageOptions
Options to customize the Plans & Pricing page and subsequent flow.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Set a button on your site to navigate to the Plans & Pricing Page
Copy Code
1import { customPurchaseFlow } from 'wix-pricing-plans-frontend';23/* Sample pricingPageOpts value:4{5 planIds: ['fedb93e3-623a-487b-a47d-499f48ee3c7d', '4c68d55d-e8fa-4008-af40-35cca6d39741'],6 checkout: {7 thankYouPage: {8 content: 'Thank you for your purchase!',9 },10 },11}*/1213$w.onReady(() => {14 $w('#button').onClick(() => {15 customPurchaseFlow.navigateToPricingPage(pricingPageOpts);16 });17});