getPricingPageOptions( )


Returns the options set for the current Plans & Pricing page.

The getPricingPageOptions() function retrieves the options set for the Plans & Pricing Page in navigateToPricingPage(). The returned PricingPageOptions object also includes any options set for the Checkout and Thank You pages.

Call this function in the page code of a default or custom Plans & Pricing page. If you need to pass the returned pricing page options to navigateToCheckout() at a later point, store the options object globally so you can access it later.

Note:

  • To work with the Pricing Plans API, you need to publish your site.
Method Declaration
Copy
function getPricingPageOptions(): Promise<PricingPageOptions>;
Request
This method does not take any parameters
Returns
Return Type:Promise<PricingPageOptions>
JavaScript
import { customPurchaseFlow } from "wix-pricing-plans-frontend"; export async function showOptions_click(event) { const pricingPageOptions = await customPurchaseFlow.getPricingPageOptions(); console.log(pricingPageOptions); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?