{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/checkoutpage-com/json-schema/checkoutpage-com-update-product-request-schema.json",
  "title": "UpdateProductRequest",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/checkoutpage-com-openapi.yml#/components/schemas/UpdateProductRequest",
  "properties": {
    "callToActionText": {
      "description": "Accept copy on the order bump card, e.g. \"Yes! Add gift wrapping\". Send null to clear. Order bump products only.",
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ]
    },
    "calloutIcon": {
      "description": "Icon leading the call out box. Send null to clear. Order bump products only.",
      "enum": [
        "star",
        "sparkles",
        "fire",
        "bolt",
        "rocket",
        "trophy",
        "check",
        "x-mark",
        "plus",
        "arrow-right",
        "check-badge",
        "check-circle",
        "shield-check",
        "thumbs-up",
        "heart",
        "smile",
        "light-bulb",
        "sun",
        "moon",
        "gift",
        "tag",
        "percent",
        "dollar",
        "banknotes",
        "credit-card",
        "shopping-bag",
        "shopping-cart",
        "truck",
        "clock",
        "calendar",
        "bell",
        "megaphone",
        "trending-up",
        "chart",
        "refresh",
        "lock",
        "key",
        "ticket",
        "users",
        "academic-cap",
        "book",
        "music",
        "video",
        "document",
        "download",
        "mobile",
        "camera",
        "paint-brush",
        "puzzle",
        "cube",
        "globe",
        "map-pin",
        "storefront",
        "tools",
        "beaker",
        "lifebuoy",
        "chat",
        "envelope",
        "phone",
        "cake",
        "scale",
        "eye",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "calloutText": {
      "description": "Call out box under the description on the order bump card. HTML: links and inline emphasis are kept, anything else is removed. Send null to clear. Order bump products only.",
      "maxLength": 2000,
      "type": [
        "string",
        "null"
      ]
    },
    "defaultPriceId": {
      "description": "Id of the default price.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "discounts": {
      "description": "Bulk discounts applied when a customer purchases a minimum quantity. Two modes are supported:\n\n**`checkout_quantity`** — discount applies based on the total checkout quantity, regardless of which variant options are selected.\n\n**`variant_option_quantity`** — discount applies only when specific variant options meet the quantity threshold. To use this mode you must link the discount to variant options using temporary `key` values: assign a `key` to each relevant option in `variants[].options[].key`, then reference those same keys in `variantOptionIds[].key` within the same request. These keys are resolved to MongoDB ObjectIds at save time and are not present in the response — so the linking must be established in the same request that defines (or redefines) the variants. You cannot attach a `variant_option_quantity` discount to an existing product's variant options without also re-supplying the `variants` array with keys in the same PATCH request.\n\n[Learn more](https://checkoutpage.com/docs/articles/bulk-discounts)",
      "items": {
        "properties": {
          "amountOff": {
            "description": "Fixed amount discount in cents. Cannot be used with `percentOff`.",
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "maxQuantity": {
            "description": "Maximum quantity for this discount tier. Leave empty for no upper limit.",
            "minimum": 1,
            "type": [
              "number",
              "null"
            ]
          },
          "minQuantity": {
            "description": "Minimum quantity required for this discount to apply.",
            "minimum": 1,
            "type": [
              "number",
              "null"
            ]
          },
          "percentOff": {
            "description": "Percentage discount to apply. Cannot be used with `amountOff`.",
            "maximum": 100,
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "quantityCondition": {
            "description": "Whether the discount applies based on the checkout quantity or specific variant option quantities. Defaults to `checkout_quantity`.",
            "enum": [
              "checkout_quantity",
              "variant_option_quantity"
            ],
            "type": "string"
          },
          "variantOptionIds": {
            "description": "Variant options this discount applies to. Each entry must reference a variant option by the `key` you assigned to it in `variants[].options[].key` within the same request. Option keys are temporary caller-defined handles — they are resolved to MongoDB ObjectIds at save time and do not appear in the response. Only used when `quantityCondition` is `variant_option_quantity`.",
            "items": {
              "properties": {
                "key": {
                  "type": "string"
                }
              },
              "required": [
                "key"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "quantityCondition"
        ],
        "type": "object"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "enableFileAccessForInactiveSubscriptions": {
      "description": "Allow customers with inactive subscriptions to keep accessing file downloads.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "features": {
      "description": "Short list of what the customer gets, shown above the description on the order bump card. Replaces the whole list; send [] or null to clear. Order bump products only.",
      "items": {
        "properties": {
          "icon": {
            "description": "Icon leading the line. Unset, the line leads with a check; `none` draws no icon.",
            "enum": [
              "star",
              "sparkles",
              "fire",
              "bolt",
              "rocket",
              "trophy",
              "check",
              "x-mark",
              "plus",
              "arrow-right",
              "check-badge",
              "check-circle",
              "shield-check",
              "thumbs-up",
              "heart",
              "smile",
              "light-bulb",
              "sun",
              "moon",
              "gift",
              "tag",
              "percent",
              "dollar",
              "banknotes",
              "credit-card",
              "shopping-bag",
              "shopping-cart",
              "truck",
              "clock",
              "calendar",
              "bell",
              "megaphone",
              "trending-up",
              "chart",
              "refresh",
              "lock",
              "key",
              "ticket",
              "users",
              "academic-cap",
              "book",
              "music",
              "video",
              "document",
              "download",
              "mobile",
              "camera",
              "paint-brush",
              "puzzle",
              "cube",
              "globe",
              "map-pin",
              "storefront",
              "tools",
              "beaker",
              "lifebuoy",
              "chat",
              "envelope",
              "phone",
              "cake",
              "scale",
              "eye",
              "none",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "text": {
            "description": "One line of the list.",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "maxItems": 10,
      "type": [
        "array",
        "null"
      ]
    },
    "fileIds": {
      "description": "Files for the product. Available to the customer after purchase.",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/UniqueIdentifier"
          },
          {
            "description": "Unique identifier. Must be in BSON ObjectId format."
          }
        ]
      },
      "type": [
        "array",
        "null"
      ]
    },
    "fixedTaxRateIds": {
      "description": "List of Tax Rate IDs applied to this product. When tax.mode is \"fixed\" and this is omitted on create, the seller default rate is applied.",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/UniqueIdentifier"
          },
          {
            "description": "Unique identifier. Must be in BSON ObjectId format."
          }
        ]
      },
      "maxItems": 1,
      "type": [
        "array",
        "null"
      ]
    },
    "generateLicenseKeys": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "hasUnlimitedStock": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "headingText": {
      "description": "Heading shown above the order bump card, e.g. \"Special one time offer\". Send null to clear. Order bump products only.",
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ]
    },
    "imageIds": {
      "description": "Images for the product. Provide a list of image file IDs. Use the `/files/upload` API to add images.",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/UniqueIdentifier"
          },
          {
            "description": "Unique identifier. Must be in BSON ObjectId format."
          }
        ]
      },
      "type": [
        "array",
        "null"
      ]
    },
    "limitPayments": {
      "description": "Duplicate-payment prevention settings for this product. Applies to one-time payments only.",
      "properties": {
        "enabled": {
          "description": "Prevent a customer who has already paid for this product from paying again. One-time payments only. Defaults to `false`.",
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "limitSubscriptions": {
      "description": "Configuration to limit the number of active subscriptions for this product. Used to cap subscriptions to a specific number.",
      "properties": {
        "enabled": {
          "description": "Enable subscription limits. Defaults to `false`.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "limitSubscriptionsStripe": {
          "description": "Stripe-specific subscription limit configuration.",
          "properties": {
            "enabled": {
              "description": "Enable Stripe-level subscription limits (checks active subscriptions in Stripe). Defaults to `false`.",
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "price": {
      "properties": {
        "amount": {
          "description": "Price in smallest currency unit (cents). Defaults to `0`.",
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "badge": {
          "description": "Optional short label shown over the price card (e.g. \"Save $50\", \"Most popular\").",
          "type": [
            "string",
            "null"
          ]
        },
        "badgeIcon": {
          "description": "Optional icon shown before the badge text. `null` removes it.",
          "enum": [
            "star",
            "sparkles",
            "fire",
            "bolt",
            "rocket",
            "trophy",
            "check",
            "x-mark",
            "plus",
            "arrow-right",
            "check-badge",
            "check-circle",
            "shield-check",
            "thumbs-up",
            "heart",
            "smile",
            "light-bulb",
            "sun",
            "moon",
            "gift",
            "tag",
            "percent",
            "dollar",
            "banknotes",
            "credit-card",
            "shopping-bag",
            "shopping-cart",
            "truck",
            "clock",
            "calendar",
            "bell",
            "megaphone",
            "trending-up",
            "chart",
            "refresh",
            "lock",
            "key",
            "ticket",
            "users",
            "academic-cap",
            "book",
            "music",
            "video",
            "document",
            "download",
            "mobile",
            "camera",
            "paint-brush",
            "puzzle",
            "cube",
            "globe",
            "map-pin",
            "storefront",
            "tools",
            "beaker",
            "lifebuoy",
            "chat",
            "envelope",
            "phone",
            "cake",
            "scale",
            "eye",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "billingType": {
          "description": "Billing type. Derived when omitted: `recurring`/`paymentPlan` present → recurring, else one_time. Part of the pricing-type identity fixed at creation — cannot change on an existing price.",
          "enum": [
            "one_time",
            "recurring",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "description": "Currency code (lowercase). Defaults to `usd`.",
          "maxLength": 3,
          "minLength": 3,
          "type": [
            "string",
            "null"
          ]
        },
        "discountedFromPrice": {
          "description": "The original price of the product in the smallest currency unit (cents).",
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "enabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "hidden": {
          "description": "Hide this price. Hidden prices can still be shown using query parameters.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "id": {
          "description": "Existing price id (omit when creating a new price).",
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "order": {
          "type": [
            "number",
            "null"
          ]
        },
        "payWhatYouWant": {
          "description": "If enabled `amount` field becomes the minimum price and customers can choose to pay what they want. If `amount` is empty or `0` customer can purchase the product for free. Pay What You Want applies to one-time prices and subscriptions, but not payment plans.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "paymentPlan": {
          "description": "The payment plan components of a price such as `interval` and `intervalCount`",
          "properties": {
            "billingCycleAnchorConfig": {
              "properties": {
                "dayOfMonth": {
                  "description": "The first billing period will be prorated based on the remaining days in the month. Defaults to `1`.",
                  "maximum": 31,
                  "minimum": 1,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "enabled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "month": {
                  "maximum": 12,
                  "minimum": 1,
                  "type": "number"
                }
              },
              "type": "object"
            },
            "interval": {
              "description": "Billing interval for subscriptions.",
              "enum": [
                "day",
                "week",
                "month",
                "year",
                null
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "intervalCount": {
              "description": "Number of intervals between billings.",
              "minimum": 1,
              "type": [
                "number",
                "null"
              ]
            },
            "planIterations": {
              "description": "The number of times a subscription renews. After set number of renewals the payment plan is complete.",
              "minimum": 1,
              "type": "number"
            },
            "startDate": {
              "description": "The date on which the subscription begins.",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "trialPeriodDays": {
              "description": "Trial period in days for subscriptions.",
              "minimum": 0,
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "planIterations"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "pricingType": {
          "deprecated": true,
          "description": "Deprecated — superseded by `prices[]`. Accepted and ignored.",
          "enum": [
            "single",
            "multiple",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "pwywSuggestedPrice": {
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "recurring": {
          "description": "The recurring components of a price such as `interval` and `intervalCount`",
          "properties": {
            "billingCycleAnchorConfig": {
              "properties": {
                "dayOfMonth": {
                  "description": "The first billing period will be prorated based on the remaining days in the month. Defaults to `1`.",
                  "maximum": 31,
                  "minimum": 1,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "enabled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "month": {
                  "maximum": 12,
                  "minimum": 1,
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "interval": {
              "description": "Billing interval for subscriptions.",
              "enum": [
                "day",
                "week",
                "month",
                "year",
                null
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "intervalCount": {
              "description": "Number of intervals between billings.",
              "minimum": 1,
              "type": [
                "number",
                "null"
              ]
            },
            "startDate": {
              "description": "The date on which the subscription begins.",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "trialPeriodDays": {
              "description": "Trial period in days for subscriptions.",
              "minimum": 0,
              "type": [
                "number",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "reference": {
          "description": "Merchant-facing internal id (SKU-like). Derived from the price data when omitted, e.g. price_one_time_fixed_5000. A price resent by id keeps its stored reference.",
          "type": [
            "string",
            "null"
          ]
        },
        "setupFee": {
          "description": "One-time setup fee in cents.",
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "setupFeeMultipliesWithQuantity": {
          "description": "Whether or not the setup fee is multipled by the selected quantity. Applies to `one-time` and `pwyw` only. Defaults to `false`.",
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "pricePicker": {
      "description": "Price picker settings: the heading and description above the options, Show more / less, and tab labels, defaults and order.",
      "properties": {
        "description": {
          "description": "Text shown under the heading, above the price options. Line breaks are kept.",
          "type": [
            "string",
            "null"
          ]
        },
        "priceDisplayDefaults": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Per-axis default tab selection. Keyed by grouping axis. E.g. `{ interval: \"Monthly\" }`.",
          "type": [
            "object",
            "null"
          ]
        },
        "priceDisplayLabels": {
          "additionalProperties": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "description": "Per-axis label overrides for price tabs. Keyed by grouping axis (`billing` or `interval`), then by derived group name. E.g. `{ interval: { \"One-time\": \"Lifetime\" } }`.",
          "type": [
            "object",
            "null"
          ]
        },
        "priceDisplayTabOrder": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Per-axis tab display order. Keyed by grouping axis, value is ordered array of group names. E.g. `{ interval: [\"Monthly\", \"Yearly\"] }`.",
          "type": [
            "object",
            "null"
          ]
        },
        "shortenDescription": {
          "description": "Cut long price descriptions to their first lines behind a Show more link. Defaults to `true`.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "title": {
          "description": "Heading shown above the price options.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "prices": {
      "description": "Prices configured for this product. When provided, takes precedence over the legacy price field.",
      "items": {
        "$ref": "#/$defs/PriceInput"
      },
      "type": "array"
    },
    "shortDescription": {
      "description": "Plain-text one-liner shown under the title on the order bump card. Send null to clear. Order bump products only.",
      "maxLength": 500,
      "type": [
        "string",
        "null"
      ]
    },
    "sku": {
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ]
    },
    "stock": {
      "minimum": 0,
      "type": [
        "number",
        "null"
      ]
    },
    "taxBehavior": {
      "description": "If Stripe Tax is enabled, determines the behaviour of Stripe Tax. Defaults to your Stripe Tax settings.",
      "enum": [
        "inclusive",
        "exclusive",
        "automatic",
        "",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "taxCode": {
      "pattern": "^(txcd_[a-zA-Z0-9]+)?$",
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ]
    },
    "variants": {
      "items": {
        "properties": {
          "hidden": {
            "description": "Whether this variant is hidden. Hidden variants can be shown or filled with data by query paramers. [Learn more](https://checkoutpage.com/docs/articles/preselect-checkout-variants). Defaults to `false`.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "id": {
            "allOf": [
              {
                "$ref": "#/$defs/UniqueIdentifier"
              },
              {
                "description": "Unique identifier. Must be in BSON ObjectId format."
              }
            ]
          },
          "increasesWithQuantity": {
            "description": "Whether or not the variant quantity matches the checkout quantity. Defaults to `false`.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "key": {
            "description": "Optional caller-defined key for this variant. Not persisted to the database. Required when other variants reference this variant in `showHideLogic.element.elementId`.",
            "type": [
              "string",
              "null"
            ]
          },
          "layout": {
            "description": "Layout configuration for this variant.",
            "properties": {
              "collapseVariantOptions": {
                "description": "If enabled, variant options are collapsed by default. Defaults to `false`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "imageSize": {
                "description": "Size of variant option images. Defaults to `small`.",
                "enum": [
                  "small",
                  "medium",
                  "large",
                  "",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ]
              },
              "showPwywPlaceholder": {
                "description": "Show placeholder text for Pay What You Want inputs. Defaults to `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "showVariantName": {
                "description": "Show the variant name. Defaults to `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "showVariantOptionNames": {
                "description": "Show variant option names. Defaults to `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "showVariantOptionPriceSign": {
                "description": "Show price sign (+ or -) for variant option prices. Defaults to `false`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "showVariantOptionPrices": {
                "description": "Show variant option prices. Defaults to `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "spacing": {
                "description": "Spacing between variant options. Defaults to `comfortable`.",
                "enum": [
                  "comfortable",
                  "compact",
                  "",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ]
              },
              "textAlign": {
                "description": "Text alignment for variant options. Defaults to `left`.",
                "enum": [
                  "left",
                  "center",
                  "stack",
                  "",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ]
              },
              "variantOptionColumns": {
                "description": "Number of columns for grid layout. Defaults to `2`.",
                "maximum": 10,
                "minimum": 1,
                "type": [
                  "number",
                  "null"
                ]
              },
              "variantOptionLayout": {
                "description": "Layout style for variant options. Defaults to `list`.",
                "enum": [
                  "list",
                  "grid",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "manageVariantOptionStock": {
            "description": "If enabled stock is managed by the variant options. Defaults to `false`.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "description": "Name of the variant.",
            "type": "string"
          },
          "options": {
            "items": {
              "properties": {
                "additionalChargeAmount": {
                  "description": "The additional charge for selecting this variant option in cents.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "description": {
                  "description": "Description of the variant option. Supports HTML or plain text.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "discountedFromPrice": {
                  "description": "The original price of this variant option in cents.",
                  "minimum": 0,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "fileIds": {
                  "description": "Files specific to this variant option. Available to the customer after purchase.",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/$defs/UniqueIdentifier"
                      },
                      {
                        "description": "Unique identifier. Must be in BSON ObjectId format."
                      }
                    ]
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "id": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/UniqueIdentifier"
                    },
                    {
                      "description": "Unique identifier. Must be in BSON ObjectId format."
                    }
                  ]
                },
                "imageId": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/UniqueIdentifier"
                    },
                    {
                      "description": "Unique identifier. Must be in BSON ObjectId format.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  ]
                },
                "key": {
                  "description": "Optional caller-defined key for this option. Not persisted to the database. Required when `preselect.optionId` on the same variant, `showHideLogic.value` on another variant, or a `discounts[].variantOptionIds[].key` entry needs to reference this option in the same request.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "description": "Name of the variant option.",
                  "type": "string"
                },
                "payWhatYouWant": {
                  "description": "If enabled, customers can choose their own price for this variant option. The minimum price is based on the additionalChargeAmount. This is only supported for `one_time` options. Defaults to `false`.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "pwywSuggestedPrice": {
                  "description": "Suggested price for Pay What You Want options in cents. This is a cosmetic field used to display a suggested amount to the customer. Defaults to `0`.",
                  "minimum": 0,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "sku": {
                  "description": "SKU for this option.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "description": "Status of the variant option. Defaults to `enabled`.",
                  "enum": [
                    "enabled",
                    "disabled",
                    "deleted",
                    null
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stock": {
                  "description": "Stock quantity for this option.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "type": {
                  "description": "Type of variant option - one-time purchase or recurring subscription. For Pay What You Want options, `type` must be `one_time` and set `payWhatYouWant: true`.",
                  "enum": [
                    "one_time",
                    "recurring",
                    null
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "minItems": 1,
            "type": "array"
          },
          "order": {
            "description": "Display order of the variant. Defaults to `0`.",
            "type": [
              "number",
              "null"
            ]
          },
          "preselect": {
            "description": "Preselect configuration for this variant.",
            "properties": {
              "enabled": {
                "description": "Enable preselecting a variant option. Defaults to `false`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "optionId": {
                "description": "The `key` of the variant option to preselect. Must match the `key` of an option on this variant.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "quantity": {
                "description": "Quantity to preselect for quantity selection type variants. Defaults to `1` for `single` and `multiple` selection types.",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "priceIds": {
            "description": "Price ids this variant group is scoped to. Required when the product has multiple prices.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/$defs/UniqueIdentifier"
                },
                {
                  "description": "Unique identifier. Must be in BSON ObjectId format."
                }
              ]
            },
            "type": [
              "array",
              "null"
            ]
          },
          "reference": {
            "description": "External reference ID. Generated from the variant name when omitted.",
            "maxLength": 36,
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "description": "Whether the customer must select at least one option in the variant.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "selectionType": {
            "description": "Type of selection. If `single` the customer can choose one option in the variant group. If `multiple` the customer can choose multiple options in the variant group. If `quantity` the customer can select multiple options and set a quantity of each variant in the variant group. Defaults to `single`",
            "enum": [
              "single",
              "multiple",
              "quantity",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "showHideLogic": {
            "description": "Conditional logic to show or hide this variant based on other form elements.",
            "properties": {
              "comparison": {
                "description": "Comparison operator for the condition. Defaults to `is`. Use `value` with `is`, `is_not`, and `contains`. Omit `value` for `is_empty` and `is_not_empty`.",
                "enum": [
                  "is",
                  "is_not",
                  "is_empty",
                  "is_not_empty",
                  "contains",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ]
              },
              "element": {
                "description": "Element (variant) to compare against.",
                "properties": {
                  "elementId": {
                    "description": "The `key` of the source variant used in the condition. Must match the `key` of another variant in the same batch.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "enabled": {
                "description": "Enable conditional show/hide logic. Defaults to `false`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "value": {
                "description": "The `key` of the variant option being referenced. Must match the `key` of an option on the source variant identified by `showHideLogic.element.elementId`. Use this with `is`, `is_not`, and `contains`. Omit this field for `is_empty` and `is_not_empty`.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "description": "Status of the variant. Defaults to `enabled`",
            "enum": [
              "enabled",
              "disabled",
              "deleted",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "useVariantOptionSkus": {
            "description": "If enabled, use SKUs from variant options instead of the product SKU. Defaults to `false`.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "options"
        ],
        "type": "object"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "variantsRequired": {
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "type": "object",
  "$defs": {
    "PriceInput": {
      "properties": {
        "amount": {
          "minimum": 0,
          "type": "number"
        },
        "badge": {
          "description": "Optional short label shown over the price card (e.g. \"Save $50\", \"Most popular\").",
          "type": [
            "string",
            "null"
          ]
        },
        "badgeIcon": {
          "description": "Optional icon shown before the badge text. `null` removes it.",
          "enum": [
            "star",
            "sparkles",
            "fire",
            "bolt",
            "rocket",
            "trophy",
            "check",
            "x-mark",
            "plus",
            "arrow-right",
            "check-badge",
            "check-circle",
            "shield-check",
            "thumbs-up",
            "heart",
            "smile",
            "light-bulb",
            "sun",
            "moon",
            "gift",
            "tag",
            "percent",
            "dollar",
            "banknotes",
            "credit-card",
            "shopping-bag",
            "shopping-cart",
            "truck",
            "clock",
            "calendar",
            "bell",
            "megaphone",
            "trending-up",
            "chart",
            "refresh",
            "lock",
            "key",
            "ticket",
            "users",
            "academic-cap",
            "book",
            "music",
            "video",
            "document",
            "download",
            "mobile",
            "camera",
            "paint-brush",
            "puzzle",
            "cube",
            "globe",
            "map-pin",
            "storefront",
            "tools",
            "beaker",
            "lifebuoy",
            "chat",
            "envelope",
            "phone",
            "cake",
            "scale",
            "eye",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "billingType": {
          "description": "Billing type. Part of the pricing-type identity fixed at creation — cannot change on an existing price.",
          "enum": [
            "one_time",
            "recurring"
          ],
          "type": "string"
        },
        "currency": {
          "description": "Currency code (lowercase). Defaults to `usd`.",
          "maxLength": 3,
          "minLength": 3,
          "type": [
            "string",
            "null"
          ]
        },
        "discountedFromPrice": {
          "description": "The original price of the product in the smallest currency unit (cents).",
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "enabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "hidden": {
          "description": "Hide this price. Hidden prices can still be shown using query parameters.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "id": {
          "description": "Existing price id (omit when creating a new price).",
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "order": {
          "type": [
            "number",
            "null"
          ]
        },
        "payWhatYouWant": {
          "description": "If enabled `amount` field becomes the minimum price and customers can choose to pay what they want. If `amount` is empty or `0` customer can purchase the product for free. Pay What You Want applies to one-time prices and subscriptions, but not payment plans.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "paymentPlan": {
          "description": "The payment plan components of a price such as `interval` and `intervalCount`",
          "properties": {
            "billingCycleAnchorConfig": {
              "properties": {
                "dayOfMonth": {
                  "description": "The first billing period will be prorated based on the remaining days in the month. Defaults to `1`.",
                  "maximum": 31,
                  "minimum": 1,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "enabled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "month": {
                  "maximum": 12,
                  "minimum": 1,
                  "type": "number"
                }
              },
              "type": "object"
            },
            "interval": {
              "description": "Billing interval for subscriptions.",
              "enum": [
                "day",
                "week",
                "month",
                "year",
                null
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "intervalCount": {
              "description": "Number of intervals between billings.",
              "minimum": 1,
              "type": [
                "number",
                "null"
              ]
            },
            "planIterations": {
              "description": "The number of times a subscription renews. After set number of renewals the payment plan is complete.",
              "minimum": 1,
              "type": "number"
            },
            "startDate": {
              "description": "The date on which the subscription begins.",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "trialPeriodDays": {
              "description": "Trial period in days for subscriptions.",
              "minimum": 0,
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "planIterations"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "pwywSuggestedPrice": {
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "recurring": {
          "description": "The recurring components of a price such as `interval` and `intervalCount`",
          "properties": {
            "billingCycleAnchorConfig": {
              "properties": {
                "dayOfMonth": {
                  "description": "The first billing period will be prorated based on the remaining days in the month. Defaults to `1`.",
                  "maximum": 31,
                  "minimum": 1,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "enabled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "month": {
                  "maximum": 12,
                  "minimum": 1,
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "interval": {
              "description": "Billing interval for subscriptions.",
              "enum": [
                "day",
                "week",
                "month",
                "year",
                null
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "intervalCount": {
              "description": "Number of intervals between billings.",
              "minimum": 1,
              "type": [
                "number",
                "null"
              ]
            },
            "startDate": {
              "description": "The date on which the subscription begins.",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "trialPeriodDays": {
              "description": "Trial period in days for subscriptions.",
              "minimum": 0,
              "type": [
                "number",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "reference": {
          "description": "Merchant-facing internal id (SKU-like). Derived from the price data when omitted, e.g. price_one_time_fixed_5000. A price resent by id keeps its stored reference.",
          "type": [
            "string",
            "null"
          ]
        },
        "setupFee": {
          "description": "One-time setup fee in cents.",
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "setupFeeMultipliesWithQuantity": {
          "description": "Whether or not the setup fee is multipled by the selected quantity. Applies to `one-time` and `pwyw` only. Defaults to `false`.",
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "amount",
        "billingType"
      ],
      "type": "object"
    },
    "UniqueIdentifier": {
      "description": "Unique identifier for the ticket.",
      "pattern": "^[0-9a-fA-F]{24}$",
      "type": "string"
    }
  }
}