getCheckoutUrl( )


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 the checkout page URL of a specified checkout.

By default, a checkoutUrl generates for a checkout and directs to a standard Wix checkout page. However, if overrideCheckoutUrl has a value, it will replace and set the value of checkoutUrl.

Permissions
Manage eCommerce - all permissions
Read eCommerce - all read permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Orders
Read Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
function getCheckoutUrl(
  _id: string,
  options: GetCheckoutUrlOptions,
): Promise<GetCheckoutURLResponse>;
Method Parameters
_idstringRequired

Checkout ID.


optionsGetCheckoutUrlOptions
Returns
Return Type:Promise<GetCheckoutURLResponse>
JavaScript
import { checkout } from "wix-ecom-backend"; async function getCheckoutUrl(id, options) { try { const result = await checkout.getCheckoutUrl(id, options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?