{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/signals-response", "title": "Signals Response", "description": "Behavioral feature state for a card or account derived from its transaction history.\n\nDerived statistical features (averages, standard deviations, z-scores) are computed using Welford's online algorithm over approved transactions. Average fields are null when fewer than 5 approved transactions have been recorded. Standard deviation fields are null when fewer than 30 approved transactions have been recorded.\n\n3DS fields (`three_ds_success_rate`, `three_ds_success_count`, `three_ds_total_count`) are card-scoped and will be null for account responses.\n\nRaw fields (`seen_countries`, `seen_mccs`, `approved_txn_amount_m2`, etc.) are included so clients can compute their own transaction-specific derivations, such as checking whether a new transaction's country is in `seen_countries` to determine `is_new_country`, or computing a z-score using the raw mean and M2 values.", "type": "object", "properties": { "avg_transaction_amount": { "type": [ "number", "null" ], "description": "The average approved transaction amount over the entity's lifetime, in cents. Null if fewer than 5 approved transactions have been recorded." }, "stdev_transaction_amount": { "type": [ "number", "null" ], "description": "The standard deviation of approved transaction amounts over the entity's lifetime, in cents. Null if fewer than 30 approved transactions have been recorded." }, "approved_txn_count": { "type": [ "integer", "null" ], "description": "The total number of approved transactions over the entity's lifetime." }, "avg_transaction_amount_7d": { "type": [ "number", "null" ], "description": "The average approved transaction amount over the last 7 days, in cents. Null if fewer than 5 approved transactions in window." }, "stdev_transaction_amount_7d": { "type": [ "number", "null" ], "description": "The standard deviation of approved transaction amounts over the last 7 days, in cents. Null if fewer than 30 approved transactions in window." }, "approved_txn_count_7d": { "type": [ "integer", "null" ], "description": "The number of approved transactions in the last 7 days." }, "avg_transaction_amount_30d": { "type": [ "number", "null" ], "description": "The average approved transaction amount over the last 30 days, in cents. Null if fewer than 5 approved transactions in window." }, "stdev_transaction_amount_30d": { "type": [ "number", "null" ], "description": "The standard deviation of approved transaction amounts over the last 30 days, in cents. Null if fewer than 30 approved transactions in window." }, "approved_txn_count_30d": { "type": [ "integer", "null" ], "description": "The number of approved transactions in the last 30 days." }, "avg_transaction_amount_90d": { "type": [ "number", "null" ], "description": "The average approved transaction amount over the last 90 days, in cents. Null if fewer than 5 approved transactions in window." }, "stdev_transaction_amount_90d": { "type": [ "number", "null" ], "description": "The standard deviation of approved transaction amounts over the last 90 days, in cents. Null if fewer than 30 approved transactions in window." }, "approved_txn_count_90d": { "type": [ "integer", "null" ], "description": "The number of approved transactions in the last 90 days." }, "is_first_transaction": { "type": [ "boolean", "null" ], "description": "Whether the entity has no prior transaction history. Returns true if no history is found. Null if transaction history exists but a first transaction timestamp is unavailable." }, "time_since_last_transaction_days": { "type": [ "number", "null" ], "description": "The number of days since the last approved transaction on the entity." }, "three_ds_success_rate": { "type": [ "number", "null" ], "description": "The 3DS authentication success rate for the card, as a percentage from 0.0 to 100.0. Null for account responses." }, "distinct_country_count": { "type": [ "integer", "null" ], "description": "The number of distinct merchant countries seen in the entity's transaction history." }, "distinct_mcc_count": { "type": [ "integer", "null" ], "description": "The number of distinct MCCs seen in the entity's transaction history." }, "seen_countries": { "type": [ "array", "null" ], "items": { "type": "string" }, "description": "The set of merchant countries seen in the entity's transaction history. Clients can use this to determine whether a new transaction's country is novel (i.e. compute `is_new_country`)." }, "seen_mccs": { "type": [ "array", "null" ], "items": { "type": "string" }, "description": "The set of MCCs seen in the entity's transaction history. Clients can use this to determine whether a new transaction's MCC is novel (i.e. compute `is_new_mcc`)." }, "seen_merchants": { "type": [ "array", "null" ], "items": { "type": "string" }, "description": "The set of card acceptor IDs seen in the card's approved transaction history, capped at the 1000 most recently seen. Null for account responses. Clients can use this to determine whether a new transaction's merchant is novel (i.e. compute `is_new_merchant`)." }, "first_txn_at": { "type": [ "string", "null" ], "format": "date-time", "description": "The timestamp of the first approved transaction for the entity, in ISO 8601 format." }, "last_txn_approved_at": { "type": [ "string", "null" ], "format": "date-time", "description": "The timestamp of the most recent approved transaction for the entity, in ISO 8601 format." }, "last_cp_country": { "type": [ "string", "null" ], "description": "The merchant country of the last card-present transaction. Clients can use this together with `last_cp_timestamp` to detect impossible travel." }, "last_cp_postal_code": { "type": [ "string", "null" ], "description": "The merchant postal code of the last card-present transaction." }, "last_cp_timestamp": { "type": [ "string", "null" ], "format": "date-time", "description": "The timestamp of the last card-present transaction, in ISO 8601 format." }, "approved_txn_amount_m2": { "type": [ "number", "null" ], "description": "The Welford M2 accumulator for lifetime approved transaction amounts. Used together with `avg_transaction_amount` and `approved_txn_count` to compute the z-score of a new transaction amount (variance = M2 / (count - 1))." }, "approved_txn_amount_m2_7d": { "type": [ "number", "null" ], "description": "The Welford M2 accumulator for approved transaction amounts over the last 7 days." }, "approved_txn_amount_m2_30d": { "type": [ "number", "null" ], "description": "The Welford M2 accumulator for approved transaction amounts over the last 30 days." }, "approved_txn_amount_m2_90d": { "type": [ "number", "null" ], "description": "The Welford M2 accumulator for approved transaction amounts over the last 90 days." }, "three_ds_success_count": { "type": [ "integer", "null" ], "description": "The number of successful 3DS authentications for the card. Null for account responses." }, "three_ds_total_count": { "type": [ "integer", "null" ], "description": "The total number of 3DS authentication attempts for the card. Null for account responses." } }, "required": [ "avg_transaction_amount", "stdev_transaction_amount", "approved_txn_count", "avg_transaction_amount_7d", "stdev_transaction_amount_7d", "approved_txn_count_7d", "avg_transaction_amount_30d", "stdev_transaction_amount_30d", "approved_txn_count_30d", "avg_transaction_amount_90d", "stdev_transaction_amount_90d", "approved_txn_count_90d", "is_first_transaction", "time_since_last_transaction_days", "three_ds_success_rate", "distinct_country_count", "distinct_mcc_count", "seen_countries", "seen_mccs", "seen_merchants", "first_txn_at", "last_txn_approved_at", "last_cp_country", "last_cp_postal_code", "last_cp_timestamp", "approved_txn_amount_m2", "approved_txn_amount_m2_7d", "approved_txn_amount_m2_30d", "approved_txn_amount_m2_90d", "three_ds_success_count", "three_ds_total_count" ] }