Generated banner for Wix Headless
Generated logo for Wix Headless

Wix Headless

WixOfficialPublished by Wix

  • Skill
  • Tool integration
  • Software development
  • MIT
  • Low risk
  • Has scripts

From the author

Connect Wix business services (Stores, Bookings, Donations, CMS, Blog, Events, Forms, and more) to a Wix Headless frontend — infer the needed capabilities, install the apps, seed backend content, and produce an SDK-integration guide. For managed (Wix-hosted) projects it can also build the frontend: scaffold a new site (create) or wire an existing/brought-in design (connect), then build and release. Works across managed, self-managed, and stripe project types. Triggers: set up a Wix Headless backend, add Wix business features to my app, accept donations, build or host a Wix site, connect/implement this design with Wix.
— the description by Wix

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The wix-headless skill acts as an orchestrator for integrating Wix business services (such as Stores, Bookings, and CMS) into a headless frontend architecture. It handles the end-to-end configuration of the Wix backend, including app installation, content seeding, and the generation of a tailored SDK integration guide. Depending on the project type (managed, self-managed, or stripe), the skill can either provide a comprehensive integration guide for the user to implement or, in managed scenarios, actively scaffold, wire, and deploy the frontend project.

What it does

  • Infers required Wix capabilities based on user intent and project context.
  • Installs necessary Wix apps and seeds backend content automatically.
  • Generates a custom SDK integration guide for calling Wix services from the frontend.
  • Scaffolds or connects existing frontend projects to Wix for managed hosting.
  • Handles project-type-specific authentication and deployment workflows.
  • Provides a mechanism to relay feedback to Wix regarding the headless experience.

When to use it

  • When you need to integrate Wix business services into a custom-built headless frontend.
  • When you want to automate the setup and content seeding of a Wix backend.
  • When you are building a new site on Wix infrastructure and need a scaffolded frontend.
  • When you have an existing frontend design and need to wire it to Wix business capabilities.
  • When working with Stripe Projects and requiring a Wix backend configuration.

Advantages

  • Reduces manual configuration by automating app installation and content seeding.
  • Provides a clear, actionable SDK integration guide tailored to your specific capabilities.
  • Supports multiple project architectures including managed, self-managed, and Stripe-based setups.
  • Ensures consistent backend setup by following verified inline recipes.
  • Simplifies the transition from design to a functional, Wix-powered headless site.

Usage examples

“Set up a Wix Headless backend for a store with products and a blog.”
The skill will install the Stores and Blog apps, seed sample products and posts, and provide an SDK guide for fetching this data in your frontend.
“I have an existing design; connect it to Wix and host it on their managed infrastructure.”
The skill will initialize the project, wire the existing UI to the necessary Wix business services, and prepare it for release on Wix.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/wix/wix-headless/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip wix-headless.zip -d .agents/skills

Documentation by Wix

Wix Headless

This skill connects Wix business services to a Wix Headless frontend. Its core job is to configure the Wix backend: infer the needed capabilities, install the Wix apps, seed the backend content, and produce an SDK-integration guide describing how to call Wix from the frontend.

What happens with the frontend depends on the project type and operation:

  • Backend-only (self-managed, stripe, or a managed "just set up the backend" run) — the skill emits the SDK guide as its final output; the host owns the frontend, build, and hosting.

  • Managed create / connect — the skill also owns the frontend: it scaffolds a new project (create) or attaches Wix to an existing one (connect), wires it to the backend using that same guide, builds, and releases to Wix. (There is no Designer or template library — the frontend is built ad-hoc to intent.)

On a backend-only run the skill does not own the project scaffolding. When the work needs a frontend, scaffold it according to user intent — framework and structure follow the prompt; the skill's job is the Wix backend plus the emitted SDK guide describing how to call Wix from whatever frontend exists, not choosing or generating the app. This is the norm for a stripe run: the project is provisioned via Stripe Projects (credentials land in .env — see stripe/AUTHENTICATION.md), the skill configures the backend and emits the guide, and the live site is finalized per stripe/DEPLOYMENT.md — while the frontend is scaffolded and wired to intent, by the host.

