{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/depixapp-com/json-schema/depixapp-com-product-create-request-schema.json",
  "title": "ProductCreateRequest",
  "description": "Product creation request (reusable checkout template with a public page).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/depixapp-com-products-api-openapi.yml#/components/schemas/ProductCreateRequest",
  "type": "object",
  "required": [
    "name",
    "amount"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Product name (2–80 chars).",
      "minLength": 2,
      "maxLength": 80
    },
    "slug": {
      "type": "string",
      "description": "URL slug (lowercase letters, digits, hyphens). Auto-generated from name when omitted."
    },
    "amount": {
      "type": "integer",
      "description": "Price in cents (BRL). Range: 500–600000.",
      "minimum": 500,
      "maximum": 600000
    },
    "description": {
      "type": "string",
      "description": "Product description (max 500 chars).",
      "maxLength": 500
    },
    "image_url": {
      "type": "string",
      "description": "HTTPS product image URL."
    },
    "callback_url": {
      "type": "string",
      "description": "HTTPS webhook endpoint for checkouts created from this product."
    },
    "redirect_url": {
      "type": "string",
      "description": "HTTPS post-payment redirect for checkouts created from this product."
    },
    "metadata": {
      "type": "object",
      "description": "Arbitrary JSON copied into each checkout (max 4KB serialized)."
    },
    "expires_in": {
      "type": "integer",
      "description": "Checkout QR lifetime in seconds. Range: 300–1200; default 1200.",
      "minimum": 300,
      "maximum": 1200
    },
    "kind": {
      "type": "string",
      "description": "Row kind: 'product' (catalog item, default) or 'charge' (cobrança — a configurable payment link with a due date and late fees, served at pay.depixapp.com/c/{id} and never listed on any store surface).",
      "enum": [
        "product",
        "charge"
      ]
    },
    "due_date": {
      "type": "string",
      "description": "Charges only (required for them): first due date, YYYY-MM-DD — the recurrence anchor."
    },
    "recurrence": {
      "type": [
        "string",
        "null"
      ],
      "description": "Charges only: null (one-time) or weekly | monthly | quarterly | semiannual | yearly. Monthly-and-up anchor on the due day, clamping to shorter months."
    },
    "late_fine_bps": {
      "type": "integer",
      "description": "Charges only: one-time late fine in basis points of the base (200 = 2%). Default 0.",
      "minimum": 0,
      "maximum": 2000
    },
    "late_interest_monthly_bps": {
      "type": "integer",
      "description": "Charges only: monthly interest in basis points, accrued pro-rata per day late (100 = 1% a.m.). Default 0.",
      "minimum": 0,
      "maximum": 1000
    }
  }
}