Troubleshooting Monetization Problems

This topic provides information and guidance on troubleshooting commonly observed monetization problems.

Developer Suspended

Symptom

Developer is suspended and will not be able to make any additional monetization transactions/API calls.

Error Messages

<error>
   <messages>
        <message>Exceeded developer limit configuration -</message>
        <message>Is Developer Suspended - true</message>
   </messages> 
</error>

Diagnosis

To determine the reason that the developer has been suspended, perform the following steps:

  1. Execute the following API call to identify the error code associated with the suspended developer:
    1. If you are a Public Cloud User, use the below API:
      curl -X GET "https://api.enterprise.apigee.com/v1/mint/organizations/{org}/suspended-developers/{developer-email}" -u orgadminEmail:password
      
    2. If you are a Private Cloud User, use the below API:
      curl -X GET "http://<management-host>:<port#>/v1/mint/organizations/{org}/suspended-developers/{developer-email}" -u orgadminEmail:password
      
  2. Compare the error code with the following reasons codes to determine why the developer was suspended.

See also: http://docs.apigee.com/monetization/content/unsuspend-developers#suspend-reason-codes

Reason Code

Cause

Details

INSUFFICIENT_FUNDS

Developer account balance is depleted

If the prepaid developer account balance does not have enough funds for any additional transactions, then the developer will be suspended.

For postpaid developers, this error can occur if they exceed their credit limit or if the credit limit set on the currency used is depleted.

LIMIT_VIOLATED

Developer is unable to make any further transactions

Every developer is allowed to make a fixed number of transactions based on the rate plan purchased. If the number of transactions is exceeded, then the developer is suspended and cannot complete additional transactions.

RATE_PLAN_RATE_BAND_EXCEEDED

NO_CURRENT_PUBLISHABLE_ENTITY

Developer has not purchased any rate plan

A developer must purchase a rate plan before completing any transactions.

Resolution

Error

Steps to Resolve

INSUFFICIENT_FUNDS

The developer needs to make sure that there is a sufficient account balance or available credit in order to complete any additional transactions.

LIMIT_VIOLATED

  1. Make the following API calls to get the developer rate plan and transaction details, respectively:
  • Run the following API call to get the start and end date of the rate plans that the developer has purchased:

http://docs.apigee.com/monetize/apis/get/organizations/%7Borg_name%7D/developers/%7Bdeveloper_id%7D/developer-accepted-rateplans

  • Run the following API call to get the number of successful transactions made by the developer :

http://docs.apigee.com/monetize/apis/get/organizations/%7Borg_name%7D/transactions/developers/%7Bdeveloper_email_or_id%7D

  1. In Edge UI, you can also check the number of calls a developer is allowed to make by selecting:

Packages -> PackageName -> RatePlanName -> Rate Card

For example, if the package name is ‘Pro Package’ and it’s a Free Plan, then the path would be:

Packages -> Pro Package -> Free Plan -> Rate Card

RATE_PLAN_RATE_BAND_EXCEEDED

NO_CURRENT_PUBLISHABLE_ENTITY

The developer has to purchase a rate plan to be able to make API calls.


Monetization setup issues

Symptoms

The Monetization setup issues can manifest as different symptoms such as:

  • Webhooks functionality not working
  • Cannot create webhooks
  • Webhook notifications not being triggered
  • Monetization Reports not showing any transactions
  • For example, the Analytics data indicates that the developer has completed many transactions in a specific period of time, but the Monetization reports don’t list any of those transactions.
  • Transactions not getting recorded

Error Messages

You may not observe any error messages, but you will see issues as explained in the Description section above.

Possible Causes

If you are seeing any of the symptoms listed above in the Description section, then it’s very likely the transactions are not being monetized.

Diagnosing the cause

  1. Use the management API call described in the following section to check if the transactions are being monetized.

    View the status of transactions

  1. If you don’t see any transactions being listed as ‘SUCCESS’ within the specified duration, then the transactions are not monetized.

The typical causes for the transactions not being monetized are:

Cause

Monetization Limits Check Policy Not Attached To API Proxy

APIProduct is not Monetized

Transaction Recording Policy incorrectly defined

Developer has not purchased rate plan

The following sections describe how to diagnose and resolve each issue.

Monetization Limits Check Policy not used in API Proxy

Diagnosis

  1. Check whether the Monetization Limits Check Policy is attached to the API proxies.
  1. If the policy is not attached, then this could be the reason that transactions are listed as ‘FAILED’.

Resolution

Attach the Monetization Limits Check Policy to the required API proxies, as described in the following section:

http://docs.apigee.com/monetization/content/enforce-monetization-limits-using-monetization-limits-check-policy

If the problem persists, then check if the API Product is not monetized.

API Product is not monetized

Diagnosis

  1. Check if the API product is monetized (only monetized API products are rated and will be listed under transactions). A monetized product is one that has at least one active rate plan available.
  1. Use the following management API call to get the list of monetized API products:
    1. If you are a Public Cloud User, use the below API:
      curl -v https://api.enterprise.apigee.com/v1/mint/organizations/{org_id}/products?monetized=true -u orgadminEmail:password
      
    2. If you are a Private Cloud User, use the below API:
      curl -v http://<management-host>:<port#>/v1/mint/organizations/{org_id}/products?monetized=true -u orgadminEmail:password
            
      
  2. If the API product associated with your API Proxy is not monetized, then this could be the reason that the transactions are not being monetized.

Resolution

To monetize an API product, perform the following steps:

  1. Create a transaction recording policy, as described in the following section:

    http://docs.apigee.com/monetization/content/create-transaction-recording-policy

  1. Check that the API Product has an active rate plan.

If the problem persists, then check if Transaction recording policy incorrectly defined

Transaction recording policy incorrectly defined

Diagnosis

  1. Enable the UI trace for the API Proxy that has the Monetization Limits Check Policy attached.
  1. Select a particular API request from the UI trace.
  1. Select the Analytics ‘AX’ flow and check if the following monetization (mint) flow variables have the proper values:
    mint.tx.status - Should match the value set up for "success criteria" in the transaction recording policy for the API product being used. When tracing, the txProviderStatus in the transaction recording policy is stored in the variable 'mint.tx.status'.
    mint.tx.app_id - Application id of API product.
    mint.tx.prod_id - API product id.
            
    
  1. Here’s a sample UI trace that shows the mint flow variables are setup correctly.
  1. If you observe an error in the mint.tx.status variable, then it indicates that the transaction recording policy is incorrectly defined.

Resolution

  1. Ensure that all the steps documented in the following section have been followed correctly while creating the transaction recording policy.

http://docs.apigee.com/monetization/content/create-transaction-recording-policy

  1. The key value is the ‘transaction success criteria’ set in the transaction recording policy.

http://docs.apigee.com/monetization/content/create-transaction-recording-policy#success-criteria

Developer has not purchased rate plan

Diagnosis

  1. Use the following management API call to verify the rate plans purchased by the developer:
    1. If you are a Public Cloud user, use the below API:
      curl -v https://api.enterprise.apigee.com/v1/mint/organizations/{org}/developers/{dev_email}/products/{prod}/developer-rateplans -u orgadminEmail:password
      
    2. If you are a Private Cloud user, use the below API:
      curl -v http://<management-host>:<port#>/v1/mint/organizations/{org}/developers/{dev_email}/products/{prod}/developer-rateplans -u orgadminEmail:password
      
  2. Based on the response from the above call, find the plan that was active at the time that the transaction was completed by the developer.

Resolution

Developer must purchase the rate plan based on their requirements and then execute the transactions/APIs.

If the problem persists, contact Apigee Support.