createOnlineOrder( )


Creates an online order for a site member.

If this method is called by a site member (SDK | REST), the plan is automatically ordered on behalf of that site member. Otherwise, you must specify onBehalf.memberId in your call.

When an online order is created, but payment hasn't been processed, its status is set to DRAFT. After the payment has been processed, if the start date is in the future the order's status is set to PENDING. Otherwise, it's set to ACTIVE.

Method Declaration
Copy
Method Parameters
planIdstringRequired

Plan ID.


optionsCreateOnlineOrderOptions
Returns
Return Type:Promise<CreateOnlineOrderResponse>
Errors
400Invalid Argument

There are 5 errors with this status code.

403Permission Denied

There are 2 errors with this status code.

428Failed Precondition

There are 13 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?