Monetization Rate plan confusing

Dear Team,

I hope you are doing well,

I am using Apigee Edge.

I will share the business required for the below my business is related to clients that need to check some data about the mobile numbers for persons I will send the phone number to the back-end and then if the number is not inquired by the same consumer during 1 year for example, the backend will return 404 and then I will calculate as a transaction if it returns 200 this means it is already inquired before and it already exists in the DB, and if he sent same number, again and again, service will return 200, also need to mention the consumer Id and the start and end date of the subscription with the backend, because if he renews his subscription for next year I will just search for the same number within a new period or subscription.

I need your support regarding understanding some cases in monetization and the Drupal portal, I will share the below pic and raise my questions.

First of all from the Drupal portal above pic where I can find the above start date and end date related to the monetization rate plan subscription for one consumer.

My questions here:

Is there any Apiegee Admin API that shows me the above date’s start and end of the subscription for each consumer? not the end date related to the rate plan itself.

because I will set the rate plan yearly and start and end dates will be needed by the backend

This is the one I need to subscribe to for 1 year.

I have found the below two APIs:

/mint/organizations/{org_name}/developers/{developer_email}/products/{product_id}/rate-plan-by-developer-product

and

/mint/organizations/{org_name}/developers/{developer_email}/developer-accepted-rateplans

but still, I am not able to find the start and end date of the subscription.

I appreciate the support.

Best Regards,

Amer Hijazi

1 Like

Hi @Amer-Hijazi

Thanks for sharing your query here.

You are referring correct APIs for the required details.

We do not have end date in the API, as this is a Prepaid plan, there is the Renewal date option.

Sharing the date related available keys with sample values below:

"renewalDate": "2024-10-10 00:00:00",
"startDate": "2023-10-10 00:00:00",
"updated": "2024-10-01 00:01:21" 

End Date or Expiry Date is available on ApigeeX Plans & not on Apigee Rate Plans.

Thanks!

Dear @kedarkhaire ,

Hope you are doing well,

Thank you for your replay

As, I see and search a lot I can found the start date and end date with the same json you mentioned in you replay contains multiple things

in the below json created bold created and endDate I detect theses two dates same dates on dev portal itself as below pic

Show More

“created” : “2024-10-04 15:44:49”,

Show More

“developer” : {

Show More

“billingType” : “PREPAID”,

Show More

“broker” : false,

Show More

“email” : “test@gmail.com”,

Show More

“id” : “XXXXXXXXXXXX”,

Show More

“isCompany” : false,

Show More

“legalName” : “test@gmail.com”,

Show More

“name” : “test test”,

Show More

“organization” : {

Show More

“approveTrusted” : false,

Show More

“approveUntrusted” : false,

Show More

“billingCycle” : “PRORATED”,

Show More

“country” : “SA”,

Show More

“currency” : “SAR”,

Show More

“description” : “preprod-org”,

Show More

“hasBillingAdjustment” : true,

Show More

“hasBroker” : true,

Show More

“hasSelfBilling” : true,

Show More

“hasSeparateInvoiceForProduct” : true,

Show More

“id” : “preprod-org”,

Show More

“issueNettingStmt” : true,

Show More

“name” : “preprod-org”,

Show More

“nettingStmtPerCurrency” : false,

Show More

“selfBillingAsExchOrg” : true,

Show More

“selfBillingForAllDev” : true,

Show More

“separateInvoiceForFees” : false,

Show More

“status” : “ACTIVE”,

Show More

“supportedBillingType” : “BOTH”,

Show More

“taxEngineExternalId” : “APIGEE01”,

Show More

“taxModel” : “UNDISCLOSED”,

Show More

“timezone” : “UTC”

Show More

},

Show More

“status” : “ACTIVE”,

Show More

“type” : “UNTRUSTED”

Show More

},

Show More

“endDate” : “2024-10-05 15:47:55”,

Show More

“id” : “54d4d293-250c-438b-ae93-a99d4e0d52b0”,

And at the end of json there are 3 dates as what you mention

Show More

“renewalDate” : “2025-10-04 00:00:00”,

Show More

“startDate” : “2024-10-04 00:00:00”,

Show More

“updated” : “2024-10-04 15:44:49”

My question can I depend on the created date and endDates as accurate dates and can I pass them to the backend?

Hi @Amer-Hijazi

The endDate are seen when the plan is cancelled.

When the plan is purchased, no endplan is set, as said, renewalDate is present.

To answer your query, you can depend on created date and renewal date.

Thanks!

Dear @kedarkhaire ,

I hope you are doing well,

Thank you for your answer.

Do you mean that the end date is not required on the Drupal portal?

On Drupal porta l set it like this, do you mean the endDate is not required here on the developer end subscription and I can make it open like I can charge him per request?

Here is my rate plan and I did not set any endDate

Thank you and best regards

Hi @Amer-Hijazi

Yes I am doing well. Thanks for asking, hope you are doing good too.

Yes the effective date mentioned is the start date of the plan purchased. The endDate is mentioned when it is mentioned while creating the rate plan.

In the Apigee Portal, while creating/editing any rate plan you get the option of Has End Date. Once you enable that and mention the end Date in rate plan, you will be able to see endDate data in your API output.
To answer your previous query - Yes you can depend on the created date and endDates as accurate dates.

Thanks!

1 Like

Dear @kedarkhaire ,

I wanted to inquire if there is any API available in the Apigee Admin that allows me to:

  1. Check the start and end dates of a developer or consumer subscription to a specific rate-plan.
  2. Retrieve the number of remaining requests when the rate plan is bundled and determine how many requests are still available under the subscription.

If you could provide any guidance or documentation on how to achieve this, it would be greatly appreciated.

Thank you for your assistance.

Hi @Amer-Hijazi

Please check this in-detail documentation for your query - https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.apiproducts.rateplans

Thanks!

1 Like

Dear @kedarkhaire ,

I mean how can I check the consumer usage how much he spends from a specific rate plan and how many requests he still has in his subscription so I can send the notification to him through email service in case he exceeds 50% of his requests or 80% in case of rate plan is banded or volume bandle.

Best Regards,

Amer Hijazi

Hi @Amer-Hijazi

For your above request, can you try this documentation - https://docs.apigee.com/api-platform/monetization/create-limit-notification-rate-plan?hl=en

In Drupal you will need to do custom implementation for it.

Thanks!

1 Like

Also this will be helpful - https://docs.apigee.com/api-platform/monetization/testing-monetization

Thanks

1 Like