{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woolworths-group/main/json-schema/woolworths-group-account-status-inquiry-request-schema.json",
  "title": "AccountStatusInquiryRequest",
  "x-generated": "2026-10-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woolworths-group-wpay-cards-connect-openapi.yml#/components/schemas/AccountStatusInquiryRequest",
  "required": [
    "cardDetailsEncrypted",
    "reconciliationId"
  ],
  "type": "object",
  "properties": {
    "reconciliationId": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string",
      "description": "An identifier that may be used to link authorization with subsequent operations for reconciliation purpose."
    },
    "paymentSource": {
      "$ref": "#/$defs/PaymentSource"
    },
    "cardDetails": {
      "oneOf": [
        {
          "$ref": "#/$defs/PanCardInformationDetails"
        },
        {
          "$ref": "#/$defs/NetworkTokenCardDetails"
        },
        {
          "$ref": "#/$defs/ApplePayWalletCardDetails"
        },
        {
          "$ref": "#/$defs/GooglePayWalletCardDetails"
        }
      ],
      "description": "Represents the payment credentials used for this transaction. This is a polymorphic object whose concrete shape is determined by cardType and may represent a PAN card, network token, or mobile wallet token (Apple Pay or Google Pay). Note that the encrypted contents of this field must be passed in the cardDetailsEncrypted field. All unencrypted card details will be rejected by the API. ",
      "nullable": true
    },
    "cardDetailsEncrypted": {
      "minLength": 1,
      "type": "string",
      "description": "This field contains the fields from CardDetails encrypted using the JWE technique specified in the encryption guide."
    },
    "webhookUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "Webhook URL that will be called by Cards Connect to deliver notifications about the status of the transaction."
    },
    "threeDSecureData": {
      "$ref": "#/$defs/ThreeDSecureData"
    },
    "threeDSecureDataEncrypted": {
      "type": [
        "string",
        "null"
      ],
      "description": "This field contains the fields from ThreeDSecureData encrypted using the JWE technique specified in the encryption guide."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ApplePayWalletCardDetails": {
      "required": [
        "cardType"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/PaymentInstrumentDetails"
        },
        {
          "required": [
            "tokenCryptogram"
          ],
          "type": "object",
          "properties": {
            "tokenCryptogram": {
              "maxLength": 64,
              "minLength": 0,
              "type": "string",
              "description": "A one-time cryptographic value used to ensure that the token is authorized for the transaction.This value must be standard Base64-encoded string up to 64 characters long.",
              "format": "byte"
            }
          },
          "additionalProperties": false
        }
      ],
      "properties": {
        "cardType": {
          "title": "ApplePay",
          "enum": [
            "ApplePay"
          ],
          "type": "string",
          "description": "Always `ApplePay`",
          "default": "ApplePay"
        }
      },
      "description": "Apple Pay mobile wallet token details for this transaction."
    },
    "GooglePayWalletCardDetails": {
      "required": [
        "cardType"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/PaymentInstrumentDetails"
        },
        {
          "required": [
            "tokenCryptogram"
          ],
          "type": "object",
          "properties": {
            "tokenCryptogram": {
              "maxLength": 64,
              "minLength": 0,
              "type": "string",
              "description": "A one-time cryptographic value used to ensure that the token is authorized for the transaction.This value must be standard Base64-encoded string up to 64 characters long.",
              "format": "byte"
            }
          },
          "additionalProperties": false
        }
      ],
      "properties": {
        "cardType": {
          "title": "GooglePay",
          "enum": [
            "GooglePay"
          ],
          "type": "string",
          "description": "Always `GooglePay`",
          "default": "GooglePay"
        }
      },
      "description": "Google Pay mobile wallet token details for this transaction."
    },
    "NetworkTokenCardDetails": {
      "required": [
        "cardType"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/PaymentInstrumentDetails"
        },
        {
          "type": "object",
          "properties": {
            "cvv": {
              "type": [
                "string",
                "null"
              ],
              "description": "The 3 or 4 digit security code often found on the card. This often referred to as the CVV or CVD."
            },
            "tokenRequestorId": {
              "type": [
                "string",
                "null"
              ],
              "description": "Numeric string up to 12 digits to identify the system that requested the token."
            },
            "tokenCryptogram": {
              "maxLength": 64,
              "minLength": 0,
              "type": [
                "string",
                "null"
              ],
              "description": "A one-time cryptographic value used to ensure that the token is authorized for the transaction.If provided, this value must be standard Base64-encoded string up to 64 characters long.",
              "format": "byte"
            }
          },
          "additionalProperties": false
        }
      ],
      "properties": {
        "cardType": {
          "title": "NetworkToken",
          "enum": [
            "NetworkToken"
          ],
          "type": "string",
          "description": "Always `NetworkToken`",
          "default": "NetworkToken"
        }
      },
      "description": "Network token details used for this transaction."
    },
    "PanCardInformationDetails": {
      "required": [
        "cardType"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/PaymentInstrumentDetails"
        },
        {
          "type": "object",
          "properties": {
            "cvv": {
              "type": [
                "string",
                "null"
              ],
              "description": "The 3 or 4 digit security code often found on the card. This often referred to as the CVV or CVD."
            }
          },
          "additionalProperties": false
        }
      ],
      "properties": {
        "cardType": {
          "title": "Card",
          "enum": [
            "Card"
          ],
          "type": "string",
          "description": "Always `Card`",
          "default": "Card"
        }
      },
      "description": "PAN card details used for this transaction."
    },
    "PaymentInstrumentDetails": {
      "required": [
        "cardNumber",
        "cardType",
        "expirationDate"
      ],
      "type": "object",
      "properties": {
        "cardType": {
          "type": "string"
        },
        "cardholderName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The cardholder’s name."
        },
        "cardNumber": {
          "minLength": 1,
          "type": "string",
          "description": "The 13-19 digit card number (PAN) or a tokenized card number (network token or wallet token), depending on the card type.",
          "format": "credit-card"
        },
        "expirationDate": {
          "minLength": 1,
          "type": "string",
          "description": "The expiration date of the card or token, depending on the card type. Formatted MM/YY."
        }
      },
      "additionalProperties": false,
      "description": "Represents the payment credentials used for this transaction. This is a polymorphic object whose concrete shape is determined by cardType and may represent a PAN card, network token, or mobile wallet token (Apple Pay or Google Pay). Note that the encrypted contents of this field must be passed in the cardDetailsEncrypted field. All unencrypted card details will be rejected by the API. "
    },
    "PaymentSource": {
      "enum": [
        "ECommerce",
        "Mail",
        "Telephone",
        "Recurring",
        "Installment",
        "CardOnFile"
      ],
      "type": "string",
      "description": "The source of the transaction. Default value is ECommerce"
    },
    "ThreeDSecureAuthenticationResponse": {
      "enum": [
        "Y",
        "N",
        "U",
        "A",
        "R"
      ],
      "type": "string"
    },
    "ThreeDSecureData": {
      "type": "object",
      "properties": {
        "version": {
          "type": [
            "string",
            "null"
          ],
          "description": "3D Secure version used during the transaction"
        },
        "cavv": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cardholder authentication values generated for the transaction"
        },
        "eci": {
          "type": [
            "string",
            "null"
          ],
          "description": "Electronic commerce indicator"
        },
        "directoryResponse": {
          "$ref": "#/$defs/ThreeDSecureDirectoryResponse"
        },
        "authenticationResponse": {
          "$ref": "#/$defs/ThreeDSecureAuthenticationResponse"
        },
        "directoryTransactionId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Directory server transaction identifier"
        },
        "xid": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique transaction identifier"
        }
      },
      "additionalProperties": false
    },
    "ThreeDSecureDirectoryResponse": {
      "enum": [
        "C",
        "Y",
        "A",
        "N",
        "R",
        "U"
      ],
      "type": "string"
    }
  }
}