Why Monetization module limits are not applied/checked correctly?

Not applicable

Hello Apigee Community,

I have Monetization module configured in SaaS environment and custom limits created (limiting amount of calls made to API Proxys in product). But it seems like custom limits are being ignored while checking monetization limits policy.

Here is an example limit:

2587-limit-example.png

I have Monetization Limits Check policy attached to Proxy on which I want to limit amount of calls made. I attached AX logs(ax-log.pdf) from successful call made to this API Proxy (this proxy in used only in Service Callouts, calls are made by other Proxys).

Transaction Recording Policy for product:

2590-trtansaction-policy.png

Rate Plan (with only Rate Card and custom Currency) for product, purchased by developer:

2591-rate-plan.png

Developer to register an app needs to:

1. fill company details and accept Terms & Conditions

2. purchase rate plan

3. only after this he can choose correct product, while registering an app

After his app is registered, limits are not applied on this app (no error messages). I think that this question may be similar to this one: monetization-limit-check-not-erroring-out.

What needs to be changed, for limits(with notifications) to be applied correctly? I also cannot generate billing reports, do I have to wait at least one month for them to be available?

Solved Solved
2 6 1,817
1 ACCEPTED SOLUTION

If you don't have any other records in 'transacion' table except that one probably:

a) Env is miss configured and there is no rating happens at all.

b) Check if developer has accepted the rate plan.

View solution in original post

6 REPLIES 6

adas
New Member

@Jarosław Wojtalik Monetization limits are applied to calls that are rated correctly. In this case, I see that you have setup transaction limit of 10 per day. This means this would allow 10 transaction for ANY developer or ANY app. Next, let's move on to your transaction recording policy. As per this policy configuration you are actually telling the system that mark the transaction as SUCCESS is the status received is OK from your transaction recording policy. So once these transactions are pushed to the monetization rating engine, monetization rating server would try to rate this transactions. The limit counters are incremented only if the rating is successful and the transactions is marked as SUCCESS.

If rating fails, then the status would be marked as FAILED or REVIEW depending on the reason for failure. One of the common reasons is that the developer doesn't have an active rateplan, in this case the transaction gets marked as REVIEW. Other reasons why rating might fail is due to transaction recording policy itself failing or the status is not OK, which doesn't match your txProviderStatus condition. In all these cases, the api call goes through but the rating fails, which means the limit counter would not get incremented and your limit policy would always allow more calls since the limit counter never gets incremented.

Ideally you should be able to query the transaction table in the monetization DB and check if your transactions have status=SUCCESS. If you are on Apigee's public cloud you would need to raise a support ticket and work with our support team to get this resolved since you won't have access to the database. If you are on-premise then you should be able to make these queries yourself as long as you have the credentials and system details.

To answer your second question, yes you cannot generate billing reports till the current month is closed. In the meantime you can use the reports section to generate transaction reports for developer or app or other such combinations using the apis as well as the monetization reports UI.

Not applicable

Hi @arghya das I read explanation in your post and I wanted to update my question (because now I am in private cloud environment). I have configured similar limits as in previous post and tried your suggestion with querying Transaction table, but I did not find my answer there, I still do not know what am I doing incorrectly. I am attaching document : monetization-details.pdf in which my Monetization settings are described. At the end of this document, values from transaction table related to selected package are added. Do you have any idea why limits are not applied correctly?

If you don't have any other records in 'transacion' table except that one probably:

a) Env is miss configured and there is no rating happens at all.

b) Check if developer has accepted the rate plan.

I should have closed this ticket along time ago, the environment was indeed incorrectly installed.

Is this question answered?

Yes, it is, it was misconfiguration in environment, I accepted your previous answer.