Project types

The skill behaves identically across project types except for authentication and deployment, which are isolated in a per-type folder under references/:

Project typeHostingAuthentication & deployment live in
managedWix infrastructure (maintained by Wix)references/managed/
self-managedthe user's own host (TBD)references/self-managed/
stripethe user's own host, provisioned via Stripe Projectsreferences/stripe/

Everything else — Discovery, Setup, Seed, the SDK handoff — is project-type-agnostic and refers to "the provided authentication mechanism" rather than any specific method.

Resolving the project type

Resolve the type before Discovery, in this order — stop at the first that decides:

  1. Caller-provided. If the host/caller passed a project type (managed | self-managed | stripe), use it. An explicit value always wins.

  2. Detect from project signals (on disk). Check the working directory (read-only):

    • stripe — .env carries WIX_WIX_CLIENT_ID / WIX_WIX_CLIENT_SECRET / WIX_WIX_METASITE_ID (or the plain WIX_* fallback). This is the Stripe-Projects fingerprint.

    • managed — a Wix CLI project: wix.config.json present, or a .wix/ directory, or @wix/cli / @wix/astro in package.json.

    • self-managed — a frontend project on disk (e.g. package.json with a bundler/framework) with neither the Stripe .env fingerprint nor the Wix-CLI markers above.

  3. Detect from user intent. If disk is inconclusive, read the prompt:

    • managed — "managed", "host on Wix", "Wix-hosted", "deploy to Wix", "wix release".

    • stripe — "stripe projects", "I added Wix via Stripe", a Stripe-Projects context.

    • self-managed — "self-hosted", "my own host", names a non-Wix host, "I'll deploy it myself".

  4. Ask. If signals are absent or conflict, ask the user which type applies — don't guess.

Hold the resolved type in scratch; it selects <TYPE_DIR> (see Path resolution). Note self-managed is TBD — once resolved to it, the auth step will stop with a clear "not wired yet" error.

Resolving the operation (managed only)

