> 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

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/introduction.md

## Article Content:

# About the eCommerce Checkout Templates API

The Checkout Templates API allows you to create and manage pre-populated checkouts to share with customers. When customers then create checkouts from these templates, the new checkouts already include information such as predefined line items, coupons, or other customizations.

With the Checkout Templates API, you can:
+ [Create](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/create-checkout-template.md), [update](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/update-checkout-template.md), and [delete](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/delete-checkout-template.md) checkout templates.
+ [Get](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/get-checkout-template.md) and [query](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/query-checkout-templates.md) checkout templates.
+ Customize the checkout experience to [create a checkout from a template](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/create-checkout-from-template.md) or to [create and redirect to a checkout from a template](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/create-and-redirect-to-checkout.md).


## Before you begin

It’s important to note that the checkout template functionality is not currently available in the Wix Dashboard. If a site creates checkout templates with an app, they must also be able to manage and update their checkout templates through an app. For example, a site offering a sale through a checkout template must be able to change the template’s `status` to `"INACTIVE"` or they will not be able to turn off the sale when they want it to end.


##  Use cases
+ [Run a flash sale through social media](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/sample-flows.md)
+ [Limit the number of checkouts for a specific coupon](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout-templates/sample-flows.md)

## SDK Setup
  `@wix/ecom`

To use the API, install the `@wix/ecom` package.

#### Install the package

Follow the installation instructions for your development environment.

| Development environment | Installation method |
|--|--|
| Wix sites (editor or IDE) | Use the [package manager](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-in-the-editor.md). |
| Wix sites (local IDE) | Run `wix install @wix/ecom` using the [Wix CLI](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-with-the-wix-cli.md).|
| Blocks apps | Use the same installation method as Wix sites. |
| CLI and self-hosted apps | Run `npm install @wix/ecom` or `yarn add @wix/ecom`. |
| Headless sites and apps | Run `npm install @wix/ecom` or `yarn add @wix/ecom`. |

#### Import the package

To import the package in your code:

```js
import { checkoutTemplates } from '@wix/ecom'
```

#### Import types

Types for this API are accessed through the `checkoutTemplates` namespace you already imported above, as `checkoutTemplates.<TypeName>`, using any type name shown in these docs.
  