You're viewing **Apigee Edge** documentation.  
[Go to the
**Apigee X** documentation](http://cloud.google.com/apigee/docs/api-platform/monetization/enforce-monetization-limits). info

Attach the Monetization Limits Check policy to API proxies to enforce monetization limits.
Specifically, the policy is triggered under the following conditions:

- Developer accessing monetized API is not registered or has not subscribed to the rate plan.
- Developer has exceeded the transaction volume for the subscribed rate plan.
- Developer pre-paid account balance or post-paid credit limit has been reached.

The Monetization Limits Check policy is designed to raise a fault and block an API call in
situations like those listed above. The policy extends the Raise Fault policy (see [Raise Fault policy](https://docs.apigee.com/api-platform/reference/policies/raise-fault-policy)), and you can
customize the message returned. The applicable conditions are derived from business
variables.

> [!NOTE]
> **NOTE** : Attach the **Monetization Limits Check** policy to the API proxies associated with the API products included in a rate plan. The Monetization Limits Check policy ensures that any faults are captured accurately in the analytics and monetization reports. For more information about managing rate plans, see [Managing rate plans](https://docs.apigee.com/api-platform/monetization/create-rate-plans).

## Attaching a Monetization Limits Check
Policy using the UI

To enforce monetization limits, a Monetization Limits Check policy must be attached to the
request flow in API proxies that access your APIs. The Monetization Limits Check policy should be
attached after any VerifyAPIKey or AccessTokenValidation policy in the request.

You can attach a Monetization Limits Check policy when you create an API proxy or after an API
proxy is created.

When you create an API proxy, as described in [Build a simple API proxy](https://docs.apigee.com/api-platform/fundamentals/build-simple-api-proxy), if
monetization is installed, the Monetization configuration section appears in the wizard.

### Edge

On the **Common policies** page of the wizard, select the **Enforce monetization limits** checkbox to attach
a Monetization Limits Check policy.

![Monetization Limits Check policy](https://docs.apigee.com/static/api-platform/images/monetization-limits-check-v2.png)

Note that on the Summary page of the wizard, the Policies are summarized. Ensure that
the Monetization policy is listed, indicating that the Monetization Limits Check policy will be
attached to the API proxy, as described below.

![](https://docs.apigee.com/static/api-platform/images/monetization-flag.png)

### New Edge UI (Private Cloud)

> [!NOTE]
> **Note:** The New Edge UI is available with Edge for Private Cloud only.

1. Sign in to the New Edge UI at `http://host:3001/edge`, where <var translate="no">host</var> is the IP address or DNS name of the host running the New Edge UI.
2. Select **Develop \> API Proxies** in the left navigation bar and click **+Proxy** to open the Create Proxy wizard.
3. On the **Common policies** page of the wizard, select the **Enforce monetization limits** checkbox to attach a Monetization Limits Check policy.

   ![Monetization Limits Check policy](https://docs.apigee.com/static/api-platform/images/monetization-limits-check-v2.png)
4. On the **Summary** page of the wizard, ensure that the Monetization policy is listed, indicating that the Monetization Limits Check policy will be attached to the API proxy.

   ![](https://docs.apigee.com/static/api-platform/images/monetization-flag.png)

The Monetization Limits Check policy is added to the ProxyEndpoint request PreFlow, after the
VerifyAPI Key or AccessTokenValidation policy, as show in the following figure.

![](https://docs.apigee.com/static/api-platform/images/preflow-monetization.png)

To add the Monetization Limits Check policy to an API proxy that has already been created:

1. In the API Proxy Editor, click **PreFlow** for the default proxy endpoint.  
   ![](https://docs.apigee.com/static/api-platform/images/select-preflow.png)
2. In the Request flow, click **+Step**.
3. Select Monetization Limits Check in the Mediation category. ![](https://docs.apigee.com/static/api-platform/images/select-monetization-limits-check.png)

4. Modify the fields in the Add Step dialog, as desired, and click **Add**.

The policy is attached to the request flow after any VerifyAPI Key or
AccessTokenValidation policy, and will be enforced on request messages from client apps to
the ProxyEndpoint PreFlow.

For more information about configuring the MonetizationLimitsCheck policy XML file,
see [MonetizationLimitsCheck policy](https://docs.apigee.com/api-platform/reference/policies/monetization-limits-check-policy).