Skip to content
2E0JWR
PBNOpen source · side project

A Porkbun registrar module for WHMCS

Connects WHMCS to the Porkbun v3 API so domains your customers order are registered, renewed, transferred and managed automatically — with the part most registrar modules leave out: your retail prices kept in step with Porkbun's costs, every night, on your own markup rules.

Free · MITWHMCS 8.xPHP 7.2 – 8.3No Composer dependencies

What it does

It installs like any other WHMCS registrar, sits alongside the ones you already use, and is assigned per-TLD — so you might run .com through Porkbun and leave .co.uk where it is.

Registration, renewal and inbound transfer run through the API against your Porkbun account credit. Nameservers and DNS host records are managed from WHMCS. Contacts are readable and editable. Expiry and status sync back on the daily cron, and optional signed webhooks push changes the moment they happen instead of waiting for it.

The pricing problem it solves

Porkbun has no reseller tier, so the prices it quotes are what your account pays. Those costs move — registries raise prices and promotional first-year rates end — while a WHMCS price list is a set of fixed numbers only as current as the last time somebody updated them.

The failure mode is quiet: a TLD’s renewal cost creeps past your retail price and you find out when you look at the margin on a year’s renewals. The nightly sync applies your markup rules to Porkbun’s current costs, so a registry price rise reaches your price list before it reaches your margin.

What it supports

Including what it cannot do. Every gap below is a Porkbun API constraint rather than a module decision, and they are listed here rather than buried because they are what people hit on day one.

  • Registersupported1-year term (registry minimum via API)
  • Transfer insupportedNeeds the EPP code; not available for .uk via API
  • Renewsupported1 year per call; domain must be >30 days old
  • Get / set nameserverssupported
  • DNS host recordssupportedAdd and update always; delete is opt-in
  • Domain contactssupportedRegistrant change triggers ICANN verification
  • Expiry / status syncsupported
  • Webhooks (real-time)supportedCuts transfer-completion lag to about a minute
  • Availability lookupssupportedRegistry-accurate, 25 TLDs per API call
  • Import TLD pricingsupportedCost prices into the WHMCS wizard
  • Retail pricing syncsupportedYour markup on Porkbun's cost, written daily
  • EPP / auth code retrievalnot supportedNo Porkbun API for it — use the dashboard
  • Registrar lock togglenot supportedNot exposed by the API
  • ID protection togglenot supportedFree WHOIS privacy is set at registration
  • Premium domainsnot supportedThe API cannot register, renew or transfer them

Documentation

13 chapters, each written to stand on its own.

Getting started

What the module is, what it needs, and getting it installed.

Pricing

Turning Porkbun's cost prices into your retail prices, and keeping them there.

Running it

Domain search, real-time updates, DNS and nameservers.

Reference

The command line, error messages, common questions and the honest limits.

Getting the module

The source is MIT licensed and will be published shortly — the documentation is here first. If you want it before then, get in touch and I will send you a copy.

Questions

Does Porkbun have reseller pricing?

No. Porkbun has no reseller tier. You register at Porkbun's normal published prices in your own account and set your own margin in WHMCS. What you get is a low cost base, not a wholesale one — which for most TLDs still lands below what a small-volume reseller account elsewhere would cost.

Can I sell multi-year registrations?

Not reliably. The API registers and renews the registry-minimum term — usually one year — per call. A three-year order registers one year and writes a note to the module log. The pricing sync defaults to switching years 2–10 off in WHMCS so the longer terms cannot be sold.

Can I sell premium domains?

Not through the API. Porkbun cannot register, renew or transfer premium names programmatically. Availability lookups show them as unavailable, and registration and transfer refuse them before the customer is charged. Sell them from the Porkbun dashboard and invoice manually.

Can I run it alongside my existing registrar?

Yes. It is assigned per-TLD in Domain Pricing, so you can move .com across and leave everything else where it is. Existing domains stay with whichever registrar registered them. The pricing sync never takes a TLD away from another registrar.

Does it need Composer or any external libraries?

No. The module is self-contained — WHMCS 8.x, PHP 7.2 to 8.3 and cURL, all standard on a normal WHMCS host.

Is the source available?

Yes, MIT licensed — do what you like with it.

Start with the requirements

The module installs in about ten minutes, but the Porkbun account rules are what catch people out — a verified account, prepaid credit, and one registration done by hand before the API will place any.