> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Payment Rules API

> 결제 규칙(Payment Rule)을 사용하면 계정이 자체 결제가 은행에 도달하기 전에 조치를 취할 수 있습니다. 결제를 차단하거나, 통과시키거나, 검토로 보내거나, 구매자에게 3D Secure를 요청할 수 있습니다.

각 규칙은 소수의 결제 속성을 기준으로 일치 여부를 판단하며, 규칙이 적용되려면 모든 조건이 충족되어야 합니다.

규칙의 정의는 생성된 후 고정되므로, 규칙이 결정한 결제는 계속해서 해당 규칙을 참조합니다. 규칙을 변경하려면 [교체](https://docs.whop.com/ko/api-reference/payment-rules/replace-a-payment-rule.md)를 사용하고, 조건에 사용할 수 있는 속성, 연산자, 값은 [필드 목록 조회](https://docs.whop.com/ko/api-reference/payment-rules/list-fields.md)를 참고하세요.

사기를 줄이기 위해 체크아웃을 차단, 검토, 챌린지, 허용하는 방법에 대한 안내는 [사기 관리](https://docs.whop.com/ko/developer/guides/manage-fraud.md) 가이드를 참고하세요.

> [!WARNING]
>
> `review` 규칙은 레거시 임베드를 캡처될 때까지 **Processing**
> 상태로 둘 수 있습니다. 자동 캡처는 승인 후 48시간으로 예약되지만, 완료까지
> 더 오래 걸리거나 실패할 수 있습니다. 검토 규칙은 계정 전체에 적용되며 레거시
> 임베드에도 계속 적용됩니다. 활성화하기 전에 [검토 보류 대상 및 체크아웃
> 제한 사항](https://docs.whop.com/ko/developer/guides/manage-fraud.md#review-a-payment-before-charging-it)을
> 확인하세요.

## 엔드포인트

| 엔드포인트 | 요청 |
| - | - |
| [결제 규칙 목록 조회](https://docs.whop.com/ko/api-reference/payment-rules/list-payment-rules.md) | GET `/payment_rules` |
| [결제 규칙 조회](https://docs.whop.com/ko/api-reference/payment-rules/retrieve-a-payment-rule.md) | GET `/payment_rules/{id}` |
| [필드 목록 조회](https://docs.whop.com/ko/api-reference/payment-rules/list-fields.md) | GET `/payment_rules/fields` |
| [결제 규칙 생성](https://docs.whop.com/ko/api-reference/payment-rules/create-a-payment-rule.md) | POST `/payment_rules` |
| [결제 규칙 활성화](https://docs.whop.com/ko/api-reference/payment-rules/activate-a-payment-rule.md) | POST `/payment_rules/{id}/activate` |
| [결제 규칙 비활성화](https://docs.whop.com/ko/api-reference/payment-rules/deactivate-a-payment-rule.md) | POST `/payment_rules/{id}/deactivate` |
| [결제 규칙 교체](https://docs.whop.com/ko/api-reference/payment-rules/replace-a-payment-rule.md) | POST `/payment_rules/{id}/replace` |
| [결제 규칙 업데이트](https://docs.whop.com/ko/api-reference/payment-rules/update-a-payment-rule.md) | PATCH `/payment_rules/{id}` |
| [결제 규칙 삭제](https://docs.whop.com/ko/api-reference/payment-rules/delete-a-payment-rule.md) | DELETE `/payment_rules/{id}` |

## 속성

**id** `string` *required*

결제 규칙 ID로, 접두사는 `prule_`입니다.

**account\_id** `string` *required*

계정 ID로, 접두사는 `biz_`입니다.

**action** `string` *required*

모든 조건이 일치할 때 이 계정의 규칙이 요청하는 동작입니다. 적용 가능한 계정 규칙 동작 중 하나가 `allow`, `block`, `review`, `enforce_3ds` 순서로 우선합니다. `allow`는 이 계정의 다른 규칙보다 우선하지만, Whop 자체 사기 방지 제어보다 우선하지는 않습니다. `review`는 Whop Payments를 통한 대상 온세션 카드 결제에 대해 캡처 없이 승인을 요청합니다. 자동 캡처는 승인 후 48시간으로 예약되며, 더 빨리 결정하려면 그 전에 결제를 캡처하거나 무효화하세요. 캡처는 나중에 완료되거나 실패할 수 있습니다. 지원되지 않는 결제 수단, 오프세션 결제, 이미 수동 캡처로 구성된 결제에는 검토가 건너뛰어집니다. 계정 규칙이 챌린지를 적용할 수 없는 경우 `enforce_3ds`는 건너뛰어집니다. 다른 3DS 요구 사항은 계속 적용됩니다.

사용 가능한 옵션: `allow`, `block`, `review`, `enforce_3ds`

**conditions** `object` *required*

결제와 대조할 조건입니다. 최대 10개의 조건, 직렬화 시 8 KiB까지 가능합니다.

> [accordion] 속성
>
> **all** `object[]` *required*
>
> 규칙이 적용되려면 모두 일치해야 하는 조건입니다. 규칙이 읽을 수 없는 결제 속성은 일치하지 않는 것으로 간주됩니다.
>
> > [accordion] 속성
> >
> > **field** `string` *required*
> >
> > 이 조건이 읽는 결제 속성입니다.
> >
> > 사용 가능한 옵션: `risk_score`, `amount_in_usd`, `card_country`, `card_brand`, `card_funding`, `card_bin`, `billing_country`, `billing_postal_code`, `billing_city`, `customer_email`, `email_domain`, `ip_address`, `ip_country`
> >
> > **operator** `string` *required*
> >
> > 결제 속성을 값과 비교하는 방법입니다.
> >
> > 사용 가능한 옵션: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `not_in`, `starts_with`, `contains`, `ends_with`, `in_cidr`
> >
> > **value** `number or string or string[]` *required*
> >
> > 비교할 값입니다.

**created\_at** `string` *required*

규칙이 생성된 시점으로, ISO 8601 타임스탬프입니다.

**deleted\_at** `string | null` *required*

규칙이 삭제된 시점으로, ISO 8601 타임스탬프입니다. `status`가 `deleted`가
아니면 `null`입니다.

**metadata** `object` *required*

통합에 사용하는 사용자 지정 문자열-문자열 값입니다. 최대 50개의 키, 키당 40자,
값당 500자까지 가능합니다.

**name** `string` *required*

이 규칙의 이름입니다. 최대 255자입니다.

**status** `string` *required*

규칙이 결제에 적용되는지 여부입니다. `deleted` 규칙은 이미 결정한 결제가 계속 해당 규칙을 참조할 수 있도록 보존됩니다.

사용 가능한 옵션: `active`, `inactive`, `deleted`

**updated\_at** `string` *required*

규칙이 마지막으로 변경된 시점으로, ISO 8601 타임스탬프입니다.

```json PaymentRule theme={null}
{
	"id": "prule_xxxxxxxxxxxxx",
	"account_id": "biz_xxxxxxxxxxxxxx",
	"name": "Block high-risk cards from outside the US",
	"status": "active",
	"action": "block",
	"conditions": {
		"all": [
			{
				"field": "risk_score",
				"operator": "gte",
				"value": 85
			},
			{
				"field": "card_country",
				"operator": "neq",
				"value": "US"
			}
		]
	},
	"metadata": {},
	"created_at": "2026-09-01T12:00:00.000Z",
	"updated_at": "2026-09-01T12:00:00.000Z",
	"deleted_at": null
}
```
