Cloudflare > Stripe Metered Billing for our clients

Edited

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 :upside_down_face:

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?

  1. We add a site to Cloudflare

  2. Cloudflare bills our company $10 per 100K requests for Image Resizing

  3. We THEN bill OUR clients via Stripe credit card processor

  4. We do not want to do this manually. We need to do this automatically such as…

  5. 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.

 

Here is the Stripe Metered Billing doc

 
 

Thank you for any help you can offer,

Jas

1 Like

You need to investigate the resources available for Cloudflare Partners. Not something I know much about, other than it exists.

Also, I do not think Polish is billed on usage, it’s included on Paid plans, which are typically per zone.

2 Likes

Hi, polish is free for the first 100k requests, after that is is $10 per 100k requests.

1 Like

[ citation needed ]

Image Resizing is priced like that, but Polish is not.

3 Likes

Can confirm, Polish is free on Pro and up. Image Resizing is paid.

2 Likes

Ah thanks, yes that is what I meant. I will restate the request…

1 Like

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 :upside_down_face:

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?

  1. We add a site to Cloudflare

  2. Cloudflare bills our company $10 per 100K requests for Image Resizing

  3. We THEN bill OUR clients via Stripe credit card processor

  4. We do not want to do this manually. We need to do this automatically such as…

  5. 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.

 

Here is the Stripe Metered Billing doc

 
 

Thank you for any help you can offer,

Jas

1 Like

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;

2 Likes

(except to Affiliates) which we would become similar to WPEngine for example


Does anyone have any solutions for this?

Thanks,

Jas

1 Like

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.

3 Likes

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?

Thank you,

Jas

1 Like

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.

1 Like

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.

Thank you for your help,

Jas

1 Like

There is a partner API explicitly for your use case.

2 Likes

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.

And there are API calls in place, such as this:
https://api.cloudflare.com/#user-billing-history-billing-history-details

So this would most likely be a batch job you’d have to create and run.

2 Likes

Thank you got the helpful info @michael !

1 Like

Thank you got the helpful info @sdayman !

2 Likes