{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/klarna/main/json-schema/klarna-session-response-v1-schema.json",
  "title": "SessionResponseV1",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klarna-hpp-api-openapi.yml#/components/schemas/SessionResponseV1",
  "type": "object",
  "properties": {
    "authorization_token": {
      "type": "string",
      "description": "Authorization token (only for KP Sessions)"
    },
    "customer": {
      "$ref": "#/$defs/CustomerV1"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Session expiration time"
    },
    "klarna_reference": {
      "type": "string",
      "description": "Klarna reference provided by MoOD"
    },
    "manual_identification": {
      "$ref": "#/$defs/MerchantManualIdentificationV1"
    },
    "order_id": {
      "type": "string",
      "description": "Order id of the payment session"
    },
    "session_id": {
      "type": "string",
      "description": "The id of the HPP Session"
    },
    "status": {
      "type": "string",
      "description": "Current HPP Session status",
      "enum": [
        "WAITING",
        "BACK",
        "IN_PROGRESS",
        "MANUAL_ID_CHECK",
        "COMPLETED",
        "CANCELLED",
        "FAILED",
        "DISABLED",
        "ERROR"
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Latest status update time"
    }
  },
  "$defs": {
    "CustomerV1": {
      "type": "object",
      "properties": {
        "date_of_birth": {
          "type": "string",
          "description": "Customer's date of birth (YYYY-MM-dd)"
        },
        "family_name": {
          "type": "string",
          "description": "Customer's family name"
        },
        "given_name": {
          "type": "string",
          "description": "Customer's given name"
        },
        "national_identification_number": {
          "type": "string",
          "description": "Customer's national identity number"
        },
        "title": {
          "type": "string",
          "description": "Customer's title"
        }
      }
    },
    "MerchantManualIdentificationV1": {
      "type": "object",
      "properties": {
        "challenge": {
          "type": "string",
          "description": "Identification challenge"
        },
        "customer": {
          "$ref": "#/$defs/CustomerV1"
        },
        "customer_obfuscated": {
          "$ref": "#/$defs/CustomerV1"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "description": "Session identification expiry time (YYYY-MM-ddThh:mm:ss.fffZ)"
        }
      }
    }
  }
}