getOfflineOrderPreview( )


Developer Preview

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

Provides a preview of an offline order as if it was purchased.

The getOfflineOrderPreview() function returns a Promise that resolves to a temporary preview of the offline order.

The preview uses the same logic as purchasing a plan, but the preview is not saved. Because an order is not actually created, the preview's _id and subscriptionId properties are displayed as a string of multiple zero characters (000000-0000).

If taxes are configured for the site, taxes are applied to the preview. If not, tax previews as null.

You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then purchaseLimitExceeded will return as true. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the getPricePreview() function.

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 of the previewed order.


memberIdstringRequired

Member ID of the buyer the previewed order is for.


optionsGetOfflineOrderPreviewOptions

Options for previewing the offline order.

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