Thanks to info in the thread below, I have modified the original post here…
I thought perhaps someone in the Cloudflare Dev API Community might have some information to share…
SHORT VERSION
Is there a way for me to get the usage for my account - for metered items - in real-time via API? I am using the example of image resizing below, but this would be for any metered Cloudflare service.
We need to know our usage in real-time via API.
We need to have this metered usage per site, not per account.
Does anyone know if this works with Zapier?
We need to connect Cloudflare billing to Stripe credit card processing metered billing.
LONG VERSION
We are developing a Managed Wordpress Hosting company.
Our goal is to package services such as Cloudflare Pro/Cloudflare Business plans with Image Resizing for our clients.
THIS IS OUR THOUGHT PROCESS
We would really like to find a flat monthly price for our clients. We can do that with the Pro and Business plans since those are flat-rate.
However, with the Image Resizing add-on, it seems we would need to meter the billing since the cost is $10 per 100K requests.
Since Image Resizing is metered, metered billing for our clients is then also necessary.
Cloudflare bills our company = we bill our clients. We want this done automatically.
We use Stripe for our credit card processor. We need to connect Stripe somehow to Cloudflare. OR we need at least use Zapier to connect the two with an intermediary service. When looking on Zapier.com the only integration we find is for Amazon CloudFront, but nothing for Cloudflare. This makes it a bit more difficult.
TO RESTATE IN ANOTHER WAY
Essentially, the question is, how can we get our Cloudflare billing via API and connect it to Stripe?
We add a site to Cloudflare
Cloudflare bills our company $10 per 100K requests for Image Resizing
We THEN bill OUR clients via Stripe credit card processor
We do not want to do this manually. We need to do this automatically such as…
Cloudflare bills our company $10 > our company bills client $10 AUTOMATICALLY (Stripe does have metered billing support, fortunately)
We need to connect Stripe with Cloudflare via API so the client gets billed automatically monthly. Does anyone have any insight on how we would accomplish this?
We need to have this metered usage per site, not per account.
However, if we could find a way to flat-rate the Image Resizing add-on we could avoid the metered billing and simplify the process, but that does not seem feasible as the $10 per 100K requests could be infinite.
Thanks to the previous info in the thread I have modified the original post here…
I thought perhaps someone in the Cloudflare Dev API Community might have some information to share…
SHORT VERSION
Is there a way for me to get the usage for my account - for metered items - in real-time via API? I am using the example of image resizing below, but this would be for any metered Cloudflare service.
We need to know our usage in real-time via API.
We need to have this metered usage per site, not per account.
Does anyone know if this works with Zapier?
We need to connect Cloudflare billing to Stripe credit card processing metered billing.
LONG VERSION
We are developing a Managed Wordpress Hosting company.
Our goal is to package services such as Cloudflare Pro/Cloudflare Business plans with Image Resizing for our clients.
THIS IS OUR THOUGHT PROCESS
We would really like to find a flat monthly price for our clients. We can do that with the Pro and Business plans since those are flat-rate.
However, with the Image Resizing add-on, it seems we would need to meter the billing since the cost is $10 per 100K requests.
Since Image Resizing is metered, metered billing for our clients is then also necessary.
Cloudflare bills our company = we bill our clients. We want this done automatically.
We use Stripe for our credit card processor. We need to connect Stripe somehow to Cloudflare. OR we need at least use Zapier to connect the two with an intermediary service. When looking on Zapier.com the only integration we find is for Amazon CloudFront, but nothing for Cloudflare. This makes it a bit more difficult.
TO RESTATE IN ANOTHER WAY
Essentially, the question is, how can we get our Cloudflare billing via API and connect it to Stripe?
We add a site to Cloudflare
Cloudflare bills our company $10 per 100K requests for Image Resizing
We THEN bill OUR clients via Stripe credit card processor
We do not want to do this manually. We need to do this automatically such as…
Cloudflare bills our company $10 > our company bills client $10 AUTOMATICALLY (Stripe does have metered billing support, fortunately)
We need to connect Stripe with Cloudflare via API so the client gets billed automatically monthly. Does anyone have any insight on how we would accomplish this?
We need to have this metered usage per site, not per account.
However, if we could find a way to flat-rate the Image Resizing add-on we could avoid the metered billing and simplify the process, but that does not seem feasible as the $10 per 100K requests could be infinite.
I don’t think Cloudflare is particularly thrilled about your use case:
2.1 Access to Cloud Services
Cloudflare hereby grants to you a limited, revocable, non-exclusive, non-transferable, and non-sublicensable (except to Affiliates) right, to access and use the Cloud Services
2.2 Restrictions
Unless otherwise expressly permitted in writing by Cloudflare, you will not and you have no right to:
(a) rent, lease, loan, export or sell access to the Cloud Services to any third party;
You must become an affiliate, by contact Cloudflare’s sales. In those instances there may be more specific billing stats. Contact them directly, don’t use the Community.
I already contacted sales. This isn’t a question for sales, it is beyond their knowledge. I’m not looking for more specific billing into. I’m looking for API info that accesses basic billing info. This is a tech functionality question specific to Stripe etc. Which is outside the scope of Cloudflare sales and tech support. I need to know if it’s possible and how it might be done from someone who may have experience before we decide if we will choose to be an affiliate. Asking the community is a reasonable solution.
Does anyone have any solutions or experience with this?
Re-charging your clients for Cloudflare features is very likely against Cloudflare’s terms of service as I have already mentioned - unless your lawyer thinks this is legal/not against CF’s TOS or you get CF’s written permission, I wouldn’t suggest performing the actions you’re asking about (I do not work for Cloudflare and I am not a lawyer).
As for the actual functionality, CF does not provide the functionality you’re asking for in terms of per-site granular billing.
Helllo, as you excerpted above, it says “(except to affiliates)” which we would become, as we already mentioned, should we first determine what we are looking for is possible. We have no plans of performing the functions until that affiliate status has been established.
At the moment, this is a decision between Cloudflare and Amazon CloudFront, a strong competitor. We’d prefer to use Cloudflare for several reasons and are looking for information. A lawyer isn’t necessary to obtain information regarding functionality, but I thank you for your opinion.
We look forward to hearing other information from other people in the community.
We have already contacted both sales and support. Neither of them were concerned about our process of seeking information. It is a non-issue at this point.
I’ve not seen anything in the Billing API that’s anything like realtime. All I know from a regular user standpoint, is what shows up in my Billing section of the Cloudflare dashboard.