---
title: Monetization
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Monetization

##### ModelsExpand Collapse

<details>

<summary>

MonetizationAccountEligibilityCheckInput {acceptedTermsOfService }

</summary>

acceptedTermsOfService: true

Confirms acceptance of the Monetization Gateway terms of service.

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_input%20%3E%20(schema)%20%3E%20(property)%20acceptedTermsOfService">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_input%20%3E%20(schema)>)

<details>

<summary>

MonetizationAccountEligibilityCheckResponse {errors, messages, result, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code?: number

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message?: string

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code?: number

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message?: string

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

result: <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)">MonetizationEligibilityResult</a> {status, reasons }

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result">Link to this property</a>

success: true

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization%20%3E%20(model)%20monetization_account_eligibility_check_response%20%3E%20(schema)>)

<details>

<summary>

MonetizationEligibilityResponse {errors, messages, result, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code?: number

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message?: string

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code?: number

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message?: string

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

result: <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)">MonetizationEligibilityResult</a> {status, reasons }

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20result">Link to this property</a>

success: true

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_response%20%3E%20(schema)>)

<details>

<summary>

MonetizationEligibilityResult {status, reasons }

</summary>

<details>

<summary>

status: "pending"| "approved"| "rejected"

Current monetization eligibility decision.

</summary>

One of the following:

"pending"

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"approved"

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"rejected"

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

reasons?: Array&lt;string&gt;

Public, human-readable reasons for a rejected decision, when available.

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)%20%3E%20(property)%20reasons">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization%20%3E%20(model)%20monetization_eligibility_result%20%3E%20(schema)>)

<details>

<summary>

MonetizationZoneEligibilityCheckResponse {errors, messages, result, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code?: number

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message?: string

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code?: number

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message?: string

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

<details>

<summary>

result: Result {enabled, status, reasons }

</summary>

enabled: boolean

Whether this check successfully enabled the zone entitlement. Only approved decisions can enable it.

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

status: "pending"| "approved"| "rejected"

Current monetization eligibility decision.

</summary>

One of the following:

"pending"

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"approved"

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"rejected"

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result%20%3E%20(property)%20status">Link to this property</a>

reasons?: Array&lt;string&gt;

Public, human-readable reasons for a rejected decision, when available.

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result%20%3E%20(property)%20reasons">Link to this property</a>

</details>

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20result">Link to this property</a>

success: true

<a href="#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization%20%3E%20(model)%20monetization_zone_eligibility_check_response%20%3E%20(schema)>)

#### MonetizationRules

##### [List payment rules](https://developers.cloudflare.com/api/typescript/resources/monetization/subresources/rules/methods/get)

client.monetization.rules.get(RuleGetParams {zone\_id } params, RequestOptionsoptions?): [MonetizationRuleCollection](<https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)>) {rules }

GET/zones/{zone\_id}/monetization/rules

##### [Deploy payment ruleset](https://developers.cloudflare.com/api/typescript/resources/monetization/subresources/rules/methods/update)

client.monetization.rules.update(RuleUpdateParams {zone\_id, rules } params, RequestOptionsoptions?): [MonetizationRuleCollection](<https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)>) {rules }

PUT/zones/{zone\_id}/monetization/rules

##### [Delete all payment rules](https://developers.cloudflare.com/api/typescript/resources/monetization/subresources/rules/methods/delete)

client.monetization.rules.delete(RuleDeleteParams {zone\_id } params, RequestOptionsoptions?): [MonetizationRuleCollection](<https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)>) {rules }

DELETE/zones/{zone\_id}/monetization/rules

##### [Get a payment rule](https://developers.cloudflare.com/api/typescript/resources/monetization/subresources/rules/methods/get_rule)

client.monetization.rules.getRule(stringruleID, RuleGetRuleParams {zone\_id } params, RequestOptionsoptions?): [MonetizationRule](<https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)>)

GET/zones/{zone\_id}/monetization/rules/{rule\_id}

##### [Update a payment rule](https://developers.cloudflare.com/api/typescript/resources/monetization/subresources/rules/methods/edit_rule)

client.monetization.rules.editRule(stringruleID, RuleEditRuleParams {zone\_id, address, description, 4 more } params, RequestOptionsoptions?): [MonetizationRuleCollection](<https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)>) {rules }

PATCH/zones/{zone\_id}/monetization/rules/{rule\_id}

##### [Delete a payment rule](https://developers.cloudflare.com/api/typescript/resources/monetization/subresources/rules/methods/delete_rule)

client.monetization.rules.deleteRule(stringruleID, RuleDeleteRuleParams {zone\_id } params, RequestOptionsoptions?): [MonetizationRuleCollection](<https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)>) {rules }

