{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/griffnode-com/json-schema/griffnode-com-create-transaction-request-schema.json",
  "title": "CreateTransactionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/griffnode-com-api-openapi.yml#/components/schemas/CreateTransactionRequest",
  "type": "object",
  "required": [
    "crypto",
    "amount"
  ],
  "properties": {
    "crypto": {
      "$ref": "#/$defs/CryptoSymbol"
    },
    "amount": {
      "type": "number",
      "description": "Fiat amount (≥ 1.00 USD equivalent)."
    },
    "currency_fiat": {
      "$ref": "#/$defs/FiatCurrency"
    },
    "metadata": {
      "$ref": "#/$defs/Metadata"
    },
    "customer_email": {
      "type": [
        "string",
        "null"
      ],
      "format": "email"
    },
    "success_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "cancel_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    }
  },
  "$defs": {
    "CryptoSymbol": {
      "type": "string",
      "description": "Supported coin/token symbol. /cryptos/list is authoritative at runtime.",
      "enum": [
        "BTC",
        "LTC",
        "DOGE",
        "DASH",
        "ETH",
        "USDT",
        "USDC",
        "EURC",
        "DAI",
        "WBTC",
        "WETH",
        "SHIB",
        "PEPE",
        "LINK",
        "UNI",
        "LEO"
      ]
    },
    "FiatCurrency": {
      "type": "string",
      "enum": [
        "USD",
        "PLN",
        "EUR",
        "GBP"
      ],
      "default": "USD"
    },
    "Metadata": {
      "type": [
        "object",
        "null"
      ],
      "description": "Free-form key/value (≤20 keys, string values ≤500 chars, ≤4 KB total).",
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}