{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-session-create-response-schema.json",
  "title": "Create Session Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-sessions-api-openapi.yml#/components/schemas/Session-Create-Response",
  "type": "object",
  "required": [
    "id",
    "status",
    "session"
  ],
  "properties": {
    "id": {
      "description": "Request Id",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "title": "id"
    },
    "status": {
      "type": "string",
      "enum": [
        "SUCCESS",
        "FAILED"
      ],
      "description": "A system-generated high level overall result of the transaction/operation.Value must be a member of the following list. The values are case sensitive.",
      "title": "status"
    },
    "session": {
      "$ref": "#/$defs/Session-Response"
    }
  },
  "$defs": {
    "Session-Response": {
      "title": "Session",
      "type": "object",
      "required": [
        "id",
        "authentication_limit",
        "validity"
      ],
      "properties": {
        "id": {
          "description": "The identifier for the payment session.You can add request fields to the session using a Hosted Payment Form or wallet provider interaction, or the Update Session operation.",
          "type": "string",
          "minLength": 36,
          "maxLength": 37,
          "title": "id"
        },
        "authentication_limit": {
          "description": "The number of operations which may be submitted to the gateway using this session id as a password.This field applies when you write a browser or mobile app that issues operations to the gateway from the device, using the session id as a password.In that case, a payer (or a compromised browser), could issue a large number of requests to the gateway on your behalf, and you could incur unnecessary fees as a result.This field lets you limit your exposure to that risk. The value defaulted by the gateway is suitable for typical payments. There is an upper limit (your operation will be rejected if that limit is exceeded).",
          "type": "string",
          "pattern": "^(?:[1-9]|1[0-9]|2[0-5])$",
          "title": "authentication_limit"
        },
        "validity": {
          "description": "Time till which session id can be used within the authentication limit in minutes(min: 1 minute; max: 25 minutes)",
          "type": "string",
          "pattern": "^(?:[1-9]|1[0-9]|2[0-5])$",
          "title": "validity"
        },
        "access_key": {
          "description": "For some gateway operations invoked via a payer device, you supply your website as a return URL.On return to your website",
          "type": "string",
          "minLength": 44,
          "maxLength": 44,
          "title": "access_key"
        }
      }
    }
  }
}