{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/idenfy/main/json-schema/idenfy-bank-card-token-request-schema.json",
  "title": "BankCardTokenRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/idenfy-bank-card-verification-api-openapi.yml#/components/schemas/BankCardTokenRequest",
  "type": "object",
  "properties": {
    "expectedName": {
      "type": "string",
      "description": "The cardholder name the card is compared against."
    },
    "expectedLastFour": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 4,
      "maxLength": 4,
      "description": "The expected last four digits of the card number. When omitted, only the cardholder name is compared."
    },
    "lifetime": {
      "type": "integer",
      "maximum": 2592000,
      "minimum": 0,
      "writeOnly": true,
      "default": 3600,
      "description": "The duration in seconds of bank card verification token validity. This clock starts when the session is created."
    },
    "sessionLength": {
      "type": [
        "integer",
        "null"
      ],
      "maximum": 60,
      "minimum": 1,
      "description": "The capture countdown in minutes. This clock is independent of `lifetime` and starts at the capture step, not when the link is opened."
    },
    "theme": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name of a personalisation theme configured on your account."
    },
    "generateMobileCode": {
      "type": "boolean",
      "default": false,
      "description": "When `true`, the response includes a `mobileCode` the end user can enter in the iDenfy mobile app."
    },
    "successUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Where the end user is redirected after a successful check."
    },
    "failUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Where the end user is redirected after an unsuccessful check. An expired session never redirects."
    }
  },
  "required": [
    "expectedName"
  ]
}