@@ -251,7 +251,8 @@ export namespace AuthRule {
251251 | V2API . ConditionalACHActionParameters
252252 | V2API . ConditionalTokenizationActionParameters
253253 | V2API . ConditionalCardTransactionUpdateActionParameters
254- | V2API . TypescriptCodeParameters ;
254+ | V2API . TypescriptCodeParameters
255+ | V2API . ConditionalAuthorizationAdjustmentParameters ;
255256
256257 /**
257258 * The version of the rule, this is incremented whenever the rule's parameters
@@ -279,7 +280,8 @@ export namespace AuthRule {
279280 | V2API . ConditionalACHActionParameters
280281 | V2API . ConditionalTokenizationActionParameters
281282 | V2API . ConditionalCardTransactionUpdateActionParameters
282- | V2API . TypescriptCodeParameters ;
283+ | V2API . TypescriptCodeParameters
284+ | V2API . ConditionalAuthorizationAdjustmentParameters ;
283285
284286 /**
285287 * The state of the draft version. Most rules are created synchronously and the
@@ -387,7 +389,8 @@ export interface AuthRuleVersion {
387389 | ConditionalACHActionParameters
388390 | ConditionalTokenizationActionParameters
389391 | ConditionalCardTransactionUpdateActionParameters
390- | TypescriptCodeParameters ;
392+ | TypescriptCodeParameters
393+ | ConditionalAuthorizationAdjustmentParameters ;
391394
392395 /**
393396 * The current state of this version.
@@ -995,6 +998,261 @@ export namespace ConditionalAuthorizationActionParameters {
995998 }
996999}
9971000
1001+ export interface ConditionalAuthorizationAdjustmentParameters {
1002+ /**
1003+ * The hold adjustment to apply if the conditions are met
1004+ */
1005+ adjustment : ConditionalAuthorizationAdjustmentParameters . Adjustment ;
1006+
1007+ conditions : Array < ConditionalAuthorizationAdjustmentParameters . Condition > ;
1008+ }
1009+
1010+ export namespace ConditionalAuthorizationAdjustmentParameters {
1011+ /**
1012+ * The hold adjustment to apply if the conditions are met
1013+ */
1014+ export interface Adjustment {
1015+ /**
1016+ * The mode of the hold adjustment, determining how the value is interpreted:
1017+ *
1018+ * - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents.
1019+ * - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000
1020+ * represents a 10% increase, 0 represents no change.
1021+ * - `ADD_AMOUNT`: The value is added to the hold amount in cents.
1022+ */
1023+ mode : 'REPLACE_WITH_AMOUNT' | 'ADD_PERCENTAGE' | 'ADD_AMOUNT' ;
1024+
1025+ /**
1026+ * The type of adjustment to apply
1027+ */
1028+ type : 'HOLD_ADJUSTMENT' ;
1029+
1030+ /**
1031+ * The value used for the hold adjustment, interpreted based on the mode
1032+ */
1033+ value : number ;
1034+ }
1035+
1036+ export interface Condition {
1037+ /**
1038+ * The attribute to target.
1039+ *
1040+ * The following attributes may be targeted:
1041+ *
1042+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
1043+ * business by the types of goods or services it provides.
1044+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
1045+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
1046+ * Netherlands Antilles.
1047+ * - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
1048+ * the transaction.
1049+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
1050+ * (merchant).
1051+ * - `DESCRIPTOR`: Short description of card acceptor.
1052+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
1053+ * applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
1054+ * `TOKEN_AUTHENTICATED`.
1055+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
1056+ * (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
1057+ * `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
1058+ * `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
1059+ * `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
1060+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
1061+ * fee field in the settlement/cardholder billing currency. This is the amount
1062+ * the issuer should authorize against unless the issuer is paying the acquirer
1063+ * fee on behalf of the cardholder. Use an integer value.
1064+ * - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
1065+ * represents the amount of cash being withdrawn or advanced. Use an integer
1066+ * value.
1067+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
1068+ * given authorization. Scores are on a range of 0-999, with 0 representing the
1069+ * lowest risk and 999 representing the highest risk. For Visa transactions,
1070+ * where the raw score has a range of 0-99, Lithic will normalize the score by
1071+ * multiplying the raw score by 10x. Use an integer value.
1072+ * - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
1073+ * trailing 15 minutes before the authorization. Use an integer value.
1074+ * - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
1075+ * trailing hour up and until the authorization. Use an integer value.
1076+ * - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
1077+ * trailing 24 hours up and until the authorization. Use an integer value.
1078+ * - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in
1079+ * the trailing 15 minutes before the authorization. Use an integer value.
1080+ * - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in
1081+ * the trailing hour up and until the authorization. Use an integer value.
1082+ * - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in
1083+ * the trailing 24 hours up and until the authorization. Use an integer value.
1084+ * - `CARD_STATE`: The current state of the card associated with the transaction.
1085+ * Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
1086+ * `PENDING_FULFILLMENT`.
1087+ * - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
1088+ * Valid values are `TRUE`, `FALSE`.
1089+ * - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
1090+ * `OK`, `BLOCKED`.
1091+ * - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
1092+ * source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
1093+ * `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
1094+ * - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates
1095+ * the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`.
1096+ * - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
1097+ * data with the cardholder KYC data if it exists. Valid values are `MATCH`,
1098+ * `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
1099+ * - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
1100+ * cardholder received the service, e.g. "NY". When a service location is present
1101+ * in the network data, the service location state is used. Otherwise, falls back
1102+ * to the card acceptor state.
1103+ * - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
1104+ * the service, e.g. "10001". When a service location is present in the network
1105+ * data, the service location postal code is used. Otherwise, falls back to the
1106+ * card acceptor postal code.
1107+ * - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
1108+ * Use an integer value.
1109+ * - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
1110+ * of the authorization. Use an integer value. For programs where Lithic does not
1111+ * manage or retain account holder data, this attribute does not evaluate.
1112+ * - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the
1113+ * entity's transaction history. Null if fewer than 30 approved transactions in
1114+ * the specified window. Requires `parameters.scope` and `parameters.interval`.
1115+ * Use a decimal value.
1116+ * - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the
1117+ * entity over the specified window, in cents. Requires `parameters.scope` and
1118+ * `parameters.interval`. Use a decimal value.
1119+ * - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction
1120+ * amounts for the entity over the specified window, in cents. Null if fewer than
1121+ * 30 approved transactions in the specified window. Requires `parameters.scope`
1122+ * and `parameters.interval`. Use a decimal value.
1123+ * - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen
1124+ * in the entity's transaction history. Valid values are `TRUE`, `FALSE`.
1125+ * Requires `parameters.scope`.
1126+ * - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's
1127+ * transaction history. Valid values are `TRUE`, `FALSE`. Requires
1128+ * `parameters.scope`.
1129+ * - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity.
1130+ * Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`.
1131+ * - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for
1132+ * the entity over the last 30 days (rolling). Requires `parameters.scope`. Not
1133+ * supported for `BUSINESS_ACCOUNT` scope. Use an integer value.
1134+ * - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved
1135+ * transaction for the entity, rounded to the nearest whole day. Requires
1136+ * `parameters.scope`. Use an integer value.
1137+ * - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in
1138+ * the entity's transaction history. Requires `parameters.scope`. Use an integer
1139+ * value.
1140+ * - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the
1141+ * card's approved transaction history (capped at the 1000 most recently seen
1142+ * merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no
1143+ * `parameters` required.
1144+ * - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as
1145+ * a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required.
1146+ * Use a decimal value.
1147+ * - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
1148+ * between the postal code centers of the last card-present transaction and the
1149+ * current transaction, divided by the elapsed time. Null if there is no prior
1150+ * card-present transaction, if either postal code cannot be geocoded, or if
1151+ * elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a
1152+ * decimal value.
1153+ * - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
1154+ * code centers of the last card-present transaction and the current transaction.
1155+ * Null if there is no prior card-present transaction or if either postal code
1156+ * cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
1157+ * Use a decimal value.
1158+ */
1159+ attribute :
1160+ | 'MCC'
1161+ | 'COUNTRY'
1162+ | 'CURRENCY'
1163+ | 'MERCHANT_ID'
1164+ | 'DESCRIPTOR'
1165+ | 'LIABILITY_SHIFT'
1166+ | 'PAN_ENTRY_MODE'
1167+ | 'TRANSACTION_AMOUNT'
1168+ | 'CASH_AMOUNT'
1169+ | 'RISK_SCORE'
1170+ | 'CARD_TRANSACTION_COUNT_15M'
1171+ | 'CARD_TRANSACTION_COUNT_1H'
1172+ | 'CARD_TRANSACTION_COUNT_24H'
1173+ | 'CARD_DECLINE_COUNT_15M'
1174+ | 'CARD_DECLINE_COUNT_1H'
1175+ | 'CARD_DECLINE_COUNT_24H'
1176+ | 'CARD_STATE'
1177+ | 'PIN_ENTERED'
1178+ | 'PIN_STATUS'
1179+ | 'WALLET_TYPE'
1180+ | 'TRANSACTION_INITIATOR'
1181+ | 'ADDRESS_MATCH'
1182+ | 'SERVICE_LOCATION_STATE'
1183+ | 'SERVICE_LOCATION_POSTAL_CODE'
1184+ | 'CARD_AGE'
1185+ | 'ACCOUNT_AGE'
1186+ | 'AMOUNT_Z_SCORE'
1187+ | 'AVG_TRANSACTION_AMOUNT'
1188+ | 'STDEV_TRANSACTION_AMOUNT'
1189+ | 'IS_NEW_COUNTRY'
1190+ | 'IS_NEW_MCC'
1191+ | 'IS_FIRST_TRANSACTION'
1192+ | 'CONSECUTIVE_DECLINES'
1193+ | 'TIME_SINCE_LAST_TRANSACTION'
1194+ | 'DISTINCT_COUNTRY_COUNT'
1195+ | 'IS_NEW_MERCHANT'
1196+ | 'THREE_DS_SUCCESS_RATE'
1197+ | 'TRAVEL_SPEED'
1198+ | 'DISTANCE_FROM_LAST_TRANSACTION' ;
1199+
1200+ /**
1201+ * The operation to apply to the attribute
1202+ */
1203+ operation : V2API . ConditionalOperation ;
1204+
1205+ /**
1206+ * A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
1207+ */
1208+ value : V2API . ConditionalValue ;
1209+
1210+ /**
1211+ * Additional parameters for certain attributes. Required when `attribute` is one
1212+ * of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
1213+ * `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
1214+ * `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
1215+ * `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
1216+ * for other attributes.
1217+ */
1218+ parameters ?: Condition . Parameters ;
1219+ }
1220+
1221+ export namespace Condition {
1222+ /**
1223+ * Additional parameters for certain attributes. Required when `attribute` is one
1224+ * of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
1225+ * `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
1226+ * `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or
1227+ * `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used
1228+ * for other attributes.
1229+ */
1230+ export interface Parameters {
1231+ /**
1232+ * The time window for statistical attributes (`AMOUNT_Z_SCORE`,
1233+ * `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for
1234+ * all-time history or a specific window (`7D`, `30D`, `90D`).
1235+ */
1236+ interval ?: 'LIFETIME' | '7D' | '30D' | '90D' ;
1237+
1238+ /**
1239+ * The entity scope to evaluate the attribute against.
1240+ */
1241+ scope ?: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' ;
1242+
1243+ /**
1244+ * The unit for impossible travel attributes. Required when `attribute` is
1245+ * `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.
1246+ *
1247+ * For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).
1248+ *
1249+ * For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
1250+ */
1251+ unit ?: 'MPH' | 'KPH' | 'MILES' | 'KILOMETERS' ;
1252+ }
1253+ }
1254+ }
1255+
9981256/**
9991257 * @deprecated Deprecated: Use CONDITIONAL_ACTION instead.
10001258 */
@@ -2514,7 +2772,8 @@ export declare namespace V2CreateParams {
25142772 | ConditionalACHActionParameters
25152773 | ConditionalTokenizationActionParameters
25162774 | ConditionalCardTransactionUpdateActionParameters
2517- | TypescriptCodeParameters ;
2775+ | TypescriptCodeParameters
2776+ | ConditionalAuthorizationAdjustmentParameters ;
25182777
25192778 /**
25202779 * The type of Auth Rule. For certain rule types, this determines the event stream
@@ -2573,7 +2832,8 @@ export declare namespace V2CreateParams {
25732832 | ConditionalACHActionParameters
25742833 | ConditionalTokenizationActionParameters
25752834 | ConditionalCardTransactionUpdateActionParameters
2576- | TypescriptCodeParameters ;
2835+ | TypescriptCodeParameters
2836+ | ConditionalAuthorizationAdjustmentParameters ;
25772837
25782838 /**
25792839 * The type of Auth Rule. For certain rule types, this determines the event stream
@@ -2617,7 +2877,8 @@ export declare namespace V2CreateParams {
26172877 | ConditionalACHActionParameters
26182878 | ConditionalTokenizationActionParameters
26192879 | ConditionalCardTransactionUpdateActionParameters
2620- | TypescriptCodeParameters ;
2880+ | TypescriptCodeParameters
2881+ | ConditionalAuthorizationAdjustmentParameters ;
26212882
26222883 /**
26232884 * Whether the Auth Rule applies to all authorizations on the card program.
@@ -2808,6 +3069,7 @@ export interface V2DraftParams {
28083069 | ConditionalTokenizationActionParameters
28093070 | ConditionalCardTransactionUpdateActionParameters
28103071 | TypescriptCodeParameters
3072+ | ConditionalAuthorizationAdjustmentParameters
28113073 | null ;
28123074}
28133075
@@ -2872,6 +3134,7 @@ export declare namespace V2 {
28723134 type ConditionalACHActionParameters as ConditionalACHActionParameters ,
28733135 type ConditionalAttribute as ConditionalAttribute ,
28743136 type ConditionalAuthorizationActionParameters as ConditionalAuthorizationActionParameters ,
3137+ type ConditionalAuthorizationAdjustmentParameters as ConditionalAuthorizationAdjustmentParameters ,
28753138 type ConditionalBlockParameters as ConditionalBlockParameters ,
28763139 type ConditionalCardTransactionUpdateActionParameters as ConditionalCardTransactionUpdateActionParameters ,
28773140 type ConditionalOperation as ConditionalOperation ,
0 commit comments