Skip to content

Transferring an account between resellers without breaking ownership or quotas

Moving an account from one reseller to another inside the same WHM is a one-API call — and a half-dozen things you need to remember so the move stays clean.

A reseller sells part of their book of business to another reseller on the same WHM and assumes the transfer is a billing-system event. Two weeks later the new owner notices they cannot see the accounts in their WHM, the original owner still gets the bandwidth bill, and the customer support emails still route to the wrong address. The accounts moved in the CRM, not on the server. The fix is one API call plus a handful of housekeeping items the WHM interface does not surface.

What’s happening

In WHM, account ownership is a single field — OWNER= in /var/cpanel/users/<user>. Changing it via whmapi1 modifyacct user=acme owner=newvpn reassigns the account: the new reseller sees it in their account list, the old reseller no longer does, the bandwidth accounting (when it next totals) attributes usage to the new owner. What the API call does not do: it doesn’t move the account into the new reseller’s IP pool, doesn’t change the package (the new reseller may not even have a package with the same name), doesn’t update branded webmail templates, and doesn’t move the account into the new reseller’s quota allocation.

How to verify

Before and after the transfer, snapshot the relevant state:

whmapi1 accountsummary user=acme
whmapi1 list_resellers
whmapi1 listaccts search=newvpn searchtype=owner
grep OWNER /var/cpanel/users/acme
whmapi1 listaccts search=oldvpn searchtype=owner | wc -l
tail -f /usr/local/cpanel/logs/access_log | grep modifyacct

The accountsummary output shows owner=newvpn after a successful change. listaccts search=newvpn searchtype=owner confirms the account appears in the new reseller’s list. Counting the old reseller’s accounts before and after gives you a sanity check on whether other accounts were inadvertently affected.

The fix

  1. Verify the new owner exists and has the right ACLs before the transfer: whmapi1 list_resellers | grep newvpn and whmapi1 get_reseller_acl_list user=newvpn. Moving an account to a reseller who lacks modify-acct on it leaves the customer unable to be supported.
  2. Make sure the package exists in the new reseller’s catalog — if it doesn’t, the account keeps its package but the new reseller cannot edit it. Either copy the package definition first or change the account’s plan to one the new reseller owns: whmapi1 changepackage user=acme pkg=newvpn-standard before the owner change.
  3. Run the actual transfer with whmapi1 modifyacct user=acme owner=newvpn. The change is instant; verify with accountsummary.
  4. Update downstream systems: notify both resellers, regenerate any reseller-specific branding for the account (webmail templates, customer cPanel theme), and recompute bandwidth attribution for the current billing period.

When transfers happen often — agency rollups, partner handoffs — Stack Harbor’s agency partner program scripts the full transfer plus downstream cleanup so resellers see consistent state across server, billing, and support.