DELETE/zones/{zone\_id}/monetization/rules/{rule\_id}

##### ModelsExpand Collapse

<details>

<summary>

MonetizationRule = MonetizationRulesMonetizationRuleInputFixedPrice {id } | MonetizationRulesMonetizationRuleInputOriginControlled {id }

Payment rule with a fixed price set at configuration time.

</summary>

One of the following:

<details>

<summary>

MonetizationRulesMonetizationRuleInputFixedPrice extends <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)">MonetizationRuleInputFixedPrice</a> {address, expression, price, 4 more } {id }

Payment rule with a fixed price set at configuration time.

</summary>

id: string

The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(entry)%201%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

MonetizationRulesMonetizationRuleInputOriginControlled extends <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)">MonetizationRuleInputOriginControlled</a> {address, expression, scheme, 3 more } {id }

Payment rule whose price the origin server sets dynamically. The rule carries no price and the price field must be omitted — any provided value, including “0”, is rejected because it would not be enforced.

</summary>

id: string

The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(entry)%201%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)>)

<details>

<summary>

MonetizationRuleCollection {rules }

The zone’s payment rules. Mirrors the shape of the ruleset submitted to the deploy endpoint, so the response can be read back as the desired state.

</summary>

<details>

<summary>

rules: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)">MonetizationRule</a>&gt;

The zone’s payment rules, in the order they are evaluated. Empty when the zone has no payment rules.

</summary>

One of the following:

<details>

<summary>

MonetizationRulesMonetizationRuleInputFixedPrice extends <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)">MonetizationRuleInputFixedPrice</a> {address, expression, price, 4 more } {id }

Payment rule with a fixed price set at configuration time.

</summary>

id: string

The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(entry)%201%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

MonetizationRulesMonetizationRuleInputOriginControlled extends <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)">MonetizationRuleInputOriginControlled</a> {address, expression, scheme, 3 more } {id }

Payment rule whose price the origin server sets dynamically. The rule carries no price and the price field must be omitted — any provided value, including “0”, is rejected because it would not be enforced.

</summary>

id: string

The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(entry)%201%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_collection%20%3E%20(schema)>)

<details>

<summary>

MonetizationRuleInput = <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)">MonetizationRuleInputFixedPrice</a> {address, expression, price, 4 more } | <a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)">MonetizationRuleInputOriginControlled</a> {address, expression, scheme, 3 more }

Payment rule with a fixed price set at configuration time.

</summary>

One of the following:

<details>

<summary>

MonetizationRuleInputFixedPrice {address, expression, price, 4 more }

Payment rule with a fixed price set at configuration time.

</summary>

address: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

expression: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

price: string

Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in \[1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes (“exact” and “upto”) and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is “origin\_controlled” the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including “0”, is rejected because it would not be enforced. Responses always encode this as a string and omit it for “origin\_controlled” rules; the pattern matches exactly the set of values the server accepts.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20price">Link to this property</a>

<details>

<summary>

scheme: "exact"| "upto"

X402 payment scheme. “exact” requires the specified payment amount; “upto” permits a payment up to the specified amount. Both fixed-price schemes require the price field.

</summary>

One of the following:

"exact"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

"upto"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

id?: string

Optional on input. Include the ID of an existing payment rule to update it in place, preserving its stable identity across the full-ruleset replacement; omit it to create a new rule. An ID that does not match an existing payment rule in the zone is rejected. Rules omitted from the request are deleted.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

MonetizationRuleInputOriginControlled {address, expression, scheme, 3 more }

Payment rule whose price the origin server sets dynamically. The rule carries no price and the price field must be omitted — any provided value, including “0”, is rejected because it would not be enforced.

</summary>

address: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

expression: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

scheme: "origin\_controlled"

X402 payment scheme. “origin\_controlled” lets the origin server set pricing dynamically; the rule carries no price and the price field must be omitted.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

id?: string

Optional on input. Include the ID of an existing payment rule to update it in place, preserving its stable identity across the full-ruleset replacement; omit it to create a new rule. An ID that does not match an existing payment rule in the zone is rejected. Rules omitted from the request are deleted.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input%20%3E%20(schema)>)

<details>

<summary>

MonetizationRuleInputFixedPrice {address, expression, price, 4 more }

Payment rule with a fixed price set at configuration time.

</summary>

address: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

expression: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

