PD Cloudflare R2 for WHMCS

PD Cloudflare R2 — Sell Zero-Egress S3 Storage from Your Cloudflare Account via WHMCS

Sell S3-compatible storage with ZERO egress fees — provisioned, metered and billed in WHMCS

Made and supported by Projektif Digital Ltd. Runs inside PD Modules, the panel every module installs into.

Object Storage

PD Cloudflare R2 lets a hosting company sell S3-compatible object storage with no data-transfer charges. Your customer orders a storage plan in your WHMCS cart, and a private R2 bucket with its own access keys is created in your Cloudflare account within minutes. Because R2 does not charge for standard data transfer out, you can price storage without worrying about customers who download heavily. You set the price, Cloudflare bills you at cost, and the difference is your margin.

It is built for hosts who want to offer backup and file storage that behaves like S3 with every standard tool, without egress bills eating into the margin and without handing out Cloudflare logins.

Why hosts choose PD Cloudflare R2

No egress fee to plan around. You pay Cloudflare for gigabytes stored per month plus write and read operations. A large restore or a busy download produces no transfer bill, so a customer who moves a lot of data costs you the same as one who does not.

EU-only data residency on request. Customers can choose a data location at checkout: Automatic, a regional placement hint in North America, Europe or Asia-Pacific and Oceania, or European Union only. With European Union only, the bucket is created in Cloudflare's EU jurisdiction and its data stays on EU infrastructure.

Isolation enforced by Cloudflare. Each order gets its own bucket and its own API token scoped to that bucket alone. Even a compromised customer token cannot reach other customers' buckets or your Cloudflare account.

Works with the S3 tools customers already use. R2 is S3-compatible, so the AWS CLI, rclone, s3cmd, Cyberduck, cPanel backup destinations and WordPress backup plugins all connect with the values shown in the client area.

You see what the operations cost. Storage and the number of write (Class A) and read (Class B) operations are measured daily for every service, and customers see their own operation counts for the last 30 days.

Only what R2 can really do. R2 has no object versioning, so the module never offers it. Nothing in the interface promises a feature that would only fail.

How it works

  1. Connect your Cloudflare account. Create an API token with R2 Storage Edit, Account Analytics Read and API Tokens Edit permissions, scoped to the account, and add it with your Account ID on a WHMCS server record. Test Connection checks it before you save.
  2. Create your products. Create a WHMCS product of type Other with this module and generate the cart options: Storage Quota, Max Buckets and Data Location. Set your prices on them.
  3. Your customer orders. They pick a quota and a data location and pay. The bucket and its token are created, and their page shows progress until it is ready, usually within a couple of minutes.
  4. You get paid, they manage it. WHMCS keeps billing as usual, with usage measured daily. Upgrades and downgrades use WHMCS's normal flow and keep the customer's data.

What you get in WHMCS

Selling and pricing

  • Cart options generated in one click: Storage Quota from 10 GB to 5 TB or Unlimited, Max Buckets from 1 to 10, and Data Location
  • Choose which options customers see; anything you hide uses your product's default
  • Customers are emailed at 80% and again at 100% of their quota, and you can copy those emails to your administrators
  • Every overage is shown in your admin panel so you can follow up
  • Usage is written into WHMCS's disk-usage fields, so native overage billing works
  • Customer bucket names start with a prefix you choose, so your brand is on every bucket
  • More than one Cloudflare account, with products assigned to different ones

Provisioning you can trust

  • One bucket and one scoped token per order, created automatically once the order is set up
  • A failed setup is never shown as done: the customer sees a plain message and the exact error is kept in your Activity log
  • A temporary Cloudflare outage does not affect services already running, because customers use their own tokens directly
  • A purge is complete only when the service's token is gone too; if it cannot be deleted, the purge stays queued and is retried
  • Moving a customer to a smaller plan than they already use never deletes anything

Running it day to day

  • Clients & Storage lists every service with its client, state, access mode, quota percentage, usage and last measurement
  • Set any service to read and write, read-only or disabled without changing the customer's keys or touching their data
  • Rotate a customer's keys in one click, with the old keys stopped immediately
  • Retention lists terminated services with a countdown to purge eligibility, with approve and hold controls
  • Reconcile compares your Cloudflare account with WHMCS and flags orphan buckets, missing buckets and stray tokens. It only reports and never changes anything
  • A health report covers the licence, Cloudflare account, services and metering

What your customers get

  • Connection details with copy buttons for the endpoint, bucket, data location and access key, and the secret key whenever they need it
  • Their own buckets, created and removed within the plan limit, with a typed confirmation before deletion
  • Automatic clean-up rules to delete files after a number of days
  • Expiring share links to download a file, or to let someone send one in, with no account on their side
  • Ready-made setups for the AWS CLI, rclone, s3cmd, Cyberduck and WinSCP, cPanel backups and WordPress backup plugins
  • Usage and operations: storage against their quota, a 30-day history, and read and write operation counts
