> 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-management/payments/base44/subscriptions/introduction.md

## Article Content:

# About the Subscriptions API

The Subscriptions API lets you manage the subscriptions that customers started in a [Base44](https://base44.com) app by paying for a subscription item through [Checkout Sessions](https://dev.wix.com/docs/api-reference/business-management/payments/checkout-sessions/introduction.md). It's part of the [Payments APIs for Base44](https://dev.wix.com/docs/api-reference/business-management/payments/base44/introduction.md). Each call applies to the app's [site](https://dev.wix.com/docs/api-reference/business-management/payments/base44/introduction.md#terminology), which holds the app's payments data.

With the Subscriptions API, you can:

- Retrieve a subscription, or up to 100 subscriptions at once.
- Cancel a subscription, either immediately or at the end of the current billing cycle.
- Pause a subscription, and resume a paused subscription.

## Subscription IDs

A subscription is identified by the ID of its eCom subscription contract. This isn't an ID from the billing system. Checkout Sessions creates the subscription items that lead to these contracts. You can get a subscription ID in either of these ways:

- From the eCom subscription contract that's created after a customer pays through Checkout Sessions.
- From the payloads of the eCom subscription contract canceled and expired events, which tell you when a subscription ends.

The subscription's status, next billing date, and cancellation date come from the billing subscription that the contract points to.

## Canceling a subscription

Cancel Subscription works in 2 modes, which you choose with the `immediate` parameter:

- **Soft cancellation** (`immediate` is `false`, the default): Turns off auto-renewal. The subscription stays `ACTIVE`, and `cancellationDate` is set to the date of the next billing cycle, when the subscription is scheduled to end.
- **Immediate cancellation** (`immediate` is `true`): Cancels the subscription immediately.

If the subscription is already `CANCELED` or `ENDED`, the call succeeds and returns the current subscription. The same applies to a soft cancellation when auto-renewal is already off.

## Before you begin

It's important to note the following points before starting to code:

- Retrieve, cancel, pause, and resume calls return a `SUBSCRIPTION_NOT_FOUND` error when the subscription doesn't exist on the site that makes the call. [Query Subscriptions](https://dev.wix.com/docs/api-reference/business-management/payments/base44/subscriptions/query-subscriptions.md) leaves such IDs out of the response instead.
- Query Subscriptions requires a filter on `id`, using either `$in` with up to 100 unique IDs or `$eq` with a single ID. All matches are returned in a single page. Sorting isn't supported, and you can set a paging `limit` but not a `cursor`.
- Pause and resume apply immediately. Only active subscriptions can be paused, and only paused subscriptions can be resumed. Cancel, pause, and resume fail with an error when the subscription's current status or state doesn't allow the action.

## Use cases

- [Cancel a customer's subscription](https://dev.wix.com/docs/api-reference/business-management/payments/base44/subscriptions/sample-flows.md#cancel-a-customers-subscription)
- [Pause and resume a customer's subscription](https://dev.wix.com/docs/api-reference/business-management/payments/base44/subscriptions/sample-flows.md#pause-and-resume-a-customers-subscription)

## Terminology

- **Subscription**: A recurring payment arrangement that a customer starts through Checkout Sessions.
- **eCom subscription contract**: The eCom record that represents a subscription. Its ID is the subscription ID.
- **Soft cancellation**: Canceling a subscription by turning off auto-renewal, so the subscription stays active until its next billing date.

