*This page
applies to **Apigee** and **Apigee hybrid**.*


*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*
![](https://fonts.gstatic.com/s/i/googlematerialicons/help/v13/gm_grey-24dp/1x/gm_help_gm_grey_24dp.png)


Before you can use Apigee monetization, you must purchase and enable it in your organization.
Apigee monetization is supported for Apigee and Apigee hybrid environments.

> [!WARNING]
> **Note:** See [Known issue 355714868](https://cloud.google.com/apigee/docs/release/known-issues) for an issue related to Apigee monetization recurring, setup, and top-up fee data in hybrid environments.

<br />

## Purchase Apigee monetization


To purchase Apigee monetization for **Subscription organizations** , contact [Apigee Sales](https://pages.apigee.com/contact-sales-reg.html), then
[enable Apigee monetization in your organization](https://docs.cloud.google.com/apigee/docs/api-platform/monetization/enable#enable).


Apigee monetization is not available with **Pay-as-you-go organizations**.


Apigee **eval organizations** automatically include an Apigee monetization trial for the trial
period. You do not need to contact Apigee Sales to add monetization. Proceed to
[Enable Apigee monetization in your organization](https://docs.cloud.google.com/apigee/docs/api-platform/monetization/enable#enable).

## Enable Apigee monetization in your organization


To enable Apigee monetization in an existing organization, issue a `POST` request to the following API,
passing the add-on configuration in your request body:

```
https://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons
```

> [!CAUTION]
> **Caution:** The add-on configuration that you pass in the request body will **overwrite** the existing add-on configuration. [View the existing add-on configuration](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) in the Apigee organization profile and be sure to include it in the request payload.


For example:

```
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons" \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-type: application/json" \
  -d '{
    "addonsConfig": {
      "monetizationConfig": {
          "enabled": "true"
      }
      <*Include existing add-on configuration*>
    }
  }'
```

Where `$TOKEN` is set to your OAuth 2.0 access token, as described in
[Obtaining an OAuth 2.0 access token](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/api-get-started#oauth20). For information about the `curl` options used in this example, see
[Using curl](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/api-get-started#curl). For a description of environment variables you can use, see
[Setting
environment variables for Apigee API requests](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/api-get-started#api-environment-variables).


The following provides an example of the response showing that the operation is in progress:

```
{
  "name": "organizations/ORG_NAME/operations/1ae3ed56-b38f-4cc1-ba33-e7d89557075d",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
    "operationType": "UPDATE",
    "targetResourceName": "organizations/ORG_NAME",
    "state": "IN_PROGRESS"
  }
}
```


For more information, see the
[Configure organization add-ons API](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setAddons).


[View the organization profile](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) to confirm that monetization has been enabled. For example:

```
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME" \
  -X GET \
  -H "Authorization: Bearer $TOKEN"
```


The following provides an example of the response showing monetization is enabled.

```
{
    "name": ORG_NAME,
    ...
    "addonsConfig": {
    "monetizationConfig": {
      "enabled": true
    }
  }
}
```

## Disable Apigee monetization in your organization


To disable Apigee monetization in your organization, issue a `POST` request to the
following API, passing the add-on configuration in your request body:

```
https://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons
```

> [!CAUTION]
> **Caution:** The add-on configuration that you pass in the request body will **overwrite** the existing add-on configuration. [View the existing add-on configuration](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) in the Apigee organization profile and be sure to include it in the request payload.


For example:

```
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons" \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-type: application/json" \
  -d '{
    "addonsConfig": {
      "monetizationConfig": {
          "enabled": "false"
      }
     <*Include existing add-on configuration*>
    }
  }'
```


The following provides an example of the response showing that the operation is in progress:

```
{
  "name": "organizations/ORG_NAME/operations/06274ffb-8940-41da-836d-781cba190437",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
    "operationType": "UPDATE",
    "targetResourceName": "organizations/ORG_NAME",
    "state": "IN_PROGRESS"
  }
}
```


For more information, see the [Configure organization add-ons API](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setAddons).


[View the organization profile](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) to confirm that monetization has been disabled. For example:

```
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME" \
  -X GET \
  -H "Authorization: Bearer $TOKEN"
```


The following provides an example of the response showing monetization is enabled.

```
{
    "name": ORG_NAME,
    ...
    "addonsConfig": {
    "monetizationConfig": {
      "enabled": false
    }
  }
}
```

## Troubleshoot Apigee monetization enablement

If you have not [purchased Apigee monetization](https://docs.cloud.google.com/apigee/docs/api-platform/monetization/enable#purchase) and
you attempt to enable it, the following error is returned:

```
{
  "error": {
    "code": 400,
    "message": "failed to validate addons config: [Apigee Monetization] addon(s) are not entitled to the subscription",
    "status": "FAILED_PRECONDITION"
  }
}
```