Replace a payment rule
Changed onChanges a payment rule's action and conditions by deleting it and creating its successor in one step. The successor has a new ID and keeps the replaced rule's name, metadata, and active or inactive status.
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Path parameters
The payment rule ID.
Headers
Pins the request to a dated API version.
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
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 card payment through Whop Payments. Off-session renewals require off_session_payment_rules to be enabled. 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, numbered invoice 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. A rule on avs_check or cvv_check accepts block or review. Whop authorizes a freshly entered card first. When the rule matches the bank's result, block voids and declines the payment. A review holds it for you to capture or void, with the same automatic capture.
The conditions a payment is matched against. Up to 10 conditions, and 8 KiB once serialized.
Example request
{
"action": "review",
"conditions": {
"all": [
{
"field": "risk_score",
"operator": "gte",
"value": 70
}
]
}
}Response
The rule that replaced this one
Account ID, prefixed biz_.
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 card payment through Whop Payments. Off-session renewals require off_session_payment_rules to be enabled. 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, numbered invoice 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. A rule on avs_check or cvv_check accepts block or review. Whop authorizes a freshly entered card first. When the rule matches the bank's result, block voids and declines the payment. A review holds it for you to capture or void, with the same automatic capture.
The conditions a payment is matched against. Up to 10 conditions, and 8 KiB once serialized.
When the rule was created, as an ISO 8601 timestamp.
When the rule was deleted, as an ISO 8601 timestamp. null unless status is deleted.
Payment rule ID, prefixed prule_.
Custom string-to-string values for your integration. Maximum 50 keys, 40 characters per key, 500 characters per value.
A name for this rule. Up to 255 characters.
Whether the rule is applied to payments. A deleted rule is kept so the payments it already decided still name it.
When the rule was last changed, as an ISO 8601 timestamp.
Example response
{
"account_id": "biz_xxxxxxxxxxxxxx",
"action": "block",
"conditions": {
"all": [
{
"field": "amount_in_usd",
"operator": "gte"
}
]
},
"created_at": "2026-01-01T12:00:00.000Z",
"id": "prule_xxxxxxxxxxxxxx",
"metadata": {},
"name": "Block high risk",
"status": "active",
"updated_at": "2026-01-01T12:00:00.000Z"
}Changes
- breaking
removed the enum value
address_line1_checkof the request propertyconditions/all/items/field - breaking
removed the enum value
postal_code_checkof the request propertyconditions/all/items/field - warning
added the new
avs_checkenum value to theconditions/all/items/fieldresponse property for the response status
3 more changes in this revision
- breaking