Not able to enforce monetization

HI All

I have created

API proxy(with "Monetization Limits Check" policy preceded by APIKey validation policy) and API Product

Product Bundle(With transaction recording policy)

with txProviderStatus=='success' and

Response location as Header and Header name as 'status'

And the Header status == 'success' is set in the API response flow using assign message

and created a Rate plan.

Created two developers and apps

Developer-A >> App-A

Developer-B >> App-B

Then purchased the rate plan for Developer-A using API (https://api.enterprise.apigee.com/v1/mint/organizations/{ord}/developers/{developerid}/developer-rateplans

(since i could not find an option in UI)

upon invoking the API,the API is successful using the App Keys of both App-A and App-B

When the expectation was the App-B would have been rejected since the Developer-B has not purchased a Rate plan

Please let me know what am i missing here

Solved Solved
0 4 560
1 ACCEPTED SOLUTION

The steps followed seems to be right and expectations mentioned also seems to be right.

In order to further debug,

can you trace the api call and check the following in the ax execution - refer screenshot mint.png

  1. api product is correctly resolved in mint.tx.prod_id
  2. mint.tx.status is correctly resolved to status variable, in your case 'success' (Header status == 'success')
  3. make sure mint.tx.ignoreMessage is set to false - This will be set to false most probably if one of the two conditions above is not met.

Check reports

you can also make revenue reports api call to check if prod A is really captured in reports

https://docs.apigee.com/api-platform/monetization/create-reports#reptransactapi

alternatively use revenue reports api

curl --request POST 'https://api.enterprise.apigee.net/v1/mint/organizations/{org}/developers/{dev}/revenue-reports' \ 
--header 'Content-type: application/json' \ 
--data-raw '{ "fromDate":"2020-06-22", "toDate":"2020-06-24", "showSummary":true, "currencyOption":"USD", "groupBy":["PACKAGE","PRODUCT","DEVELOPER","APPLICATION"] }'

View solution in original post

4 REPLIES 4

The steps followed seems to be right and expectations mentioned also seems to be right.

In order to further debug,

can you trace the api call and check the following in the ax execution - refer screenshot mint.png

  1. api product is correctly resolved in mint.tx.prod_id
  2. mint.tx.status is correctly resolved to status variable, in your case 'success' (Header status == 'success')
  3. make sure mint.tx.ignoreMessage is set to false - This will be set to false most probably if one of the two conditions above is not met.

Check reports

you can also make revenue reports api call to check if prod A is really captured in reports

https://docs.apigee.com/api-platform/monetization/create-reports#reptransactapi

alternatively use revenue reports api

curl --request POST 'https://api.enterprise.apigee.net/v1/mint/organizations/{org}/developers/{dev}/revenue-reports' \ 
--header 'Content-type: application/json' \ 
--data-raw '{ "fromDate":"2020-06-22", "toDate":"2020-06-24", "showSummary":true, "currencyOption":"USD", "groupBy":["PACKAGE","PRODUCT","DEVELOPER","APPLICATION"] }'

Hi Rajanish, thanks for the response

Please find the results below

These are for the Developer B which has not purchased any plan

mint.tx.ignoreMessage false
mint.tx.prod_id Monetize_Product_1
mint.tx.status success

And the report says it didn't find any matching transactions

I think you might be running into some kind of monetization provisioning issue unfortunately !! is your organization newly provisioned ? Please create support ticket with org/proxy and all the details you already mentioned here.

Hi ,

I am not posing this as a new question because it might look like repetition. I worked with rate cards and was able to generate revenue reports ,facing issue when using revenue rate plan am i configuring something wrong?

 

I have the same problem while trying to configure revenue rate plan on edge (on  premises  ).Here are screen shot of the transaction policy  and mint variables populated picked up from trace .

 

Mint statusMint statusmint statusmint statustransaction policytransaction policy