Search...
getCheckoutUrl( )
Developer Preview
Retrieves the checkout page URL of a specified checkout.
Description
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
.
Syntax
function getCheckoutUrl(_id: string): Promise<GetCheckoutURLResponse>
getCheckoutUrl Parameters
NAME
TYPE
DESCRIPTION
_id
string
Checkout ID.
Returns
Return Type:
Promise<
GetCheckoutURLResponse
>NAME
TYPE
DESCRIPTION
checkoutUrl
string
Checkout URL.
Was this helpful?
getCheckoutUrl example
Copy Code
1import { checkout } from 'wix-ecom-backend';23 async function getCheckoutUrl(id, options) {4 try {5 const result = await checkout.getCheckoutUrl(id, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13