createOfflineOrder( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates an order for a buyer who purchased the plan with an offline transaction.

The createOfflineOrder() function returns a Promise that resolves to an order object when the order has been created.

Payment of an offline order is handled in 1 of 2 ways.

  • When creating the order, select true in the paid request parameter.
  • After creation, with the markAsPaid() function.

When creating a non-free offline order:

  • The order's status is set to "PENDING" if the start date is in the future. Otherwise, the status is set to "ACTIVE". The order's last payment status is set to "UNPAID" or "PAID".

When creating a free offline order:

  • The order's status is set to "PENDING" if the start date is in the future. Otherwise, the status is set to "ACTIVE".
  • The order's last payment status is set to "NOT_APPLICABLE".
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Orders
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
planIdstringRequired

ID of the plan being ordered. See Plans for more information about plan IDs


memberIdstringRequired

ID of the member ordering the plan.


optionsCreateOfflineOrderOptions

Options for creating an offline order.

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