create/connect/iterate are managed-only. For managed, resolve the operation by intent first, directory second — never let an empty directory override what the user is asking for. Check iterate first (it's decided by an unambiguous on-disk signal):

  • iterate → references/managed/CONNECT.md. The project is already connected to Wix — a wix.config.json (or .wix/) is already present — and the owner wants to add or change capabilities. Same flow as connect, but §1 skips init and reuses the existing wix.config.json; never re-init an already-connected project.

  • connect → references/managed/CONNECT.md. The user brings a design not yet connected to Wix and wants it wired: a frontend project on disk without a wix.config.json, or a brought-in/fetched design (a .zip/folder/file you unzip or read, a design-file URL, a Claude-Design/v0/Lovable export), or language like "connect this / implement this design (… connecting to Wix) / host this on Wix / deploy this to Wix / add Wix Headless to this project". A brought-in or fetched design is connect even when the current directory is empty — the design arrives from elsewhere (zip/fetch/URL), so emptiness at trigger time is not a create signal. (CONNECT.md step 1 places the brought design into CWD, then inits it.)

  • create → references/managed/CREATE.md. The user wants a new site built from a prompt with nothing brought in — "build me a site / store / blog…", no design file, no project on disk.

  • backend-only — the user only wants the backend configured (no frontend work). → the shared spine + emit the SDK handoff.

For self-managed and stripe, the operation is always backend-only (the host owns the frontend). Only when there is genuinely no brought-in design and no connect language does directory emptiness decide: empty → create; an existing frontend on disk → connect.

Preconditions (the host provides these — we read, never create)

  1. The project type — managed | self-managed | stripe — provided by the caller, else detected from project signals / user intent (see Project types § "Resolving the project type"), else asked. It selects <TYPE_DIR> (see Path resolution).

  2. A Wix metasite + a headless OAuth app exist, and credentials are available — obtained via the project type's AUTHENTICATION.md. The skill needs a bearer token authorized for the metasite and the metasite id.

  3. The user intent — free text describing what Wix should power ("add a store", "blog + contact form", "persist my app's data").

  4. (Optional) the project on disk — read-only, to sharpen brand/capability inference.

If the credentials are absent, the Wix backend isn't reachable — stop with a clear error.

What this skill does

Always open DISCOVERY.md first (it's agnostic — capability/brand/intent inference + the imagery gate, no auth). Then route by project type + operation:

Backend-only (self-managed, stripe, or managed backend-only) — the lean spine:

  1. Discovery (references/DISCOVERY.md) — infer capabilities + brand + intent + imagery.

  2. Setup (references/SETUP.md) — install the Wix apps those capabilities need.

  3. Seed (references/SEED.md) — create the backend content (+ entity images if imagery is on).

  4. Handoff (references/SDK_HANDOFF.md) — after Setup and Seed, emit the integration guide: SDK bootstrap, per-capability call shapes, the seeded IDs, and the @wix/* package list.

  5. Finalize deployment (<TYPE_DIR>/DEPLOYMENT.md) — run the project-type's finalize steps.

Throughout any run — if the user asks to send feedback to Wix, complains/gets frustrated, or the run hits any real friction (a confusing error, a doc gap, a tooling dead end, a workaround you had to invent — it doesn't need to repeat), offer to relay it to Wix per references/FEEDBACK.md. Default to offering rather than waiting to be asked. Every flow's finalize step (<TYPE_DIR>/DEPLOYMENT.md / managed/CREATE.md / managed/CONNECT.md) ends with the same checkpoint — treat it as a required self-check, not optional. Send only after an explicit yes — never automatically.

Managed create / connect / iterate — after Discovery, hand the whole run to the managed flow:

  • create → references/managed/CREATE.md (scaffold → Setup → Seed → build the frontend → release).

  • connect → references/managed/CONNECT.md (init → Setup → Seed → wire the existing UI → release).

  • iterate → references/managed/CONNECT.md — the project is already connected, so it reuses the existing wix.config.json (no init). Setup / Seed / wiring are incremental: it may already be set up and seeded from a prior run, so the agent checks current state first (installed apps, already-seeded content, existing wiring) and applies only the delta the new intent needs — never blindly re-installing or re-seeding. Re-release only if the frontend build output changed. These reuse the same SETUP.md/SEED.md/SDK_HANDOFF.md, but apply the SDK guide to build/wire the frontend themselves rather than emitting it, and release via managed/DEPLOYMENT.md.

Each Wix call uses the universal call shape (SETUP.md §1) with $TOKEN/$SITE_ID obtained per <TYPE_DIR>/AUTHENTICATION.md. The skill runs non-interactively except for the one imagery question (and asking the project type if it can't be resolved).

Don't smoke-test the frontend locally unless the user asks to verify. The deliverable is the built-and-released site (managed) or the SDK guide (backend-only) — not a local test report. By default do not start a dev server (wix dev / astro dev / npm run dev) to curl pages, drive the cart / booking / login flow, or launch a headless browser: correctness comes from following the recipes, real errors surface at wix build / wix release, and a headless run can't complete an interactive login or a real payment anyway — so these loops routinely burn minutes of wall for little signal (this is distinct from, and in addition to, the "release once at the very end" rule — that one only bans extra build+release cycles, not dev-server testing). Only spin up a dev server and smoke-test when the user's prompt explicitly asks to verify / test / confirm it works — and then keep it to a single lightweight pass (pages compile and render), not a full purchase/booking/login drive. The one post-release check in <TYPE_DIR>/DEPLOYMENT.md is the sanctioned verification.

Donations exception to the smoke-test policy above: for a build that accepts donations, follow the bounded anonymous API handoff check in references/inline-recipes/how-to-code-donations.md before claiming it works. It does not authorize a payment or campaign mutation, and does not require a dev-server testing loop. That recipe also defines the separate hosted-checkout and payment checks.

Path resolution

Compute <SKILL_ROOT> from this file (<SKILL_ROOT>/SKILL.md — strip /SKILL.md); hold the absolute path in scratch. Then resolve the project type to its folder and hold it too:

<TYPE_DIR> = <SKILL_ROOT>/references/<projectType>/ — one of managed/, self-managed/, stripe/.

WhatPath
Vertical index (intent matching + per-vertical site spec)<SKILL_ROOT>/references/CAPABILITIES.md
Discovery (infer capabilities + brand + intent; existing site → the Dynamic Context call in §1)<SKILL_ROOT>/references/DISCOVERY.md
Setup (install apps)<SKILL_ROOT>/references/SETUP.md
Seed (create backend content)<SKILL_ROOT>/references/SEED.md
SDK-integration handoff (emitted, or applied by create/connect)<SKILL_ROOT>/references/SDK_HANDOFF.md
Image generation (opt-in; agnostic)<SKILL_ROOT>/references/IMAGE_GENERATION.md
Design — fallback visual quality bar for the built frontend, when the user gave no design direction of their own (managed create only)<SKILL_ROOT>/references/DESIGN.md
Content — fallback copy quality bar for the built frontend, when the user gave no copy/voice direction of their own (managed create only)<SKILL_ROOT>/references/CONTENT.md
Experience overlays — a vertical's own design + copy bar on top of DESIGN/CONTENT (optional per vertical; read when that vertical is loaded)<SKILL_ROOT>/references/inline-recipes/experience-<vertical>.md (today: experience-store.md, experience-donations.md)
AI features — text/chat + embeddings (opt-in; agnostic)<SKILL_ROOT>/references/AI_FEATURES.md
Feedback — relay the user's headless-experience feedback to Wix (opt-in; user-approved)<SKILL_ROOT>/references/FEEDBACK.md
Authentication — obtain $TOKEN/$SITE_ID/clientId (project-type-specific)<TYPE_DIR>/AUTHENTICATION.md
Deployment — finalize the live site (project-type-specific)<TYPE_DIR>/DEPLOYMENT.md
Managed create flow (scaffold a new project)<SKILL_ROOT>/references/managed/CREATE.md
Managed connect flow (wire an existing project)<SKILL_ROOT>/references/managed/CONNECT.md
Frontend-axis references (how a frontend wires to Wix)<SKILL_ROOT>/references/astro.md, non-astro.md

Start a run by opening DISCOVERY.md. The flow files (CAPABILITIES, DISCOVERY, SETUP, SEED, SDK_HANDOFF, IMAGE_GENERATION, AI_FEATURES) are project-type-agnostic; the per-type specifics live under <TYPE_DIR>/ (AUTHENTICATION.md, DEPLOYMENT.md, and — managed only — CREATE.md/CONNECT.md).

Where the how comes from

This skill has no skill upstream — the how is read from the live Wix docs at dev.wix.com/docs. Read-priority: a page this skill links is read by curl-ing its .md twin directly (first priority — don't re-discover a curated link with search); the Wix MCP doc/search tools are second priority, for finding pages the skill doesn't link or as a fallback if a fetch fails. (Append .md to any docs URL for raw markdown; menu pages list child links, content pages carry the schema.)

Doc discovery is the shared fallback for both tracks — never the first move. Each track's primary source is its pinned material (below); when that doesn't cover what you need, fall back to references/DOC_DISCOVERY.md — a semantic doc-search + schema lookup that works with or without the Wix MCP.

  • Seed reads each capability's create flow from its inline recipe — a self-contained local inline-recipes/setup-*.md (mapped per capability in SEED.md § "What to seed per capability") that inlines the calls and supersedes the REST doc pages, so read it and seed from it alone. Only a capability with no inline recipe (e.g. coupons) falls back to doc discovery (DOC_DISCOVERY.md).

  • Handoff links the SDK docs for each capability's API shape, and supplies the runtime package set from the inlined map in SDK_HANDOFF.md (the SDK .md pages don't expose @wix/* import strings to navigation, so packages are mapped, not navigated).

Setup carries its app-install call (and the appDefId constants) inline in SETUP.md; CAPABILITIES.md is the vertical index that lets Discovery match intent and declares, per built vertical, the Required site features + Implementation checklist that Seed enables (backend-backed features) and the Handoff carries into the guide (so the host builds a complete site, not a bare data dump). This skill carries the what (which capabilities, how much content, what a finished site includes) and reads the how off the docs.

Files

references/inline-recipes/setup-pricing-plans.md


name: "Setup Pricing Plans" description: Initializes a Wix Pricing Plans backend with Plans V3 — creates recurring / one-time / free membership plans (billing cycle + flat-rate price), then (only when bookings is also in the run) attaches bookings services to a plan through the Benefit Programs API so a member's plan covers those services. Specifies the how (calls + format); counts and the specific plans/prices/cycles come from the request.

RECIPE: Business Recipe – Initial Setup for Wix Pricing Plans (Plans V3) + Bookings membership integration

Standard call shape (every curl below). The <AUTH> placeholder is shorthand for Authorization: Bearer <TOKEN> only. Body-bearing requests also need Content-Type: application/json.

A concise checklist for turning a freshly provisioned Wix site with the Wix Pricing Plans app installed into a set of purchasable membership plans — and, when the site also has Wix Bookings, for wiring those plans to cover bookable services so members can book with their membership. Notice that this recipe is NOT meant for coding purposes and is ONLY meant for initial Pricing Plans backend setup. (The frontend read/subscribe/book-with-plan contract is the sibling recipe how-to-code-pricing-plans.md.)

This recipe is the how, not the what. What to seed — how many plans, their names, prices, and billing cycles, and which bookings services a plan covers — is determined by the request you're fulfilling. This recipe only specifies the calls and the request format; it does not decide quantities, prices, or which plans to create.

API surfaces: plans use Plans V3 on the public host https://www.wixapis.com/pricing-plans/v3/.... The bookings integration uses the Benefit Programs V1 API (https://www.wixapis.com/benefit-programs/v1/...) — a separate API from Pricing Plans. Both APIs' method-article headers may show an internal …/_api/… form — do not use that; call the public non-/_api/ form shown below. Relevant app def ids (constants the integration needs): Wix Bookings = 13d21c63-b5ec-5912-8397-c3a5ddb27a97, Wix Pricing Plans = 1522827f-c56c-a5c9-2ac9-00f9e6ae12d3.


Article: Steps for Setting Up Wix Pricing Plans

YOU MUST complete the following steps in order without skipping any and without requiring additional user input.

There is no clean-up step — a fresh Wix Pricing Plans install ships no sample plans, so there is nothing to delete first.

⚠️ CRITICAL ORDER REQUIREMENT (integration only): STEP 2 attaches bookings service ids to a plan. Those service ids come from the Bookings seed (setup-bookings.md → seeded.bookings.serviceIds[]). So when a run has both pricing-plans and bookings, seed the bookings services first, then create the plans (STEP 1), then attach (STEP 2). STEP 2 is skipped entirely when bookings is not in the run — a plans-only site stops after STEP 1.

STEP 1: Create the plan(s)

Create one plan per create call (Plans V3 has no bulk-create for plans) against POST https://www.wixapis.com/pricing-plans/v3/plans. How many plans, their names, prices, and billing cycles come from the request you're fulfilling — this step only gives the call and the required format.

⚠️ The create body MUST include plan.status: "ACTIVE" and a valid, unique GUID id on every pricingVariants[] and every perks[] entry — omitting any of them returns 400 (status value is required / id is not a valid GUID / id must not be empty). These ids are client-supplied (a confirmed won't-fix server-side gap: the Pricing-Plans team will not auto-generate them; only the plan's own top-level id comes back server-generated).

⚠️ Generate every GUID in the SHELL — never let the model type one. A model emitting a UUID token-by-token isn't reliably valid or unique (→ 400, or a duplicate-id collision across plans). Generate each in the shell and inject it via command substitution, so the value is always a real, fresh GUID regardless of which coding agent or OS runs this. This portable helper tries uuidgen → python3 → node; at least one is present in virtually every shell (a scaffolded Wix project always has node), so it effectively always succeeds — the fallback below covers the rare shell with none:

gen_uuid() { uuidgen 2>/dev/null | tr 'A-Z' 'a-z' \
  || python3 -c 'import uuid; print(uuid.uuid4())' 2>/dev/null \
  || node -e 'console.log(require("crypto").randomUUID())'; }

Then create each plan with fresh ids (one gen_uuid call per field — never reuse a value across plans or perks). Body shown is a recurring monthly plan at a flat $20/month (the common membership case):

VID=$(gen_uuid); PERK1=$(gen_uuid); PERK2=$(gen_uuid)
curl -sS -w "\nHTTP:%{http_code}" -X POST 'https://www.wixapis.com/pricing-plans/v3/plans' \
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
  -d "{
    \"plan\": {
      \"name\": \"Studio Membership\",
      \"description\": \"Unlimited access to group classes.\",
      \"status\": \"ACTIVE\",
      \"visibility\": \"PUBLIC\",
      \"buyable\": true,
      \"buyerCanCancel\": true,
      \"pricingVariants\": [
        { \"id\": \"$VID\", \"name\": \"Monthly\",
          \"billingTerms\": { \"billingCycle\": { \"period\": \"MONTH\", \"count\": 1 }, \"startType\": \"ON_PURCHASE\", \"endType\": \"UNTIL_CANCELLED\" },
          \"pricingStrategies\": [ { \"flatRate\": { \"amount\": \"20.00\" } } ] }
      ],
      \"perks\": [ { \"id\": \"$PERK1\", \"description\": \"Unlimited group classes\" }, { \"id\": \"$PERK2\", \"description\": \"10% off workshops\" } ]
    }
  }"

Fallback — only if the shell has NO generator (uuidgen, python3, and node all absent — effectively never in a Wix project): do not guess UUIDs. Skip plan creation and record a clear note for the user listing the plans to create by hand in the Wix dashboard (name, price, billing cycle). Failing loud beats seeding malformed plans.

⚠️ CRITICAL FORMAT REQUIREMENTS:

  • Pricing lives under pricingVariants[], NOT a top-level price. Each variant carries billingTerms (the cycle) + pricingStrategies (the amount). Send one pricingVariant with one pricingStrategy — the schema nominally allows up to 20 variants but documents "currently limited to 1", so one is the norm.

  • All amounts and money-ish values are decimal STRINGS, not numbers: flatRate.amount = "20.00" (≥ "0", ≤ 4 decimals). A number is rejected.

  • billingTerms selects the plan type (the request decides which):

    • Recurring (subscription): billingCycle: { "period": "DAY|WEEK|MONTH|YEAR", "count": 1 }, startType: "ON_PURCHASE", endType: "UNTIL_CANCELLED". Default to MONTH/1 unless the request names another cycle.

    • One-time (bill once, then ends): endType: "CYCLES_COMPLETED" + cyclesCompletedDetails: { "billingCycleCount": 1 }. A one-time plan with no end date instead sets "billingCycle": null + endType: "UNTIL_CANCELLED".

    • Free: pricingStrategies: [ { "flatRate": { "amount": "0" } } ]; cap reuse with "purchaseLimits": { "type": "PER_MEMBER_LIFETIME", "count": 1 } (the older maxPurchasesPerBuyer: 1 is deprecated — removal targeted 2026-11-30 — prefer purchaseLimits).

  • Currency is NOT set in the request — it's read-only in the response and derived from the site's business currency (like Bookings prices). Don't send a currency; don't fight the one that comes back.

  • visibility: "PUBLIC" + buyable: true make the plan appear on the public grid and be orderable. A PRIVATE/buyable:false plan is assign-only (only seed one if the request explicitly wants a hidden/manual plan).

  • name is required, 1–50 chars. perks[] are display-only ({ description }, ≤ 1400 chars each) — they are the bullet list shown on the plan card and have no functional effect. The actual bookings coverage is wired in STEP 2, not through perks.

  • plan.status: "ACTIVE" is REQUIRED — omitting it returns 400 status value is required (undocumented but enforced; ACTIVE is the only value).

  • pricingVariants[].id and perks[].id are REQUIRED, client-supplied GUIDs — generate each in the shell (the gen_uuid helper above), never model-typed (→ malformed/duplicate → 400), fresh per field. Only the plan's own top-level id is server-generated; it echoes the variant/perk ids you sent back in the response.

  • On partial failure across multiple plans, retry the failed plan(s) once with the same format — do not loop.

⚠️ Reading the response — the created plan is under plan, keep plan.id. A successful create returns 200 with:

{ "plan": {
  "id": "<planId>",
  "revision": "1",
  "name": "Studio Membership",
  "visibility": "PUBLIC",
  "buyable": true,
  "currency": "USD",
  "pricingVariants": [ { "id": "<variantId>", "name": "Monthly", "billingTerms": { … }, "pricingStrategies": [ … ] } ],
  "perks": [ { "id": "<perkId>", "description": "Unlimited group classes" } ]
} }

Keep each plan's plan.id into seeded.pricing-plans.planIds[] — it's the id the frontend orders by, and the externalId the STEP 2 integration keys on.


STEP 2: Attach bookings services to a plan (integration — SKIP when there is no bookings in the run)

This is the pricing-plans ↔ bookings membership link: making a plan cover one or more bookable services so a member who holds the plan can book those services with their membership (frontend flow lives in how-to-code-pricing-plans.md). The link is NOT a field on the plan and NOT a perk — it goes through the separate Benefit Programs API, in three ordered sub-steps. Do this per plan that should cover services, using the plan's plan.id from STEP 1 and the bookings service ids from setup-bookings.md's seeded.bookings.serviceIds[].

⚠️ CRITICAL: the three sub-steps are strictly ordered — each consumes an id from the previous: plan.id → programDefinition.id → itemSetId → items. Don't parallelize them.

STEP 2a: Get the plan's program definition (READ — do not create it)

When a plan is created, the Pricing Plans app automatically creates a matching "program definition" in Benefit Programs. You read it (you never create it) by the plan id + namespace:

curl -X GET 'https://www.wixapis.com/benefit-programs/v1/program-definitions/by-namespace-and-external-id?externalId=<PLAN_ID>&namespace=@wix/pricing-plans' \
  -H 'Authorization: <AUTH>'

Response — keep programDefinition.id (this is the "programDefinitionId" STEP 2b needs):

{ "programDefinition": {
  "id": "<programDefinitionId>",
  "namespace": "@wix/pricing-plans",
  "externalId": "<PLAN_ID>",
  "displayName": "…"
} }
  • ⚠️ namespace is literally @wix/pricing-plans (with the @ and the slash) in every sub-step 2a–2c. The generic Benefit Programs docs use placeholder namespaces (gym_rewards, benefit_programs_app) — do not use those.

  • Provisioning is effectively immediate. The program definition is created by the Plans app within ~1s of STEP 1. It's still created asynchronously, so if this GET returns 404/empty right after creating the plan, retry once after a short backoff as insurance — do not loop.

STEP 2b: Create the pool definition (one per integrating app)

Create one pool definition holding exactly one benefit that names the Bookings app as the provider:

curl -X POST 'https://www.wixapis.com/benefit-programs/v1/pool-definitions' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "poolDefinition": {
      "namespace": "@wix/pricing-plans",
      "displayName": "Bookings benefit",
      "programDefinitionIds": ["<programDefinitionId FROM 2a>"],
      "details": {
        "benefits": [
          {
            "benefitKey": "<RANDOM_UUID>",
            "displayName": "Bookings sessions",
            "providerAppId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
            "price": "0"
          }
        ]
      }
    },
    "cascade": "IMMEDIATELY"
  }'

Response — keep the generated itemSetId for the benefit (matched by its benefitKey):

{ "poolDefinition": {
  "id": "<poolDefinitionId>",
  "programDefinitionIds": ["<programDefinitionId>"],
  "namespace": "@wix/pricing-plans",
  "details": { "benefits": [
    { "benefitKey": "<RANDOM_UUID>", "itemSetId": "<itemSetId>", "providerAppId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97", "price": "0" }
  ] }
} }
  • benefitKey is a freshly generated random UUID you supply (any v4 UUID).

  • providerAppId is the Bookings app def id 13d21c63-b5ec-5912-8397-c3a5ddb27a97 (the same GUID used as the bookings app id in the cart/frontend recipes). It is not the Pricing Plans id.

  • price is credit-model, not money: "0" = unlimited sessions covered (leave creditConfiguration empty — the "unlimited membership" case, the default here); "1" = limited credits, which then requires a details.creditConfiguration (e.g. { "amount": "10" } for a 10-session pack). Default to "0" (unlimited) unless the request names a session count.

  • ⚠️ Limited-credit plan (price:"1"): creditConfiguration goes at details.creditConfiguration — a SIBLING of benefits[], NOT a field inside a benefit. Nesting it inside the benefit makes the server treat the credit pool as "not set up" and reject the non-zero price with 400 "Price should be 0 when credit pool is not set up". The correct details shape for a limited pack (e.g. an 8-class pass):

    "details": {
      "creditConfiguration": { "amount": "8" },
      "benefits": [
        { "benefitKey": "<RANDOM_UUID>", "displayName": "Bookings sessions",
          "providerAppId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97", "price": "1" }
      ]
    }

    (The unlimited case above keeps price:"0" and no creditConfiguration.)

  • One pool definition per integrating app — for a plan covering bookings, that's exactly one pool with one benefit. Don't create a second pool for the same app on the same plan.

  • itemSetId path is poolDefinition.details.benefits[i].itemSetId — pick the entry whose benefitKey matches the one you sent.

STEP 2c: Bulk-create the benefit items (one per covered service)

Attach the actual bookings services to the benefit — one item per service — via bulk create:

curl -X POST 'https://www.wixapis.com/benefit-programs/v1/bulk/items/create' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "namespace": "@wix/pricing-plans",
        "category": "",
        "providerAppId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
        "itemSetId": "<itemSetId FROM 2b>",
        "externalId": "<BOOKINGS_SERVICE_ID>"
      }
    ],
    "returnEntity": true
  }'

Response — standard bulk shape; each covered service lands under results[].itemMetadata (and results[].item because returnEntity: true):

{ "results": [
  { "itemMetadata": { "id": "<benefitItemId>", "originalIndex": 0, "success": true },
    "item": { "id": "<benefitItemId>", "externalId": "<BOOKINGS_SERVICE_ID>", "itemSetId": "<itemSetId>" } }
], "bulkActionMetadata": { "totalSuccesses": 1, "totalFailures": 0 } }
  • externalId is the bookings SERVICE id (item.id from setup-bookings.md STEP 3) — one item per service the plan should cover. Up to 100 items per call.

  • category is an empty string "", and namespace/providerAppId repeat the STEP-2b values on every item.

  • The public path is POST …/benefit-programs/v1/bulk/items/create. Some docs examples show a bare …/bulk/items; ignore that and use the /bulk/items/create form shown here.

  • Check results[].itemMetadata.success per item (false populates .error); retry only the failed items once with the same format.

Keep the linkage in the seed map so the coding handoff can reason about coverage: seeded.pricing-plans.bookingsCoverage = { <planId>: { itemSetId, serviceIds: [ … ] } }.


Conclusion

Following these steps in order sets up a Plans V3 Wix Pricing Plans site (and, when bookings is present, the membership integration):

  • Each plan is created visibility: PUBLIC + buyable: true with pricing under pricingVariants[].billingTerms + pricingStrategies[].flatRate.amount (decimal strings), the cycle (MONTH/1 by default) and type (recurring / one-time / free) chosen from the request; currency is site-derived, perks are display-only.

  • Bookings coverage is wired through the Benefit Programs API, not the plan object: read the auto-created program definition (programDefinition.id) → create one pool definition with one benefit whose providerAppId is the Bookings app id (price:"0" = unlimited) → bulk-create items whose externalId is each covered bookings service id. This is skipped when bookings isn't in the run.

  • IDs kept for the coding handoff: planIds[], and (integration) per plan { itemSetId, covered serviceIds[] }.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Wix
Publisher
Wix (Official)
Source
wix/skills · skills/wix-headless · commit d168bc2
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Wix.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download wix-headless.zip