> 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/account-level/premium/premium-platform/core-services/premium-asset-v2/introduction.md

## Article Content:

# About the Premium Assets V2 API

The Premium Assets V2 API lets you retrieve what a Wix account pays for. A
Premium asset is a read-only view of a purchased Premium product, together with
the product it came from.

With the Premium Assets V2 API, you can:

- Retrieve every Premium product an account currently pays for, across Premium
  plans, [domains](https://support.wix.com/en/article/purchasing-a-domain-from-wix-3133977),
  [business email](https://support.wix.com/en/article/business-email-an-overview),
  and digital goods such as images, videos, and logos.
- Read the billing state of each asset, including its renewal behavior, billing
  cycle, last invoice, and next billing date.
- Filter and sort assets by status, product type, site, or billing details to
  find the ones you care about.

## Before you begin

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

- This API is read-only. Assets are created and updated when a customer
  purchases, changes, or cancels a Premium product, so there's nothing to create
  or modify through the API.
- Specify the account whose assets you want to retrieve in the `targetAccountId`
  header. Query Premium Assets fails without it.
- Use `premiumId` to identify an asset across calls.

## What the caller's permissions change

Which assets come back depends on what the caller is permitted on, so the same
request can return different results for different callers.

A caller permitted on the target account receives all of that account's assets.
A caller permitted only on a specific site receives that site's assets alone,
because the results are filtered to the site taken from the call scope. A call
with neither an account permission nor a site in scope fails.

## Asset ownership and Billing Managers

An account can be the owner of an asset, or a
[Billing Manager](https://support.wix.com/en/article/roles-permissions-overview#roles-for-integrated-wix-apps)
for it, meaning it handles payment for an asset that belongs to someone else.

Query Premium Assets returns owned assets by default. Specify
`{"includePermitted": true}` to include assets the account only manages billing
for. To work out how many assets fall into each group, call Query Premium Assets
twice and compare the results.

## Reading product names

`productData.productName` and `productData.productTypeName` are translated to
the language of the request, so they're display values rather than stable
identifiers. Use `productData.productId` and `productData.productTypeId` when
you need something stable to compare or store.

`productName` is returned as an empty string for domains, business email, and
digital goods. For those, use the type-specific fields instead:

- Domains: `domainsData.domain`.
- Business email: `mailboxesData.domainName`.
- Digital goods: `digitalGoodsData.digitalGoodsType`.

## Reading billing details

`wixBillingDetails.lastInvoiceDetails.amount` is a string whose representation
isn't guaranteed to be consistent across billing providers. Some report the
amount in the currency's minor units, for example `950` for 9.50, and others
report a decimal value, for example `9.50`. Read
`billingReference.providerName` to see which billing provider an asset comes
from, and don't assume a single format across assets.

`wixBillingDetails.nextInvoiceDetails` deliberately carries only a date. The
amount of the next invoice can change before it's issued, for example when tax
changes, so it isn't reported in advance.

## Free trials and deferred billing

`freeTrialData.inFreeTrialPeriod` is `true` both during a free trial and while
billing is on hold pending an external activation. Check
`freeTrialData.pendingExternalActivation` to tell the two apart before showing a
customer that they're in a trial.

## Use cases

- [Show a customer everything they currently pay for](https://dev.wix.com/docs/api-reference/account-level/premium/premium-platform/core-services/premium-asset-v2/sample-flows.md#show-a-customer-everything-they-pay-for).
- [Tell a customer when a subscription renews and how it's paid for](https://dev.wix.com/docs/api-reference/account-level/premium/premium-platform/core-services/premium-asset-v2/sample-flows.md#tell-a-customer-when-a-subscription-renews).
- [Work out why a Premium product stopped working](https://dev.wix.com/docs/api-reference/account-level/premium/premium-platform/core-services/premium-asset-v2/sample-flows.md#work-out-why-a-premium-product-stopped-working).
- [Check whether a site has an active Premium plan](https://dev.wix.com/docs/api-reference/account-level/premium/premium-platform/core-services/premium-asset-v2/sample-flows.md#check-whether-a-site-has-an-active-premium-plan).

## Terminology

- **Premium asset**: A read-only view of a Premium product that an account has
  purchased.
- **Premium ID**: The identifier of the underlying subscription, domain
  registration, digital goods package, or mailbox that an asset describes.
- **Billing Manager**: An account that handles payment for an asset that belongs
  to another account.
- **Permitted Premium asset**: An asset for which the specified Wix account is
  [Billing Manager](https://support.wix.com/en/article/roles-permissions-overview#roles-for-integrated-wix-apps)
  rather than the owner.
- **Product type**: The kind of purchase an asset represents, such as a Premium
  plan, a domain, business email, or digital goods.

## See also

- [Premium Assets V2: Sample Flows](https://dev.wix.com/docs/api-reference/account-level/premium/premium-platform/core-services/premium-asset-v2/sample-flows.md)

