> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # GetCheckoutURL # Package: checkout # Namespace: CheckoutService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout/get-checkout-url.md ## Permission Scopes: Read Orders: SCOPE.DC-STORES.READ-ORDERS ## Introduction 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`. --- ## REST API ### Schema ``` Method: getCheckoutUrl Description: 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`. URL: https://www.wixapis.com/ecom/v1/checkouts/{id}/checkout-url Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: id Method parameters: param name: id | type: none | required: true Return type: GetCheckoutURLResponse - name: checkoutUrl | type: string | description: Checkout URL. ``` ### Examples ### Get Checkout Url ```curl curl -X GET \ 'https://www.wixapis.com/ecom/v1/checkouts/d0d530f0-45d9-4c2c-bd71-8ab07a058472/checkout-url' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.checkout.CheckoutService.getCheckoutUrl(_id) Description: 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`. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: _id Method parameters: param name: _id | type: string | description: Checkout GUID. | required: true Return type: PROMISE - name: checkoutUrl | type: string | description: Checkout URL. ``` ### Examples ### getCheckoutUrl ```javascript import { checkout } from '@wix/ecom'; async function getCheckoutUrl(_id) { const response = await checkout.getCheckoutUrl(_id); }; ``` ### getCheckoutUrl (with elevated permissions) ```javascript import { checkout } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myGetCheckoutUrlMethod(_id) { const elevatedGetCheckoutUrl = auth.elevate(checkout.getCheckoutUrl); const response = await elevatedGetCheckoutUrl(_id); } ``` ### getCheckoutUrl (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { checkout } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { checkout }, // Include the auth strategy and host as relevant }); async function getCheckoutUrl(_id) { const response = await myWixClient.checkout.getCheckoutUrl(_id); }; ``` ---