createOnlineOrder( )


Orders a pricing plan.

To process pricing plans on a site, a site first must be set up to offer pricing plans as described in Pricing Plans: An Overview. When setting up a 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 the Custom Purchase Flow API (SDK | Velo).

Note:

  • To work with the Pricing Plans API, a site needs to be published.
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?