{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-session-status-response-schema.json",
  "title": "Create Status 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-Status-Response",
  "type": "object",
  "required": [
    "session",
    "status"
  ],
  "properties": {
    "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-Get-Response"
    },
    "method": {
      "$ref": "#/$defs/Method-Session-Update"
    },
    "card": {
      "$ref": "#/$defs/Session-Get-Status-Card-Notification"
    },
    "ach": {
      "$ref": "#/$defs/Session-Get-Status-Ach-Notification"
    }
  },
  "$defs": {
    "Holder-Session-Name": {
      "title": "Holder Session name",
      "description": "Session Name",
      "properties": {
        "first_name": {
          "description": "first_name.",
          "maxLength": 50,
          "minLength": 1,
          "type": "string",
          "title": "first_name"
        },
        "last_name": {
          "description": "last_name.",
          "maxLength": 50,
          "minLength": 1,
          "type": "string",
          "title": "last_name"
        }
      }
    },
    "Method-Session-Update": {
      "title": "Method Session Update",
      "description": "Session method",
      "properties": {
        "holder_name": {
          "$ref": "#/$defs/Holder-Session-Name"
        }
      }
    },
    "Session-Get-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"
        }
      }
    },
    "Session-Get-Status-Ach-Notification": {
      "title": "Session Get Ach",
      "type": "object",
      "properties": {
        "account_number": {
          "description": "Account Number that needs to be tokenized",
          "type": "string",
          "minLength": 1,
          "maxLength": 17,
          "title": "account_number"
        },
        "routing_number": {
          "description": "Routing Number that needs to be tokenized",
          "type": "string",
          "minLength": 9,
          "maxLength": 9,
          "title": "routing_number"
        },
        "account_type": {
          "type": "string",
          "enum": [
            "SAVINGS",
            "CHECKING"
          ],
          "description": "An indicator identifying the type of bank account.Consumer (checking or savings), orBusinessFor pre-arranged payments (sourceOfFunds.provided.ach.secCode=PPD) retrieve this information from the payer.If payments were telephone-initiated (sourceOfFunds.provided.ach.secCode=TEL) or internet-initiated (sourceOfFunds.provided.ach.secCode=WEB) you may choose to limit the payer's options (e.g. only support consumer checking accounts), depending on your type of business (e.g. B2C online webshop).",
          "title": "status"
        }
      }
    },
    "Session-Get-Status-Card-Notification": {
      "title": "Session Get Card",
      "type": "object",
      "properties": {
        "number": {
          "description": "Card Number that needs to be tokenized",
          "type": "string",
          "minLength": 9,
          "maxLength": 23,
          "title": "number"
        },
        "expiry_month": {
          "description": "Two-digit month in which the payment card expires",
          "type": "string",
          "pattern": "^(0?[1-9]|1[0-2])$",
          "title": "expiry_month"
        },
        "expiry_year": {
          "description": "Two-digit year in which the payment card expires",
          "type": "string",
          "pattern": "^[0-9]{2,2}$",
          "title": "expiry_year"
        }
      }
    }
  }
}