getPricePreview( )


Developer Preview

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

Retrieves a preview of an order's pricing as if it was purchased.

The getPricePreview() function returns a Promise that resolves to a temporary preview of the order's price.

The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If taxes are configured for the site, taxes are applied to the preview. If not, the tax previews as null.

Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the getOfflineOrderPreview().

Permissions
Manage Bookings Services and Settings
Manage Orders
Read Orders
Read Pricing Plans
Manage Pricing Plans
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
planIdstringRequired

ID of plan to preview.


optionsGetPricePreviewOptions

Options for getting a price preview.

Returns
Return Type:Promise<GetPricePreviewResponse>
Was this helpful?
Yes
No