createOfflineOrder( )


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

An offline order is handled off of the Wix site and is marked as type: offline. If a pricing plan has a limit on the amount of purchases per buyer, that limit is ignored for offline orders. Tax is only applied if the site has it configured.

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". "

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" based on the data passed in the paid boolean in the request.

Payment for an offline order can be set in 1 of 2 ways:

  • During order creation, set paid: true.
  • After creation, call Mark As Paid.
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, from the Plans API.


memberIdstringRequired

ID of the member ordering the plan, from the Members API.


optionsCreateOfflineOrderOptions

Options for creating an offline order.

Returns
Return Type:Promise<CreateOfflineOrderResponse>
Errors
428Failed Precondition

There are 8 errors with this status code:

See the entire list and learn more about Wix errors.

Did this help?