{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rozo-ai/json-schema/rozo-ai-create-payment-request-schema.json",
  "title": "CreatePaymentRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rozo-ai-openapi-v2.0.0.yaml#/components/schemas/CreatePaymentRequest",
  "type": "object",
  "required": [
    "appId",
    "display",
    "source",
    "destination"
  ],
  "properties": {
    "appId": {
      "type": "string",
      "description": "Your application ID"
    },
    "orderId": {
      "type": "string",
      "description": "Your order reference ID (for idempotency)"
    },
    "type": {
      "type": "string",
      "enum": [
        "exactIn",
        "exactOut"
      ],
      "default": "exactIn",
      "description": "exactIn: fee deducted from input. exactOut: fee added to input"
    },
    "display": {
      "type": "object",
      "required": [
        "title",
        "currency"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        }
      }
    },
    "source": {
      "type": "object",
      "required": [
        "chainId",
        "tokenSymbol"
      ],
      "properties": {
        "chainId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "description": "Chain ID: 1 (ETH), 137 (Polygon), 8453 (Base), 900 (Solana), 1500 (Stellar)"
        },
        "tokenSymbol": {
          "type": "string",
          "enum": [
            "USDC",
            "USDT",
            "EURC"
          ]
        },
        "tokenAddress": {
          "type": "string",
          "description": "Token contract address"
        },
        "amount": {
          "type": "string",
          "description": "Amount (required for exactIn)"
        }
      }
    },
    "destination": {
      "type": "object",
      "required": [
        "chainId",
        "receiverAddress",
        "tokenSymbol"
      ],
      "properties": {
        "chainId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ]
        },
        "receiverAddress": {
          "type": "string",
          "description": "Recipient wallet address"
        },
        "receiverMemo": {
          "type": "string",
          "description": "Memo for Stellar"
        },
        "tokenSymbol": {
          "type": "string",
          "enum": [
            "USDC",
            "USDT",
            "EURC"
          ]
        },
        "tokenAddress": {
          "type": "string"
        },
        "amount": {
          "type": "string",
          "description": "Amount (required for exactOut)"
        }
      }
    },
    "webhookUrl": {
      "type": "string",
      "format": "uri"
    },
    "metadata": {
      "type": "object"
    }
  }
}