Monetization Transactions showing in summary and not in Detailed report

chawkimatta
Participant III

The Summary Revenue Report is showing a row of transaction type "CHARGE" with the total volume and charge rate as shown below:

9180-summary.jpg

but the transactions are not showing in the Detailed Revenue Report:

9181-detailed-report.jpg

any one faced this issue?
aren't we supposed to get all the successful requests in the detailed report?

Solved Solved
0 5 448
1 ACCEPTED SOLUTION

Ah, OK, to see the actual transactions and dates, you can use the Management API for "transaction-search". The response includes a lot of meta data, so you will need to filter the results, as I've shown using JQ.

You can eliminate the "devCriteria" and get results for all developers, just wanted to show it as an example.

curl -n -X POST \
  'https://api.enterprise.apigee.com/v1/mint/organizations/{{ORG}}/transaction-search?size=100' \
  -H 'Content-Type: application/json' \
  -d '{
	"billingMonth": "AUGUST",
	"billingYear": 2019,
	"devCriteria": [{
		"id": "{{devId}}",
		"orgId": "{{ORG}}"
	}],
	"transactionTypes": [
	    "PURCHASE",
            "CHARGE",
            "REFUND",
            "CREDIT"
	]
}' > results.json

Then using JQ:

$ cat results.json | jq '.transaction[] | 
{
    type: .type, 
    rate: .rate, 
    startTime:.startTime, 
    ratePlan_displayName:.ratePlan.displayName,
    developer_email:.developer.email,
    product_id:.product.id,
    application_name:.application.name
}'

...
{
  "type": "CHARGE",
  "rate": 0.05,
  "startTime": "2019-08-09 15:39:26",
  "ratePlan_displayName": "pingstatus-all-starter",
  "developer_email": "developer+app@any.com",
  "product_id": "pingstatus-v2-product-prod",
  "application_name": "kurt-app-prepaid"
}
...

View solution in original post

5 REPLIES 5

I've noticed this in the UI and I think its been reported as a bug, but I'll check.

Note the use of showTxDetail and showSummary below.

You can use the Management APIs to get the details, for example, to get a revenue-report:

curl -n -X POST \
  https://api.enterprise.apigee.com/v1/mint/organizations/{{ORG}}/revenue-reports \
  -H 'Content-Type: application/json' \
  -d '{
	"fromDate": "2019-08-01 00:00:00",
	"toDate": "2019-08-31 00:00:00",
	"showTxDetail": true,
	"showSummary": true,
        "showEntityId":false,
	"transactionTypes": [
	    "PURCHASE",
            "CHARGE",
            "REFUND",
            "CREDIT"
	],
	"currencyOption": "LOCAL",
	"groupBy": [
	    "PACKAGE",
	    "PRODUCT",
	    "DEVELOPER",
            "APPLICATION",
            "RATEPLAN"
	]
}'

Not sure exactly what the difference between a revenue and billing report it, but you can also generate a billing-report, for example:

curl -n -X POST \
  https://api.enterprise.apigee.com/v1/mint/organizations/demo29/billing-reports \
  -H 'Content-Type: application/json' \
  -d '{
	"fromDate": "2019-08-01 00:00:00",
	"toDate": "2019-08-31 00:00:00",
	"billingMonth": "AUGUST",
        "billingYear": 2019,
        "showTxDetail": true,
	"showSummary": true,
        "showEntityId":false,
	"transactionTypes": [
	    "PURCHASE",
            "CHARGE",
            "REFUND",
            "CREDIT"
	],
	"currencyOption": "LOCAL",
	"groupBy": [
	    "PACKAGE",
	    "PRODUCT",
	    "DEVELOPER",
            "APPLICATION",
            "RATEPLAN"
	]
}'

Hope that helps.

hi @Kurt Googler Kanaskie, thank you for your response, i have tried the API request and got the Summary Revenue Report only while showTxDetail is set to true!


Reporting Period:,From:,2019-09-15, To:,2019-09-25

API Product:,All

Developer:,All

Application:,All

Currency:,Local

Type of Report:,Summary Revenue Report

......Application NameTotal VolumeCharged RateTax on RateDeveloper Email
......app11504.3750chawki.matta....
......app270.3500chawki.matta

if we set the showSummary to false we get the below error:

{
"code": "mint.noSuchResource",
    "message": "Did not find any Transaction that matches the search criteria",
    "contexts": [],
    "cause": {
        "message": "Did not find any Transaction that matches the search criteria",
        "contexts": []
    }
}

*** what i want is showing the 150 request details for ex: Charged Rate distribution and date of request. is that possible ?


Ah, OK, to see the actual transactions and dates, you can use the Management API for "transaction-search". The response includes a lot of meta data, so you will need to filter the results, as I've shown using JQ.

You can eliminate the "devCriteria" and get results for all developers, just wanted to show it as an example.

curl -n -X POST \
  'https://api.enterprise.apigee.com/v1/mint/organizations/{{ORG}}/transaction-search?size=100' \
  -H 'Content-Type: application/json' \
  -d '{
	"billingMonth": "AUGUST",
	"billingYear": 2019,
	"devCriteria": [{
		"id": "{{devId}}",
		"orgId": "{{ORG}}"
	}],
	"transactionTypes": [
	    "PURCHASE",
            "CHARGE",
            "REFUND",
            "CREDIT"
	]
}' > results.json

Then using JQ:

$ cat results.json | jq '.transaction[] | 
{
    type: .type, 
    rate: .rate, 
    startTime:.startTime, 
    ratePlan_displayName:.ratePlan.displayName,
    developer_email:.developer.email,
    product_id:.product.id,
    application_name:.application.name
}'

...
{
  "type": "CHARGE",
  "rate": 0.05,
  "startTime": "2019-08-09 15:39:26",
  "ratePlan_displayName": "pingstatus-all-starter",
  "developer_email": "developer+app@any.com",
  "product_id": "pingstatus-v2-product-prod",
  "application_name": "kurt-app-prepaid"
}
...

eureka! Thank you @Kurt Googler Kanaskie i have the transactions now !
one more question please:
  • a transaction have the below info
    • Why is it grouped by batches ?
    • cant we know from the report to which "RATECARD" this batch belongs!?
batchSize 3
ratedVolume 3
startTime 2019-09-16 06:40:01
endTime 2019-09-16 06:40:05
type CHARGE
rate 0.15

Hi @Chawki MATTA, answers to your questions:

  • Why is it grouped by batches?
    • I don't know, I assume for compactness, the rate is the charge, which is equal to "batchSize X ratePlanRates.rate that was applied".
  • Cant we know from the report to which "RATECARD" this batch belongs?
    • Yes, it's in the "ratePlan_displayName" property.

The revenue report does show that, see attached screenshot comparing results from revenue-reports and billing-reports.

9192-screen-shot-2019-09-26-at-104854-am.png