{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shieldz-cash/json-schema/shieldz-cash-product-schema.json",
  "title": "Product",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shieldz-cash-openapi.json#/components/schemas/Product",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "product"
    },
    "name": {
      "type": "string",
      "description": "Shown to the buyer on the payment link page and on invoices."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Shown under the name on the payment link page."
    },
    "image_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Product image. Images uploaded in the dashboard are served from this host."
    },
    "active": {
      "type": "boolean",
      "description": "false once archived. Links selling an archived product show as unavailable."
    },
    "default_price": {
      "oneOf": [
        {
          "$ref": "#/$defs/Price"
        },
        {
          "type": "null"
        }
      ],
      "description": "The price used when a link or cart names the product rather than a price."
    },
    "created_at": {
      "type": "integer",
      "description": "Unix milliseconds."
    },
    "updated_at": {
      "type": "integer",
      "description": "Unix milliseconds."
    }
  },
  "$defs": {
    "Price": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "const": "price"
        },
        "product": {
          "type": "string",
          "description": "The product (prod_…) this price belongs to."
        },
        "active": {
          "type": "boolean",
          "description": "false once archived. An archived price can't be added to new carts or links."
        },
        "unit_amount_usd_cents": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Fixed price per unit in USD cents; null when the customer chooses the amount."
        },
        "custom_unit_amount": {
          "type": [
            "object",
            "null"
          ],
          "description": "The range the customer chooses from; null for a fixed price.",
          "properties": {
            "minimum_usd_cents": {
              "type": [
                "integer",
                "null"
              ]
            },
            "maximum_usd_cents": {
              "type": [
                "integer",
                "null"
              ]
            },
            "preset_usd_cents": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        },
        "created_at": {
          "type": "integer",
          "description": "Unix milliseconds."
        }
      }
    }
  }
}