Orders a pricing plan.
To process pricing plans on your site, first set up your site to offer pricing plans as described in About Pricing Plans. When setting up your site to accept pricing plans, define the plans you want to offer.
orderPlan() function returns a Promise that resolves to an
object when the visitor completes the order process. Use this result only for display purposes.
Ordering a plan places an order for the plan, without actually purchasing it. You can then continue the payment process with the Wix Pay payment method, which applies the plan to the visitor on completion of payment.
To understand how
orderPlan() is used in a customized pricing plan lifecycle,
see Customized Pricing Plan Purchases.
Note: To work with the Paid Plans API, you need to publish your site.
function orderPlan(planId: string): Promise<OrderResult>
The plan ID.
Fulfilled - The created order. Rejected - Error message.
Was this helpful?