import type * as Whop from "../../../../index.js"; /** * @example * { * id: "id", * action: "allow", * conditions: { * all: [{ * field: "risk_score", * operator: "gte", * value: 70 * }] * } * } */ export interface ReplacePaymentRulesRequest { /** The payment rule ID. */ id: string; /** What this account's rule requests when every condition matches. One applicable account-rule action wins, in this order: `allow`, `block`, `review`, `enforce_3ds`. An `allow` overrides this account's other rules, never Whop's own fraud controls. A `review` requests authorization without capture for an eligible on-session card payment through Whop Payments. Automatic capture is scheduled for 48 hours after authorization; capture or void the payment before then to decide sooner. Capture may complete later or fail. Review is skipped for unsupported methods, off-session payments, and payments already configured for manual capture. An `enforce_3ds` is skipped when the account rule cannot apply a challenge. Other 3DS requirements still apply. */ action: ReplacePaymentRulesRequest.Action; /** The conditions a payment is matched against. Up to 10 conditions, and 8 KiB once serialized. */ conditions: ReplacePaymentRulesRequest.Conditions; } export declare namespace ReplacePaymentRulesRequest { /** What this account's rule requests when every condition matches. One applicable account-rule action wins, in this order: `allow`, `block`, `review`, `enforce_3ds`. An `allow` overrides this account's other rules, never Whop's own fraud controls. A `review` requests authorization without capture for an eligible on-session card payment through Whop Payments. Automatic capture is scheduled for 48 hours after authorization; capture or void the payment before then to decide sooner. Capture may complete later or fail. Review is skipped for unsupported methods, off-session payments, and payments already configured for manual capture. An `enforce_3ds` is skipped when the account rule cannot apply a challenge. Other 3DS requirements still apply. */ const Action: { readonly Allow: "allow"; readonly Block: "block"; readonly Review: "review"; readonly Enforce3Ds: "enforce_3ds"; }; type Action = (typeof Action)[keyof typeof Action]; /** * The conditions a payment is matched against. Up to 10 conditions, and 8 KiB once serialized. */ interface Conditions { all: Conditions.All.Item[]; } namespace Conditions { type All = All.Item[]; namespace All { interface Item { /** The payment attribute this condition reads. */ field: Item.Field; /** How the payment attribute is compared to the value. */ operator: Item.Operator; value: Whop.PaymentRuleConditionValue; } namespace Item { /** The payment attribute this condition reads. */ const Field: { readonly RiskScore: "risk_score"; readonly AmountInUsd: "amount_in_usd"; readonly CardCountry: "card_country"; readonly CardBrand: "card_brand"; readonly CardFunding: "card_funding"; readonly CardBin: "card_bin"; readonly BillingCountry: "billing_country"; readonly BillingPostalCode: "billing_postal_code"; readonly BillingCity: "billing_city"; readonly CustomerEmail: "customer_email"; readonly EmailDomain: "email_domain"; readonly IpAddress: "ip_address"; readonly IpCountry: "ip_country"; }; type Field = (typeof Field)[keyof typeof Field]; /** How the payment attribute is compared to the value. */ const Operator: { readonly Eq: "eq"; readonly Neq: "neq"; readonly Gt: "gt"; readonly Gte: "gte"; readonly Lt: "lt"; readonly Lte: "lte"; readonly In: "in"; readonly NotIn: "not_in"; readonly StartsWith: "starts_with"; readonly Contains: "contains"; readonly EndsWith: "ends_with"; readonly InCidr: "in_cidr"; }; type Operator = (typeof Operator)[keyof typeof Operator]; } } } }