{
"error": {
"code": 400,
"message": "failed to validate addons config: [Apigee Monetization] addon(s) are not entitled to the subscription",
"status": "FAILED_PRECONDITION"
}
}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eApigee monetization must be purchased and enabled for your organization before it can be utilized, but keep in mind that it is not supported for Hybrid environments.\u003c/p\u003e\n"],["\u003cp\u003eTo purchase Apigee monetization, you will have to first verify if it's included in your subscription, and then contact Apigee Sales if needed, except if it's a trial organization, in which case monetization is included.\u003c/p\u003e\n"],["\u003cp\u003eEnabling or disabling Apigee monetization involves sending a POST request to a specific API endpoint, which will overwrite the existing configuration, so it is recommended that you first check the current configuration.\u003c/p\u003e\n"],["\u003cp\u003eAfter sending a request, you can view the organization profile to confirm the enablement or disablement status of monetization, which will show a \u003ccode\u003etrue\u003c/code\u003e or \u003ccode\u003efalse\u003c/code\u003e value respectively for the monetization configuration.\u003c/p\u003e\n"],["\u003cp\u003eAttempting to enable monetization without purchasing it will result in an error indicating that the addon is not entitled to the subscription.\u003c/p\u003e\n"]]],[],null,["# Enable Apigee monetization\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n\nBefore you can use Apigee monetization, you must purchase and enable it in your organization.\nApigee monetization is supported for Apigee and Apigee hybrid environments.\n| **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.\n\n\u003cbr /\u003e\n\nPurchase Apigee monetization\n----------------------------\n\n\nTo purchase Apigee monetization for **Subscription organizations** , contact [Apigee Sales](https://pages.apigee.com/contact-sales-reg.html), then\n[enable Apigee monetization in your organization](#enable).\n\n\nApigee monetization is not available with **Pay-as-you-go organizations**.\n\n\nApigee **eval organizations** automatically include an Apigee monetization trial for the trial\nperiod. You do not need to contact Apigee Sales to add monetization. Proceed to\n[Enable Apigee monetization in your organization](#enable).\n\nEnable Apigee monetization in your organization\n-----------------------------------------------\n\n\nTo enable Apigee monetization in an existing organization, issue a `POST` request to the following API,\npassing the add-on configuration in your request body: \n\n```\nhttps://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons\n```\n| **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](/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) in the Apigee organization profile and be sure to include it in the request payload.\n\n\nFor example: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons\" \\\n -X POST \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-type: application/json\" \\\n -d '{\n \"addonsConfig\": {\n \"monetizationConfig\": {\n \"enabled\": \"true\"\n }\n \u003cInclude existing add-on configuration\u003e\n }\n }'\n```\n\nWhere `$TOKEN` is set to your OAuth 2.0 access token, as described in\n[Obtaining an OAuth 2.0 access token](/apigee/docs/api-platform/get-started/api-get-started#oauth20). For information about the `curl` options used in this example, see\n[Using curl](/apigee/docs/api-platform/get-started/api-get-started#curl). For a description of environment variables you can use, see\n[Setting\nenvironment variables for Apigee API requests](/apigee/docs/api-platform/get-started/api-get-started#api-environment-variables).\n\n\nThe following provides an example of the response showing that the operation is in progress: \n\n```\n{\n \"name\": \"organizations/ORG_NAME/operations/1ae3ed56-b38f-4cc1-ba33-e7d89557075d\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apigee.v1.OperationMetadata\",\n \"operationType\": \"UPDATE\",\n \"targetResourceName\": \"organizations/ORG_NAME\",\n \"state\": \"IN_PROGRESS\"\n }\n}\n```\n\n\nFor more information, see the\n[Configure organization add-ons API](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setAddons).\n\n\n[View the organization profile](/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) to confirm that monetization has been enabled. For example: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG_NAME\" \\\n -X GET \\\n -H \"Authorization: Bearer $TOKEN\"\n```\n\n\nThe following provides an example of the response showing monetization is enabled. \n\n```\n{\n \"name\": ORG_NAME,\n ...\n \"addonsConfig\": {\n \"monetizationConfig\": {\n \"enabled\": true\n }\n }\n}\n```\n\nDisable Apigee monetization in your organization\n------------------------------------------------\n\n\nTo disable Apigee monetization in your organization, issue a `POST` request to the\nfollowing API, passing the add-on configuration in your request body: \n\n```\nhttps://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons\n```\n| **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](/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) in the Apigee organization profile and be sure to include it in the request payload.\n\n\nFor example: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG_NAME:setAddons\" \\\n -X POST \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-type: application/json\" \\\n -d '{\n \"addonsConfig\": {\n \"monetizationConfig\": {\n \"enabled\": \"false\"\n }\n \u003cInclude existing add-on configuration\u003e\n }\n }'\n```\n\n\nThe following provides an example of the response showing that the operation is in progress: \n\n```\n{\n \"name\": \"organizations/ORG_NAME/operations/06274ffb-8940-41da-836d-781cba190437\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apigee.v1.OperationMetadata\",\n \"operationType\": \"UPDATE\",\n \"targetResourceName\": \"organizations/ORG_NAME\",\n \"state\": \"IN_PROGRESS\"\n }\n}\n```\n\n\nFor more information, see the [Configure organization add-ons API](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setAddons).\n\n\n[View the organization profile](/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) to confirm that monetization has been disabled. For example: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG_NAME\" \\\n -X GET \\\n -H \"Authorization: Bearer $TOKEN\"\n```\n\n\nThe following provides an example of the response showing monetization is enabled. \n\n```\n{\n \"name\": ORG_NAME,\n ...\n \"addonsConfig\": {\n \"monetizationConfig\": {\n \"enabled\": false\n }\n }\n}\n```\n\nTroubleshoot Apigee monetization enablement\n-------------------------------------------\n\nIf you have not [purchased Apigee monetization](#purchase) and\nyou attempt to enable it, the following error is returned: \n\n```\n{\n \"error\": {\n \"code\": 400,\n \"message\": \"failed to validate addons config: [Apigee Monetization] addon(s) are not entitled to the subscription\",\n \"status\": \"FAILED_PRECONDITION\"\n }\n}\n```"]]