{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/rule-feature", "title": "Rule Feature", "description": "A feature made available to the rule. The `name` field is the variable name used in the rule function signature. The `type` field determines which data the feature provides to the rule at evaluation time.\n\n- `AUTHORIZATION`: The authorization request being evaluated. Only available for AUTHORIZATION event stream rules.\n- `AUTHENTICATION`: The 3DS authentication request being evaluated. Only available for THREE_DS_AUTHENTICATION event stream rules.\n- `TOKENIZATION`: The tokenization request being evaluated. Only available for TOKENIZATION event stream rules.\n- `ACH_RECEIPT`: The ACH receipt being evaluated. Only available for ACH_CREDIT_RECEIPT and ACH_DEBIT_RECEIPT event stream rules.\n- `CARD`: The card associated with the event. Available for AUTHORIZATION and THREE_DS_AUTHENTICATION event stream rules.\n- `ACCOUNT_HOLDER`: The account holder associated with the card. Available for AUTHORIZATION and THREE_DS_AUTHENTICATION event stream rules.\n- `IP_METADATA`: IP address metadata for the request. Available for THREE_DS_AUTHENTICATION event stream rules.\n- `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires `scope`, `period`, and optionally `filters` to configure the velocity calculation. Available for AUTHORIZATION event stream rules.\n- `TRANSACTION_HISTORY_SIGNALS`: Behavioral feature state derived from the entity's transaction history. Requires `scope` to specify whether to load card, account, or business account history. Available for AUTHORIZATION event stream rules.", "allOf": [ { "type": "object", "properties": { "name": { "type": "string", "description": "The variable name for this feature in the rule function signature" } }, "required": [ "name" ] }, { "oneOf": [ { "title": "Authorization Feature", "type": "object", "properties": { "type": { "type": "string", "const": "AUTHORIZATION" } }, "required": [ "type" ] }, { "title": "Authentication Feature", "type": "object", "properties": { "type": { "type": "string", "const": "AUTHENTICATION" } }, "required": [ "type" ] }, { "title": "Tokenization Feature", "type": "object", "properties": { "type": { "type": "string", "const": "TOKENIZATION" } }, "required": [ "type" ] }, { "title": "ACH Receipt Feature", "type": "object", "properties": { "type": { "type": "string", "const": "ACH_RECEIPT" } }, "required": [ "type" ] }, { "title": "Card Feature", "type": "object", "properties": { "type": { "type": "string", "const": "CARD" } }, "required": [ "type" ] }, { "title": "Account Holder Feature", "type": "object", "properties": { "type": { "type": "string", "const": "ACCOUNT_HOLDER" } }, "required": [ "type" ] }, { "title": "IP Metadata Feature", "type": "object", "properties": { "type": { "type": "string", "const": "IP_METADATA" } }, "required": [ "type" ] }, { "title": "Spend Velocity Feature", "type": "object", "properties": { "type": { "type": "string", "const": "SPEND_VELOCITY" }, "scope": { "$ref": "#/components/schemas/velocity-scope" }, "period": { "$ref": "#/components/schemas/velocity-limit-period" }, "filters": { "$ref": "#/components/schemas/velocity-limit-filters" } }, "required": [ "type", "scope", "period" ] }, { "title": "Transaction History Signals Feature", "type": "object", "properties": { "type": { "type": "string", "const": "TRANSACTION_HISTORY_SIGNALS" }, "scope": { "type": "string", "description": "The entity scope to load transaction history signals for.", "enum": [ "CARD", "ACCOUNT", "BUSINESS_ACCOUNT" ] } }, "required": [ "type", "scope" ] } ], "discriminator": { "propertyName": "type" } } ] }