> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

> **Deprecated.** This method is deprecated. Replaced by Cart V2 Get Checkout URL. Replacement: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/get-checkout-url.md Planned removal date: 2027-02-01.

# 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: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.checkout.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 | validation: format GUID
 Return type: PROMISE<GetCheckoutURLResponse>
  - 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-managed)
Self-managed 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);
};
```

---