Skip to main content
POST
Create a payment rule

Authorizations

Authorization
string
header
required

An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.

Headers

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Example:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-09-15"

Body

application/json
action
enum<string>
required

What happens to a payment when every condition matches. An allow overrides this account's other rules only, never Whop's own fraud controls. An enforce_3ds is skipped where the payment cannot carry a challenge.

Available options:
allow,
block,
enforce_3ds
Example:

"block"

conditions
object
required

The conditions a payment is matched against. Up to 10 conditions, and 8 KiB once serialized.

name
string
required

A name for this rule. Up to 255 characters.

Required string length: 1 - 255
Example:

"Block high risk"

account_id
string

The account to create the rule on. Defaults to the account the request is acting for.

Example:

"biz_xxxxxxxxxxxxxx"

metadata
object

Custom string-to-string values for your integration. Maximum 50 keys, 40 characters per key, 500 characters per value.

Example:

Response

The created rule

account_id
string
required

Account ID, prefixed biz_.

Example:

"biz_xxxxxxxxxxxxxx"

action
enum<string>
required

What happens to a payment when every condition matches. An allow overrides this account's other rules only, never Whop's own fraud controls. An enforce_3ds is skipped where the payment cannot carry a challenge.

Available options:
allow,
block,
enforce_3ds
Example:

"block"

conditions
object
required

The conditions a payment is matched against. Up to 10 conditions, and 8 KiB once serialized.

created_at
string
required

When the rule was created, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

deleted_at
string | null
required

When the rule was deleted, as an ISO 8601 timestamp. null unless status is deleted.

id
string
required

Payment rule ID, prefixed prule_.

Example:

"prule_xxxxxxxxxxxxxx"

metadata
object
required

Custom string-to-string values for your integration. Maximum 50 keys, 40 characters per key, 500 characters per value.

Example:
name
string
required

A name for this rule. Up to 255 characters.

Example:

"Block high risk"

status
enum<string>
required

Whether the rule is applied to payments. A deleted rule is kept so the payments it already decided still name it.

Available options:
active,
inactive,
deleted
Example:

"active"

updated_at
string
required

When the rule was last changed, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"