{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/esimker-com/json-schema/esimker-com-create-order-in-schema.json",
  "title": "CreateOrderIn",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/esimker-com-openapi.json#/components/schemas/CreateOrderIn",
  "properties": {
    "plan_id": {
      "type": "integer",
      "maximum": 2147483647.0,
      "minimum": 1.0,
      "title": "Plan Id"
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "topup_iccid": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^89\\d{16,20}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Topup Iccid"
    },
    "promo_code": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{2,32}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Promo Code"
    },
    "referral_code": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{2,32}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Referral Code"
    },
    "gift": {
      "type": "boolean",
      "title": "Gift",
      "default": false
    },
    "lang": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z]{2}(-[A-Za-z]{4})?$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lang"
    },
    "payment_method": {
      "type": "string",
      "pattern": "^(crypto|card|wallet)$",
      "title": "Payment Method",
      "default": "crypto"
    },
    "payment_gateway": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_-]{1,30}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Payment Gateway"
    },
    "period_num": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 365.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Period Num"
    },
    "client_ref": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Ref"
    }
  },
  "type": "object",
  "required": [
    "plan_id"
  ]
}