{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swapwallet-app/json-schema/swapwallet-app-fiat-withdraw-request-schema.json",
  "title": "FiatWithdrawRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swapwallet-app-openapi.yaml#/components/schemas/FiatWithdrawRequest",
  "type": "object",
  "properties": {
    "amount": {
      "$ref": "#/$defs/Money",
      "description": "مقدار برداشت به تومان"
    },
    "iban": {
      "type": "string",
      "description": "شماره شبا (باید از شباهای ثبت‌شده در حساب کاربری شما باشد)"
    },
    "feeDeductType": {
      "allOf": [
        {
          "$ref": "#/$defs/FeeDeductTypeEnum"
        }
      ],
      "type": [
        "string",
        "null"
      ],
      "description": "نحوه‌ی کسر کارمزد (پیش‌فرض `INTERNAL`)"
    },
    "remark": {
      "type": [
        "string",
        "null"
      ],
      "description": "یادداشت داخلی"
    }
  },
  "required": [
    "amount",
    "iban"
  ],
  "$defs": {
    "FeeDeductTypeEnum": {
      "type": "string",
      "enum": [
        "INTERNAL",
        "EXTERNAL"
      ],
      "description": "نحوه‌ی کسر کارمزد از برداشت:\n- `INTERNAL` — کارمزد از مقدار اصلی کسر می‌شود\n- `EXTERNAL` — کارمزد از موجودی کیف پول کسر می‌شود و مقدار برداشت تغییر نمی‌کند\n"
    },
    "Money": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "unit": {
          "type": "string",
          "description": "واحد ارزی (مثلاً USDT، IRT، USD)"
        }
      },
      "required": [
        "number",
        "unit"
      ]
    }
  }
}