{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-userinfo-schema.json",
  "title": "User Information",
  "description": "The [OpenID Connect](https://openid.net/connect/) user profile information for [standard claims](https://openid.net/specs/openid-connect-basic-1_0.html#StandardClaims). The details correspond to the scopes of the access token.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-openidconnect-api-openapi.yml#/components/schemas/userinfo",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "description": "The user ID of the user.",
      "readOnly": true
    },
    "sub": {
      "type": "string",
      "description": "The subject ID for the end user at the issuer.",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "The full name of the user.",
      "readOnly": true
    },
    "given_name": {
      "type": "string",
      "description": "The given, or first, name of the user.",
      "readOnly": true
    },
    "family_name": {
      "type": "string",
      "description": "The surname or family name of the user. Also known as the last name. Use also to store multiple surnames including the matronymic, or mother's, surname.",
      "readOnly": true
    },
    "middle_name": {
      "type": "string",
      "description": "The middle name of the user. Use also to store multiple middle names including the patronymic, or father's, middle name.",
      "readOnly": true
    },
    "picture": {
      "type": "string",
      "description": "The URL of the profile picture of the user.",
      "readOnly": true
    },
    "email": {
      "type": "string",
      "description": "The internationalized email address.",
      "readOnly": true
    },
    "email_verified": {
      "type": "boolean",
      "description": "Indicates whether the user's email address is verified.",
      "readOnly": true
    },
    "gender": {
      "type": "string",
      "description": "The user's gender.",
      "readOnly": true
    },
    "birthdate": {
      "type": "string",
      "format": "date-time",
      "description": "The user's birthday, in `YYYY-MM-DD` format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). The year MAY be `0000`, which indicates its omission. To represent only the year, use `YYYY` format.",
      "readOnly": true
    },
    "zoneinfo": {
      "type": "string",
      "description": "The time zone of the user.",
      "readOnly": true
    },
    "locale": {
      "type": "string",
      "description": "The locale of the user.",
      "readOnly": true
    },
    "phone_number": {
      "type": "string",
      "description": "The preferred telephone number of the user.",
      "readOnly": true
    },
    "address": {
      "$ref": "#/$defs/address"
    },
    "verified_account": {
      "type": "boolean",
      "description": "Indicates whether the account is verified.",
      "readOnly": true
    },
    "account_type": {
      "type": "string",
      "description": "The account type.",
      "readOnly": true,
      "enum": [
        "PERSONAL",
        "BUSINESS",
        "PREMIER"
      ],
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "PERSONAL"
          ],
          "description": "Personal account."
        },
        {
          "type": "string",
          "enum": [
            "BUSINESS"
          ],
          "description": "Business account."
        },
        {
          "type": "string",
          "enum": [
            "PREMIER"
          ],
          "description": "Premier account."
        }
      ]
    },
    "age_range": {
      "type": "string",
      "description": "The account holder's age range.",
      "readOnly": true
    }
  },
  "$defs": {
    "address": {
      "type": "object",
      "title": "Address",
      "description": "The preferred address of the user.",
      "readOnly": true,
      "properties": {
        "street_address": {
          "type": "string",
          "description": "The full street address. Can include the house number and street name.",
          "readOnly": true
        },
        "locality": {
          "type": "string",
          "description": "The city or locality.",
          "readOnly": true
        },
        "region": {
          "type": "string",
          "description": "The state, province, prefecture, or region.",
          "readOnly": true
        },
        "postal_code": {
          "type": "string",
          "description": "The zip code or postal code.",
          "readOnly": true
        },
        "country": {
          "type": "string",
          "description": "The country.",
          "readOnly": true
        }
      }
    }
  }
}