Debugging monetization using the Debug tool

This pageapplies toApigee andApigee hybrid.

View Apigee Edge documentation.

Debug monetization using Debug as described in the following sections.

Debugging the authentication policy phase

Apigee monetization uses the VerifyAPIKey or VerifyAccessToken policy to determine if an incoming request is monetizable by checking for the active published rate plan. For more information about adding the policy, seeAdding an authentication policy.

For example, the following image shows the details of the VerifyAPIKey policy phase in the request flow.

VerifyAPIKey policy phase details including the monetization flow variables

After authenticating the user, the VerifyAPIKey policy checks all published rate plans to determine which, if any, is active based on their activation and expiration times.If an active published rate plan is found, the following flow variables are populated:

Flow variableSetting
mint.mintng_is_apiproduct_monetizedtrue if active published rate plan is found.
mint.mintng_rate_plan_idRate plan ID.
mint.rateplan_end_time_msExpiration time for the rate plan. For example:1619433556408
mint.rateplan_start_time_msActivation time of the rate plan. For example:1618433956209

If no active published rate plan is found, themint.mintng_is_apiproduct_monetized flow variable is set tofalse and the additional flow variables are not populated.

For more information, see mint flow variables.

Debugging the MonetizationLimitsCheck policy phase

Apigee monetization uses the MonetizationLimitsCheck policy to enforce developer subscriptions to the API product. For more information about adding the policy, seeEnforcing developer subscriptions to API products.

Note: The MonetizationLimitsCheck policy has no effect if no active published rate plan is found and themint.mintng_is_apiproduct_monetized flow variable is set tofalse.

For example, the following image shows the details of the MonetizationLimitsCheck policy phase in the request flow.

MonetizationLimitsCheck policy phase details including the monetization flow variables

If the developer purchased a subscription to the API product, the following flow variables are populated:

Flow variableDescription
mint.limitscheck.is_request_blockedtrue for blocked requests.
mint.limitscheck.is_subscription_foundtrue if an API subscription is found.
mint.limitscheck_purchased_product_nameName of the purchased API product. For example:MyProduct
mint.limitscheck.status_messageStatus message. For example:limits_check_success
mint.prepaid_developer_balanceCurrent balance in the developer's prepaid account wallet associated with the rate plan's currency.
mint.prepaid_developer_currencyCurrency of the balance available in themint.prepaid_developer_balance variable.
mint.subscription_end_time_msEnd time of the API product subscription.
mint.subscription_start_time_msStart time of the API product subscription. For example:1618433956209

If the developer did not purchase a subscription to the API product:

  • mint.limitscheck_is_subscription_found flow variable is set tofalse
  • mint.limitscheck.is_request_blocked is set totrue
  • No other flow variables are populated.

For more information, see mint flow variables.

Debugging the Quota policy phase

Apigee monetization uses the Quota policy to enforce the quotas defined at the API product level. Quotas define the number of requests allowed for an API product over a given time period. For more information about the adding the policy, seeEnforcing monetization quotas in an API proxies.

Note: The MonetizationLimitsCheck policy has no effect if no active published rate plan is found and themint.mintng_is_apiproduct_monetized flow variable is set tofalse.

For example, the following image shows the details of the Quota policy phase in the request flow where the quota has been exceeded.

Quota policy phase details including the monetization flow variables

In this example, the quota has been exceeded, an HTTP429 Too Many Requests status is returned, and the flowratelimit.* flow variables are populated to provide more details about the quota exception. For a description of theratelimit.*, see theQuota policy flow variables.

Debugging the DataCapture policy phase

Apigee uses the monetization variables captured by the DataCapture policy for rating, calculating revenue share, and analytics. For more information about the capturing the monetization variables in the policy, seeCapturing monetization data.

For example, the following image shows the details of the DataCapture policy execution phase in the response flow.

DataCapture policy execution phase with the monetization flow variables

If there are no errors when capturing the monetization variables, the following flow variables are populated for a transaction:

Flow variableDescription
mint.mintng_currency

Currency for calculating the revenue.

This flow variable has the value of thecurrency monetization variable.

mint.mintng_price

Revenue for calculating the developer's share.

This flow variable has the value of therevShareGrossPrice monetization variable.

mint.mintng_price_multiplier

Factor (multiplier) by which the per-transaction cost is multiplied.

This flow variable has the value of theperUnitPriceMultiplier monetization variable.

mint.mintng_tx_success

Specifies if the transaction is monetized.

This flow variable has the value of thetransactionSuccess monetization variable.

Debugging the monetized API proxy execution phase

After the successful execution of the monetized API proxy, a set of flow variables are populated with information about the monetization consumption-based fees and rates charged.

For example, the following image shows the details of theProxy Execution phase in the PostClient flow where the variables are populated.

Proxy Execution phase details including the monetization flow variables

If the monetized API proxy execution succeeds, the following flow variables are populated:

Flow variableDescription
message.status.codeHTTP status code of the response message from target.

If you have any policy in your response, the value of this variable is overridden by status code returned by the policy.

mint.limitscheck.is_request_blockedFlag that specifies whether the API request is blocked.
mint.mintng_consumption_pricing_ratesConsumption-based fees set in the rate plan.
mint.mintng_consumption_pricing_typeConsumption-based pricing type set in the rate plan. For example:FIXED_PER_UNIT
mint.mintng_dev_shareRevenue to be shared with developer.
mint.mintng_price_multiplierFactor (multiplier) captured from the DataCapture policy. The per-transaction cost is multiplied by this factor.
mint.mintng_rate

Rate charged for the API call.

mint.mintng_rate_before_multipliersRate charged for the API call without theperUnitPriceMultiplier calculation.
mint.mintng_revenue_share_ratesRevenue share rates set in the rate plan.
mint.mintng_revenue_share_typeRevenue share type set in the rate plan.
mint.prepaid_updated_developer_usageCurrent usage of the prepaid developer.
mint.statusStatus of the monetized call. Populated only on error.
mint.status_codeHTTP status code of the monetized call. Populated only on error.
mint.tx_success_resultIndicates whether monetization is successful for the transaction.

For a detailed description of all the variables, seemint flow variables.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.