previewOfflineOrder( )

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

The previewOfflineOrder() 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, the 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.

This 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 previewPrice() function.

Note: Only those with the Manage Pricing Plans and Manage Subscriptions permissions can preview offline orders. You can override the permissions by setting the function's suppressAuth option to true.

Method Declaration
Method Parameters

ID of the plan being previewed.


Member ID for the buyer who might order the plan offline. The buyerId must be entered because the buyer might not be logged in.


Additional options for previewing the offline order.

Return Type:Promise<OrderPreview>
Was this helpful?