WHMCS Auto-Update Domain Pricing based on Registrars' Costs

Back   Posted on 9 january 2023 / Updated on 2 february 2023
Reading time 5 minutes

Updating Domain Pricing Based on Registrars' price list

Tracking domain costs in WHMCS isn't easy especially as you grow. Getting it wrong can hurt your business. Not having domain pricing up to date can result in lost profits or even worse selling at loss. It's time to get it right.

Billing Extension includes a plugin named Domain Repricing that works with Internetbs and Namecheap. On a daily basis when WHMCS cron job runs, the plugin performs the following actions:

  • Retreive current costs from Internetbs and Namecheap via API
  • Recalculate selling prices in line with the specified markup value
  • Optionally apply prices for new registrations, transfers and renewals
  • Optionally apply prices for existing domains (recurring amounts)

Supported Registrars

At the moment of writing this, the supported Registrars are Internetbs and Namecheap.

If there is enough interest we may add new ones in the future but keep in mind not all Registrars can be integrated. The essential requirement is that the Registrar allows the obtaining of price list via API.

Requirements

Domain Repricing plugin relies on the connection you already use to register, transfer and renew domains. As long as API credentials stored in WHMCS are correct Domain Repricing will work.

For Namecheap there is an additional requirement. Since Namecheap transmit prices in USD, we have to take care of currency conversions. Simply make sure USD currency exists in your WHMCS. For more details read the following chapter.

Support for Multiple Currencies

Domain Repricing automatically handles conversions using conversion rates specified in System Settings > Currencies. WHMCS can automatically update such rates. You just have to enable the option from Automation Settings page.

The Logic behind Domain Pricing Update

Domain Repricing sticks to your current settings and doesn't do anything in contrast with them. To better express how it works, let's take this screenshot as an example.

Green boxes are subjected to changes in line with current Registrars' costs and markup settings. If one of the two varies, all these prices are increased or decreased accordingly. As for red boxes they never change since they have been disabled (-1.00) or completely turned off.

Regarding Pricing Slabs they are not affected by repricing therefore you can safely maintain existing customizations.

Customizing Roundings

Don't like complex numbers? You can design them as you like. Let's say you want to round up numbers to nearest 0.50. Set Domain Repricing > Rounding to 0.50 to get the following results:

  • 7.44 rounds to 7.50
  • 7.10 rounds to 7.50
  • 7.51 rounds to 8.00

Let's make another example with 1.00:

  • 7.50 rounds to 8.00
  • 7.10 rounds to 8.00
  • 6.49 rounds to 7.00

Last example with 0.25:

  • 7.19 rounds to 7.25
  • 7.40 rounds to 7.50
  • 6.99 rounds to 7.00

You can set any rounding style you like from 0.01 to 1.00. Leave zero if you are fine with any number.

Be advised the system always rounds up numbers based on 1 Year period. The reason is that adding up multiple roundings lead to wrong prices. As a reference given a 1 year price of 7.50, the price for 2, 3 (...) years is equal to 7.50 multiplied by 2, 3 etc.

Markup

Markup (profit calculated above costs) can be defined as percentage, fixed amount or both. Let's say .it extensions costs you 6.24 euro to register on Internetbs. Set 80% + 0.50 euro markup to get a selling price of 11.73 euro.

Keep in mind nothing stops you from selling at lost or at price cost. In the first case define negative markup values. In the latter leave zero.

Excluding TLDs

You can freely create an exclusion list by simply selecting extensions from a list. This way you can prevent the module from refreshing Domain Pricing for excluded TLDs.

It is worth to underline that excluded TLDs still works with Update Recurring Amounts functionality. The only difference is that the module updates recurring amounts when you manually change prices from WHMCS. The update takes place every time WHMCS runs daily cron job.

Additional Exclusions

The module allows to create detailed exclusions involving specific domain names and customers. For instance you can maintain a list of domains (eg. example.com, example.it) and customers (eg. Sara, Mark) that are never subjected to changes.

 

 

Customizing Pricing Update

Pricing update can run selectively. It can be set to affect new purchases (System Settings > Domain Pricing), existing domains or both. It's up to you.

PayPal Subscriptions

Let's start by saying that as long as Registrars' price lists and your markup settings are constant, prices are left unchanged. In this case existing PayPal subscriptions are perfectly fine.

The problem arises only when due to changes in price lists or markup settings selling prices rise and vice versa. In both scenarios cancelling subscriptions is recommended so you can maintain a good customer experience. Here is why.

Today a customer registers a .it domain for 10 euro creating a PayPal subscriptions based on current Registrar's cost of 5 euro plus 100% markup. For the same price he also registers a .fr domain (same cost and markup).

Next year Registrar's costs for .it rise to 5.5 euro while .fr drops to 4.5. Renewal prices are now 11 and 9 euro respectively. PayPal doesn't know anything about it and still sends two payments of 10 euro producing the following results:

  • .it proforma remains Unpaid with an amount due of 1 euro
  • .fr proforma is Paid but causes an overpayment of 1 euro

You can avoid such issues by simply enabling Cancel PayPal Subscriptions on Price Change. Thanks to this feature the module detects price changes and automatically cancel PayPal subscriptions when needed.

Unfortunately WHMCS doesn't provide developers an internal API command that can be used to cancel subscriptions therefore you will be required to enter your PayPal API Client ID and Secret Key.

Such details stay on your system and can only be used to cancel subscriptions. Simply put it is used to replicate the pressing of Cancel Subscription button so that you don't have to do it manually.

Installing Domain Pricing

Navigate to Addons > Billing Extension > Settings and click the "+" icon to access plugins page. Activate the plugin and go back to the previous page to configure it. Once finished wait for WHMCS cron to trigger pricing update.

Having problems? Read this

If there is a problem in the connection with Internetbs, Namecheap or PayPal you'll find details in WHMCS Activity Log. Don't forget that price update triggers only if:

  • Domain Pricing is Active
  • At least one Registrar has been selected
  • Update Selling Prices or Update Recurring Amounts is enabled

Comments (0)

Speak Your Mind Cancel Reply