{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plugsurfing/json-schema/plugsurfing-charging-key-order-response-schema.json",
  "title": "ChargingKeyOrderResponse",
  "description": "Result returned after creating a charging key order.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plugsurfing-charging-key-orders-api-openapi.yml#/components/schemas/ChargingKeyOrderResponse",
  "type": "object",
  "required": [
    "id",
    "state"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier of the created charging key order."
    },
    "state": {
      "$ref": "#/$defs/OrderState",
      "description": "Current lifecycle state of the charging key order."
    },
    "clientSecret": {
      "type": "string",
      "description": "If Stripe payment requires a 3DS authentication, this field will be populated with the clientSecret from Stripe, which should be sent back to client side Stripe SDK for user authentication."
    }
  },
  "$defs": {
    "OrderState": {
      "type": "string",
      "enum": [
        "ORDER_FILLED",
        "ORDER_CANCELLED",
        "ORDER_PROCESSING",
        "ORDER_WAITING_3DS",
        "ORDER_PAYMENT_FAILED",
        "ORDER_REFUND_FAILED",
        "ORDER_REFUNDED",
        "ORDER_PLACED",
        "ORDER_PAID"
      ]
    }
  }
}