{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-payment-cryptography/json-schema/amazon-payment-cryptography-verify-auth-request-cryptogram-input-schema.json",
  "title": "VerifyAuthRequestCryptogramInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-payment-cryptography-operations-api-openapi.yml#/components/schemas/VerifyAuthRequestCryptogramInput",
  "type": "object",
  "properties": {
    "KeyIdentifier": {
      "type": "string",
      "description": "The keyARN of the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification."
    },
    "TransactionData": {
      "type": "string",
      "description": "The transaction data that Amazon Web Services Payment Cryptography uses for ARQC verification. The same transaction is used for ARQC generation outside of Amazon Web Services Payment Cryptography."
    },
    "AuthRequestCryptogram": {
      "type": "string",
      "description": "The auth request cryptogram imported into Amazon Web Services Payment Cryptography for ARQC verification using a major encryption key and transaction data."
    },
    "MajorKeyDerivationMode": {
      "type": "string",
      "enum": [
        "EMV_OPTION_A",
        "EMV_OPTION_B"
      ],
      "description": "The method to use when deriving the major encryption key for ARQC verification within Amazon Web Services Payment Cryptography. The same key derivation mode was used for ARQC generation outside of Amazon Web Services Payment Cryptography."
    },
    "SessionKeyDerivationAttributes": {
      "$ref": "#/$defs/SessionKeyDerivation"
    },
    "AuthResponseAttributes": {
      "$ref": "#/$defs/CryptogramAuthResponse"
    }
  },
  "required": [
    "KeyIdentifier",
    "TransactionData",
    "AuthRequestCryptogram",
    "MajorKeyDerivationMode",
    "SessionKeyDerivationAttributes"
  ],
  "$defs": {
    "CryptogramAuthResponse": {
      "type": "object",
      "properties": {
        "ArpcMethod1": {
          "$ref": "#/$defs/CryptogramVerificationArpcMethod1"
        },
        "ArpcMethod2": {
          "$ref": "#/$defs/CryptogramVerificationArpcMethod2"
        }
      },
      "description": "Exactly one member is set."
    },
    "CryptogramVerificationArpcMethod1": {
      "type": "object",
      "properties": {
        "AuthResponseCode": {
          "type": "string",
          "description": "The auth code used to calculate APRC after ARQC verification is successful. This is the same auth code used for ARQC generation outside of Amazon Web Services Payment Cryptography."
        }
      },
      "required": [
        "AuthResponseCode"
      ]
    },
    "CryptogramVerificationArpcMethod2": {
      "type": "object",
      "properties": {
        "CardStatusUpdate": {
          "type": "string",
          "description": "The data indicating whether the issuer approves or declines an online transaction using an EMV chip card."
        },
        "ProprietaryAuthenticationData": {
          "type": "string",
          "description": "The proprietary authentication data used by issuer for communication during online transaction using an EMV chip card."
        }
      },
      "required": [
        "CardStatusUpdate"
      ]
    },
    "SessionKeyAmex": {
      "type": "object",
      "properties": {
        "PrimaryAccountNumber": {
          "type": "string",
          "description": "The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."
        },
        "PanSequenceNumber": {
          "type": "string",
          "description": "A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."
        }
      },
      "required": [
        "PrimaryAccountNumber",
        "PanSequenceNumber"
      ]
    },
    "SessionKeyDerivation": {
      "type": "object",
      "properties": {
        "EmvCommon": {
          "$ref": "#/$defs/SessionKeyEmvCommon"
        },
        "Mastercard": {
          "$ref": "#/$defs/SessionKeyMastercard"
        },
        "Emv2000": {
          "$ref": "#/$defs/SessionKeyEmv2000"
        },
        "Amex": {
          "$ref": "#/$defs/SessionKeyAmex"
        },
        "Visa": {
          "$ref": "#/$defs/SessionKeyVisa"
        },
        "UnionPay": {
          "$ref": "#/$defs/SessionKeyUnionPay"
        }
      },
      "description": "Exactly one member is set."
    },
    "SessionKeyEmv2000": {
      "type": "object",
      "properties": {
        "PrimaryAccountNumber": {
          "type": "string",
          "description": "The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."
        },
        "PanSequenceNumber": {
          "type": "string",
          "description": "A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."
        },
        "ApplicationTransactionCounter": {
          "type": "string",
          "description": "The transaction counter that is provided by the terminal during transaction processing."
        }
      },
      "required": [
        "PrimaryAccountNumber",
        "PanSequenceNumber",
        "ApplicationTransactionCounter"
      ]
    },
    "SessionKeyEmvCommon": {
      "type": "object",
      "properties": {
        "PrimaryAccountNumber": {
          "type": "string",
          "description": "The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."
        },
        "PanSequenceNumber": {
          "type": "string",
          "description": "A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."
        },
        "ApplicationTransactionCounter": {
          "type": "string",
          "description": "The transaction counter that is provided by the terminal during transaction processing."
        }
      },
      "required": [
        "PrimaryAccountNumber",
        "PanSequenceNumber",
        "ApplicationTransactionCounter"
      ]
    },
    "SessionKeyMastercard": {
      "type": "object",
      "properties": {
        "PrimaryAccountNumber": {
          "type": "string",
          "description": "The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."
        },
        "PanSequenceNumber": {
          "type": "string",
          "description": "A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."
        },
        "ApplicationTransactionCounter": {
          "type": "string",
          "description": "The transaction counter that is provided by the terminal during transaction processing."
        },
        "UnpredictableNumber": {
          "type": "string",
          "description": "A random number generated by the issuer."
        }
      },
      "required": [
        "PrimaryAccountNumber",
        "PanSequenceNumber",
        "ApplicationTransactionCounter",
        "UnpredictableNumber"
      ]
    },
    "SessionKeyUnionPay": {
      "type": "object",
      "properties": {
        "PrimaryAccountNumber": {
          "type": "string",
          "description": "The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."
        },
        "PanSequenceNumber": {
          "type": "string",
          "description": "A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). If not used, enter 00."
        },
        "ApplicationTransactionCounter": {
          "type": "string",
          "description": "The transaction counter that the terminal provides during transaction processing. This value is in hexadecimal format. For example, enter a decimal counter of 109 as 006D."
        }
      },
      "required": [
        "PrimaryAccountNumber",
        "PanSequenceNumber",
        "ApplicationTransactionCounter"
      ]
    },
    "SessionKeyVisa": {
      "type": "object",
      "properties": {
        "PrimaryAccountNumber": {
          "type": "string",
          "description": "The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."
        },
        "PanSequenceNumber": {
          "type": "string",
          "description": "A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."
        }
      },
      "required": [
        "PrimaryAccountNumber",
        "PanSequenceNumber"
      ]
    }
  }
}