{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/trymaven-com/main/json-schema/trymaven-com-create-widget-session-schema.json",
  "title": "CreateWidgetSession",
  "x-generated": "2026-10-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trymaven-com-openapi.yml#/components/schemas/CreateWidgetSession",
  "properties": {
    "project": {
      "type": "string",
      "title": "Project",
      "description": "Project UUID or slug"
    },
    "amount_cents": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Amount Cents",
      "description": "Charge amount in cents. For mode='tokenize' may be 0."
    },
    "gateway": {
      "type": "string",
      "title": "Gateway",
      "description": "stripe | authorizenet | braintree | shift4 | fiserv | jpmorgan | webhook"
    },
    "mode": {
      "type": "string",
      "pattern": "^(charge|tokenize)$",
      "title": "Mode",
      "default": "charge"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "stripe_account": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^acct_[A-Za-z0-9]+$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stripe Account",
      "description": "Stripe Platform Mode only: connected account (acct_...) on YOUR Stripe platform"
    }
  },
  "type": "object",
  "required": [
    "project",
    "amount_cents",
    "gateway"
  ]
}