createOnlineOrder( )


Orders a pricing plan.

The createOnlineOrder() function returns a Promise that resolves to an Order object.

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.

Ordering a plan places an order for the plan, without actually purchasing it. You can then continue the payment process with Wix Pay, which applies the plan to the buyer on completion of payment.

To understand how createOnlineOrder() is used in a customized pricing plan lifecycle, see Customized Pricing Plan Purchases.

Note:

  • To work with the Pricing Plans API, you need to publish your site.
Method Declaration
Copy
Method Parameters
planIdstringRequired

The plan ID.


startDateDate

Start date and time for the ordered plan.

Returns
Return Type:Promise<Order>
Did this help?