Hero Banner

Key Resources and Guides

Find key resources and guides that you can accelerate implementations

Level 4 Contributor

API to calculate Billing Cycle of a Azure CSP/Non-CSP Subscription/Saving Plan Entitlement



Is there any direct API available to find the Billing Cycle of a

  • Azure CSP Subscription and Azure Plan/Entitlement  of a CSP Customer?
  • Azure Non CSP subscription?

As of now we fetch the latest invoice and from that invoice we get billing charge start date and billing charge end date to calculate the billing cycle.


But for new subscriptions where there is no invoice generated we can not calculate the billing cycle so looking for a direct API.


Also Does all customers of a CSP Partner share same billing cycle?



I don't know any.

Since the billing period for CSP subscription is the same for all customers, it would be sufficient to get this one time, at least in my understanding.


I'd advise you you open an advisory ticket in Technical PreSales & Deployment services team (https://aka.ms/technicalservices) to let one my colleagues research if there would be a better way to do this: https://aka.ms/tpdmsform 



For old/legacy Azure offerings and all license-based services the billing cycle is set by the Partner, it is the same for every customer and will never change.

For Azure Plan it is always the calendar month.

So you would not need to query this for a specific customer, it is the same for everybody


Edit: Now I saw that you mentioned "non CSP subscription" - why do you want to query the billing cycle for a customer that is not buying from a CSP?

Level 4 Contributor

Thanks for reply,

Can you point me the API to get the billing cycle set by partner For old/legacy Azure offerings and all license-based services  ?

For Non csp subscription I need to get billing cycle for the customer because I want to calculate the cost and usage for that customer in his billing cycle. Is there any API where I can get this billing cycle for non csp subscription customer?


I would query the invoice information for the start & end dates: https://docs.microsoft.com/en-us/partner-center/develop/invoice-resources


On the second question - for this you could use the Azure Billing API, this does also return invoice start & end dates: https://docs.microsoft.com/en-us/rest/api/billing/2019-10-01-preview/invoices/listbybillingaccount

Level 4 Contributor

Unfortunately I do not want to go with invoice way(I am doing same currently), as it creates problem when there is a new subscription and no invoice is till now generated, in that case I will not get billing period.


so is there any API (For CSP Subscription/Azure Plan Entitlement and Non CSP Subscription) which gives me billing cycle irrespective of there is invoice or not?