price: string

Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in \[1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes (“exact” and “upto”) and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is “origin\_controlled” the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including “0”, is rejected because it would not be enforced. Responses always encode this as a string and omit it for “origin\_controlled” rules; the pattern matches exactly the set of values the server accepts.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20price">Link to this property</a>

<details>

<summary>

scheme: "exact"| "upto"

X402 payment scheme. “exact” requires the specified payment amount; “upto” permits a payment up to the specified amount. Both fixed-price schemes require the price field.

</summary>

One of the following:

"exact"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

"upto"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

id?: string

Optional on input. Include the ID of an existing payment rule to update it in place, preserving its stable identity across the full-ruleset replacement; omit it to create a new rule. An ID that does not match an existing payment rule in the zone is rejected. Rules omitted from the request are deleted.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)>)

<details>

<summary>

MonetizationRuleInputOriginControlled {address, expression, scheme, 3 more }

Payment rule whose price the origin server sets dynamically. The rule carries no price and the price field must be omitted — any provided value, including “0”, is rejected because it would not be enforced.

</summary>

address: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

expression: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

scheme: "origin\_controlled"

X402 payment scheme. “origin\_controlled” lets the origin server set pricing dynamically; the rule carries no price and the price field must be omitted.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

id?: string

Optional on input. Include the ID of an existing payment rule to update it in place, preserving its stable identity across the full-ruleset replacement; omit it to create a new rule. An ID that does not match an existing payment rule in the zone is rejected. Rules omitted from the request are deleted.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)>)

<details>

<summary>

MonetizationRulePatch {address, description, enabled, 3 more }

Partial update to a single payment rule. Only the fields present are modified; omitted fields keep their existing values.

</summary>

address?: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The effective address must pass wallet screening whenever the rule is patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

expression?: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

price?: string

Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in \[1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes (“exact” and “upto”) and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is “origin\_controlled” the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including “0”, is rejected because it would not be enforced. Responses always encode this as a string and omit it for “origin\_controlled” rules; the pattern matches exactly the set of values the server accepts.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20price">Link to this property</a>

<details>

<summary>

scheme?: "exact"| "upto"| "origin\_controlled"

X402 payment scheme. “exact” requires the specified payment amount; “upto” permits a payment up to the specified amount; “origin\_controlled” lets the origin server set pricing dynamically, in which case the rule carries no price and the price field must be omitted.

</summary>

One of the following:

"exact"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

"upto"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

"origin\_controlled"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_patch%20%3E%20(schema)>)

<details>

<summary>

MonetizationRulesetInput {rules }

</summary>

<details>

<summary>

rules: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/monetization#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input%20%3E%20(schema)">MonetizationRuleInput</a>&gt;

Full desired Payment Required ruleset. An empty array clears all payment rules. The ruleset may contain at most 40 unique wallet addresses; address comparison is case-insensitive. Every address must pass wallet screening before deployment.

</summary>

One of the following:

<details>

<summary>

MonetizationRuleInputFixedPrice {address, expression, price, 4 more }

Payment rule with a fixed price set at configuration time.

</summary>

address: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

expression: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

price: string

Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in \[1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes (“exact” and “upto”) and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is “origin\_controlled” the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including “0”, is rejected because it would not be enforced. Responses always encode this as a string and omit it for “origin\_controlled” rules; the pattern matches exactly the set of values the server accepts.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20price">Link to this property</a>

<details>

<summary>

scheme: "exact"| "upto"

X402 payment scheme. “exact” requires the specified payment amount; “upto” permits a payment up to the specified amount. Both fixed-price schemes require the price field.

</summary>

One of the following:

"exact"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

"upto"

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

id?: string

Optional on input. Include the ID of an existing payment rule to update it in place, preserving its stable identity across the full-ruleset replacement; omit it to create a new rule. An ID that does not match an existing payment rule in the zone is rejected. Rules omitted from the request are deleted.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_fixed_price%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

MonetizationRuleInputOriginControlled {address, expression, scheme, 3 more }

Payment rule whose price the origin server sets dynamically. The rule carries no price and the price field must be omitted — any provided value, including “0”, is rejected because it would not be enforced.

</summary>

address: string

0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

expression: string

Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

scheme: "origin\_controlled"

X402 payment scheme. “origin\_controlled” lets the origin server set pricing dynamically; the rule carries no price and the price field must be omitted.

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20scheme">Link to this property</a>

id?: string

Optional on input. Include the ID of an existing payment rule to update it in place, preserving its stable identity across the full-ruleset replacement; omit it to create a new rule. An ID that does not match an existing payment rule in the zone is rejected. Rules omitted from the request are deleted.

maxLength32

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description?: string

maxLength512

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enabled?: boolean

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_rule_input_origin_controlled%20%3E%20(schema)">Link to this property</a>

</details>

<a href="#(resource)%20monetization.rules%20%3E%20(model)%20monetization_ruleset_input%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>

</details>

[Link to this property](<#(resource)%20monetization.rules%20%3E%20(model)%20monetization_ruleset_input%20%3E%20(schema)>)