PBNDocumentation
Porkbun for WHMCS — the manual
13 chapters covering everything from the Porkbun account rules that catch people out to the per-TLD markup rule syntax. Each one stands on its own, so start wherever your problem is.
Getting started
What the module is, what it needs, and getting it installed.
- OverviewA free, MIT-licensed WHMCS registrar module for the Porkbun v3 API: registration, renewal, transfers, DNS, contacts, automatic retail pricing, availability lookups and webhooks.
- RequirementsWhat the module needs from your server and, more importantly, from your Porkbun account: verified email and phone, prepaid credit, the manual first registration, and API Access opt-in.
- Installing the moduleUpload the module to modules/registrars/porkbun, activate it in WHMCS, enter your API keys, set default nameservers and assign it to your TLDs.
- Configuration referenceEvery setting on the Porkbun registrar configuration page and what it actually does: credentials, default nameservers, registrant push, DNS deletes, pricing and webhooks.
Pricing
Turning Porkbun's cost prices into your retail prices, and keeping them there.
- Automatic pricingKeep WHMCS domain prices in step with Porkbun's costs automatically. The Import Pricing wizard for a one-off, or a nightly sync that applies your markup to current costs.
- Markup rulesThe per-TLD markup rule syntax in full: selectors, percentages, fixed uplifts, minimum margins, flat prices, rounding and skip — with worked examples and how a rule is chosen.
Running it
Domain search, real-time updates, DNS and nameservers.
- Availability lookupsUse Porkbun as the WHMCS domain search provider: registry-accurate answers, 25 domains per API call, and why premium and unanswered domains are handled the way they are.
- WebhooksSet up signed Porkbun webhooks so a transfer that completes overnight shows as active in about a minute instead of waiting for the domain sync cron.
- DNS and nameserversHow the WHMCS DNS tab maps to Porkbun host records, what a new registration gets for nameservers, why TTLs are preserved, and why deletes are off by default.
Reference
The command line, error messages, common questions and the honest limits.
- Command line referenceThe two command line scripts in full: pricing.php for previewing and applying retail prices, and webhook.php for registering, listing, testing and disabling endpoints.
- TroubleshootingThe errors this module produces and what to do about each: INSUFFICIENT_FUNDS, the first-registration block, API Access opt-in, pricing surprises, transfers and webhook rejections.
- FAQShort answers to the common questions: reseller pricing, multi-year terms, premium domains, WHOIS privacy, EPP codes, idempotency and running alongside another registrar.
- Limits and known gapsEverything the module cannot do and why, all of it Porkbun API constraints: EPP retrieval, registrar lock, multi-year terms, premium domains, .uk transfers and rate limits.
New to the module?
Read the requirements first. The module installs in ten minutes, but the Porkbun account rules — a verified account, prepaid credit, and one registration placed by hand — are what stop a perfectly good install on its first order.