{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentstack-tech/json-schema/agentstack-tech-create-payment-request-schema.json",
  "title": "CreatePaymentRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentstack-tech-openapi.json#/components/schemas/CreatePaymentRequest",
  "properties": {
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0.0,
      "title": "Amount",
      "description": "Payment amount"
    },
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "Currency code",
      "default": "USD"
    },
    "description": {
      "type": "string",
      "title": "Description",
      "description": "Description",
      "default": ""
    },
    "intent": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Intent",
      "description": "sale | top_up | subscription | energy_pack | currency_pack | soft_currency_pack | tenant_iap | studio_diagnostic",
      "default": "sale"
    },
    "destination_wallet": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Destination Wallet",
      "description": "Target wallet for top_up"
    },
    "preferred_method": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preferred Method",
      "description": "card | stripe | tochka | wallet"
    },
    "method": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Method",
      "description": "Alias for preferred_method"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Country",
      "description": "ISO country for provider matrix"
    },
    "scope": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Scope",
      "description": "user | project",
      "default": "user"
    },
    "idempotency_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Idempotency Key",
      "description": "Idempotency key"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "Metadata"
    },
    "type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Type",
      "description": "Payment type",
      "default": "payment"
    },
    "recipient_project_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recipient Project Id",
      "description": "Recipient project for sale"
    },
    "use_project_keys": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Use Project Keys",
      "description": "Use project BYOK",
      "default": false
    },
    "success_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Success Url",
      "description": "Redirect URL on payment success (Tochka/redirect providers)"
    },
    "fail_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fail Url",
      "description": "Redirect URL on payment failure (Tochka/redirect providers)"
    },
    "notification_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notification Url",
      "description": "Server callback URL for provider webhooks (overrides auto-derived URL)"
    },
    "base_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Base Url",
      "description": "Base URL of this deployment, used to derive notification_url when notification_url is not provided"
    },
    "checkout_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Checkout Session Id",
      "description": "Commerce checkout session copied onto the provider"
    },
    "seller_user_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seller User Id",
      "description": "Seller credited on the personal wallet"
    },
    "buyer_user_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Buyer User Id",
      "description": "Buyer on the checkout session"
    },
    "buyer_project_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Buyer Project Id",
      "description": "Buyer project on the checkout session"
    },
    "funding_lane": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Funding Lane",
      "description": "personal | treasury"
    }
  },
  "type": "object",
  "required": [
    "amount"
  ]
}