{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:sitla:payments:1:schema:online-vc",
  "$comment": "SPDX-License-Identifier: CC0-1.0; Stripe online adapter, not a new wire/1 record or proof of provider execution.",
  "type": "object",
  "properties": {
    "@context": {
      "type": "array",
      "prefixItems": [
        {
          "const": "https://www.w3.org/ns/credentials/v2"
        },
        {
          "const": {
            "@vocab": "urn:sitla:online:claims:1:"
          }
        }
      ],
      "items": false,
      "minItems": 2,
      "maxItems": 2
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "type": {
      "type": "array",
      "prefixItems": [
        {
          "const": "VerifiableCredential"
        },
        {
          "enum": [
            "urn:sitla:credential:CollectionAuthorization:1",
            "urn:sitla:credential:ConditionalPaymentInstruction:1",
            "urn:sitla:credential:OperatorPaymentEventCredential:1"
          ]
        }
      ],
      "items": false,
      "minItems": 2,
      "maxItems": 2
    },
    "issuer": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "validFrom": {
      "type": "string",
      "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{3})?Z$"
    },
    "credentialSubject": {
      "type": "object"
    },
    "credentialStatus": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        },
        "type": {
          "const": "urn:sitla:status:operator-record:1"
        }
      },
      "required": [
        "id",
        "type"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "@context",
    "id",
    "type",
    "issuer",
    "validFrom",
    "credentialSubject",
    "credentialStatus"
  ],
  "additionalProperties": false
}