Usage and operations: storage against quota, read and write operation counts for the last 30 days, and a 30-day history. Standard data transfer out is free
Usage and operations: storage against quota, read and write operation counts for the last 30 days, and a 30-day history. Standard data transfer out is free

Bucket management, share links and storage settings are each a switch on the product. Turn one off and it disappears from the customer's page and its actions are refused. The pages render on WHMCS's Six, Twenty-One and Nexus themes and are fully translatable.

Security built in

  • Your Cloudflare token is stored encrypted and never appears on a customer page.
  • A customer's token is bucket-scoped and is revoked at Cloudflare the moment their service terminates.
  • Suspension changes only what the token may do, and the customer's access key and secret stay the same through suspend and unsuspend.
  • Termination deletes nothing at once. Files are kept for a window you set, from 7 to 90 days, and the default purge mode needs your approval. An immediate purge needs the bucket name typed in.
  • Customers never see a raw Cloudflare error.

One product, every feature

PD Cloudflare R2 is one paid module with everything included: provisioning, metering, quotas, operation tracking, key rotation, retention and reconcile. There is no free tier. There are no per-gigabyte fees to us: your buckets live in your own Cloudflare account, you pay Cloudflare at cost and set your own sell price.

Quota emails warn at 80% and 100%. On R2, going over quota never pauses uploads, in either quota mode, because an R2 token cannot allow deleting files without also allowing uploads. You see every overage in your admin panel.

If your subscription ever lapses, nothing is deleted. You get a 14-day grace period with everything working, then admin management locks while customers keep being served, and only after that do customer features pause behind a neutral message. Terminated data is never purged while the module is unlicensed.

Requirements

  • WHMCS 9 or later on PHP 8.2 or later, with the ionCube Loader
  • A Cloudflare account with R2 enabled. R2 is available on every Cloudflare plan but is switched on once from the dashboard, which asks for a payment method
  • The WHMCS cron running, for the daily usage sweep
  • PD Modules, the free control panel every PD module installs into

Questions

Whose Cloudflare R2 account is used?

Yours. You connect your own account, and every customer bucket is provisioned into it. You pay the provider at cost, set your sell price in WHMCS, and keep the difference.

How is each customer isolated?

Every order gets its own bucket and an R2 token scoped to that bucket alone. One customer's credential cannot reach another's data, and your master credentials stay on your WHMCS server — they are never sent to the customer or stored in the client area.

How does billing work?

A daily task measures each service's real usage and writes it into WHMCS's disk-usage fields. Native overage billing, quota warnings and the client-area usage graph then work exactly as they do for hosting products — there is nothing extra to configure.

What happens when a customer hits their quota?

They are emailed at 80% and again at 100%, and you see the overage in the admin panel. Uploads and downloads keep working: an R2 token cannot allow deleting files without also allowing uploads, so pausing uploads would leave a customer no way to free up space. Raising their plan raises the quota with all data preserved.

Is data ever deleted automatically?

Only if you choose that. By default, terminating a service revokes access instantly but keeps the bucket and its contents for a retention window you set. Purging then needs your approval (Manual, the default), and an immediate purge needs the bucket name typed to confirm.

Can customers upgrade or downgrade?

Yes, through the standard WHMCS upgrade/downgrade flow. Quota changes apply with data preserved in both directions; downgrading below current usage never deletes anything; the customer is warned that they are over the new quota.

What do I need on my WHMCS server?

PHP 8.2+ and a working WHMCS cron. The module talks to Cloudflare R2 over its standard HTTPS API — there is nothing to install on the server and no daemon to run.

How is this different from PD Object Storage?

PD Object Storage is the flagship covering Amazon S3, Cloudflare R2, MinIO and DigitalOcean Spaces in one module. This edition is the same engine focused on Cloudflare R2 alone — choose it if that is the only backend you sell, and move up to the flagship if you later add another.

What happens if my subscription lapses?

Nothing of yours is touched, and nothing is deleted. The module steps down in stages instead: a 14-day grace period where everything still works and you get a renewal reminder, then admin management locks while your customers carry on being served, and only after that do the customer-facing features stop — behind a neutral "temporarily unavailable, please contact support" message that never mentions licensing to your customer. Anything the module provisioned keeps running in your own account throughout, and your data and settings stay exactly where they are. Renewing restores everything immediately.

What’s new in 0.1.60

  • Fixed: the Products screen listed nothing when the products were there. It now finds every product this module provisions, whichever billing system you run.

Get your website online with PD Hosting

UK hosting, domains and support from a real team. From a first site to a full server.

Terms and Conditions  ·  Privacy Policy

PD Hosting is the trading name of Projektif Digital Ltd, registered in England and Wales, company number 12482555.

PD Hosting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.