{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/moov/json-schema/moov-issued-card-schema.json",
  "title": "IssuedCard",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/moov-card-issuing-api-openapi.yml#/components/schemas/IssuedCard",
  "type": "object",
  "required": [
    "issuedCardID",
    "brand",
    "lastFourCardNumber",
    "expiration",
    "fundingWalletID",
    "state",
    "formFactor",
    "createdOn",
    "updatedOn"
  ],
  "properties": {
    "issuedCardID": {
      "type": "string"
    },
    "brand": {
      "$ref": "#/$defs/CardBrand"
    },
    "lastFourCardNumber": {
      "type": "string"
    },
    "expiration": {
      "$ref": "#/$defs/CardExpiration"
    },
    "fundingWalletID": {
      "type": "string",
      "description": "Unique identifier for the wallet funding the card."
    },
    "authorizedUserAccountID": {
      "type": "string",
      "description": "Identifier for the account of the card's authorized user."
    },
    "nickname": {
      "type": "string",
      "description": "An optional descriptive name for the card."
    },
    "metadata": {
      "$ref": "#/$defs/Metadata"
    },
    "billingAddress": {
      "allOf": [
        {
          "$ref": "#/$defs/Address"
        }
      ],
      "description": "Billing address associated with the card."
    },
    "state": {
      "$ref": "#/$defs/IssuedCardState"
    },
    "formFactor": {
      "$ref": "#/$defs/IssuedCardFormFactor"
    },
    "controls": {
      "$ref": "#/$defs/IssuingControls"
    },
    "createdOn": {
      "type": "string",
      "format": "date-time"
    },
    "updatedOn": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "required": [
        "addressLine1",
        "city",
        "stateOrProvince",
        "postalCode",
        "country"
      ],
      "properties": {
        "addressLine1": {
          "type": "string",
          "maxLength": 60,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "addressLine2": {
          "type": "string",
          "maxLength": 32,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "city": {
          "type": "string",
          "maxLength": 32,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "stateOrProvince": {
          "type": "string",
          "maxLength": 2
        },
        "postalCode": {
          "type": "string",
          "maxLength": 5
        },
        "country": {
          "type": "string",
          "maxLength": 2
        }
      }
    },
    "CardBrand": {
      "type": "string",
      "enum": [
        "American Express",
        "Discover",
        "Mastercard",
        "Visa",
        "Unknown"
      ],
      "description": "The card brand."
    },
    "CardExpiration": {
      "type": "object",
      "required": [
        "month",
        "year"
      ],
      "properties": {
        "month": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "description": "Two-digit month the card expires."
        },
        "year": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "description": "Two-digit year the card expires."
        }
      },
      "description": "The expiration date of the card or token."
    },
    "IssuedCardFormFactor": {
      "type": "string",
      "enum": [
        "virtual"
      ],
      "description": "Specifies the type of spend card to be issued. Presently supports virtual only, providing a digital number without a physical card."
    },
    "IssuedCardState": {
      "type": "string",
      "enum": [
        "active",
        "frozen",
        "closed"
      ],
      "description": "The `state` represents the operational status of an issued card. A card can only approve incoming authorizations if it is in an active state.\n\n- `active`: The card is operational and can approve authorizations.\n- `frozen`: The card is temporarily suspended and cannot approve authorizations. A frozen card can be reactivated by setting its state back to `active`.\n- `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires."
    },
    "IssuingControls": {
      "type": "object",
      "properties": {
        "singleUse": {
          "type": "boolean",
          "description": "Indicates if the card is single-use. If true, the card closes after the first authorization."
        },
        "velocityLimits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IssuingVelocityLimit"
          },
          "description": "Sets the spending limit per time interval. Only one limit per interval is supported."
        }
      },
      "description": "Mutable spend controls for the card."
    },
    "IssuingIntervalLimit": {
      "type": "string",
      "enum": [
        "per-transaction"
      ],
      "description": "Specifies the time frame for a velocity limit. `per-transaction` applies to each individual authorization and never resets. Time-based intervals (where supported) reset at midnight ET."
    },
    "IssuingVelocityLimit": {
      "type": "object",
      "required": [
        "amount",
        "interval"
      ],
      "properties": {
        "amount": {
          "type": "integer",
          "format": "int64",
          "description": "The maximum amount in cents that can be spent in a given interval."
        },
        "interval": {
          "$ref": "#/$defs/IssuingIntervalLimit"
        }
      }
    },
    "Metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form key-value pair list. Useful for storing information that is not captured elsewhere."
    }
  }
}