{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plaxswap-com/json-schema/plaxswap-com-create-order-request-schema.json",
  "title": "CreateOrderRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plaxswap-com-openapi.json#/components/schemas/CreateOrderRequest",
  "type": "object",
  "properties": {
    "exchangeReceiver": {
      "type": "object",
      "description": "Actual payout/refund recipient, only when the local exchange account requires it.",
      "properties": {
        "name": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "individual",
            "company"
          ]
        }
      },
      "required": [
        "name",
        "country"
      ]
    },
    "type": {
      "$ref": "#/$defs/OrderType"
    },
    "quoteId": {
      "type": "string",
      "description": "Required for fixed orders: the id from POST /api/v1/quotes."
    },
    "from": {
      "type": "string",
      "description": "Required for variable orders: method id of the coin sent."
    },
    "to": {
      "type": "string",
      "description": "Required for variable orders: method id of the coin received."
    },
    "depositAmount": {
      "type": "string",
      "description": "Variable orders: the amount you plan to send. Shown on the order page; any amount within the limits still works.",
      "pattern": "^\\d+(\\.\\d+)?$"
    },
    "settleAddress": {
      "type": "string",
      "description": "Where the coins go. Checked for format, checksum, sanctions and risk before the order exists."
    },
    "settleMemo": {
      "type": "string",
      "description": "Memo, tag or comment for the payout, on networks that use one."
    },
    "refundAddress": {
      "type": "string",
      "description": "Where a refund goes. Optional: without one, the order page asks when a refund is needed."
    },
    "refundMemo": {
      "type": "string"
    },
    "payoutDestination": {
      "$ref": "#/$defs/PayoutDestination"
    },
    "beneficiary": {
      "type": "object",
      "description": "Travel rule: needed for exchange payouts that can reach the threshold.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Account holder's full name."
        },
        "vaspName": {
          "type": "string",
          "description": "The exchange's name."
        }
      },
      "required": [
        "name"
      ]
    },
    "acceptTerms": {
      "type": "boolean",
      "const": true,
      "description": "Must be true."
    },
    "partnerRef": {
      "type": "string",
      "description": "Your own reference for this order."
    },
    "commissionBps": {
      "type": "integer",
      "description": "Partners only: your commission inside the rate, 0 to 200 basis points.",
      "minimum": 0,
      "maximum": 200
    },
    "botCheckToken": {
      "type": "string",
      "description": "Web orders only, when meta.botCheckSiteKey is set: the Cloudflare Turnstile token from the page. Orders with an API key leave it out."
    }
  },
  "required": [
    "type",
    "settleAddress",
    "acceptTerms",
    "botCheckToken"
  ],
  "$defs": {
    "OrderType": {
      "type": "string",
      "description": "fixed: locked price, exact amount. variable: any amount within limits, market rate when it confirms.",
      "enum": [
        "fixed",
        "variable"
      ]
    },
    "PayoutDestination": {
      "type": "string",
      "description": "Travel rule: is the payout address your own wallet or an exchange account?",
      "enum": [
        "self_hosted",
        "exchange"
      ]
    }
  }
}