WHMCS API node implementation

npm install whmcs
32 downloads in the last week
52 downloads in the last month

WHMCS node module

WHMCS's API implementation in Node.js

npm install whmcs


First create a api client.

var config = {
  username: 'api_username',
  apiKey: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzz',
  serverUrl: ''

var whmcs_client = whmcs.createClient(config);

Using the previus created api client, call the methods you need.

whmcs_client.billing.getInvoice(invoiceid, function(err, invoice) {

whmcs_client.billing.payInvoice(invoiceid, function(err, data) {

whmcs_client.customers.validateLogin(email, password, function(err, data) {

whmcs_client.customers.getTickets(clientid, status, function(err, tickets) {

whmcs_client.customers.getCustomerEmails(clientid, function(err, emails) {


Implemented methods


  • updateInvoice: function (invoiceid, options, callback)
  • addOrder: function (clientid, order, callback)
  • addCredit: function (clientid, amount, description, callback)
  • payInvoice: function (invoiceid, callback)
  • getInvoice: function (invoiceid, callback)
  • cancelOrder: function (orderid, callback)


  • getContacts: function (clientid, callback)
  • createCustomer: function (ocustomer, callback)
  • updateCustomer: function (clientid, options, callback)
  • updateCustomerDomain: function (domainid, options, callback)
  • getCustomer: function (clientid, callback)
  • getCustomerProducts: function (clientid, productid, callback)
  • getCustomerDomains: function (clientid, domainid, callback)
  • getCustomerEmails: function (clientid, callback)
  • getCustomerInvoices: function (clientid, callback)
  • getTickets: function (clientid, status, callback)
  • validateLogin: function (email, password, callback)


  • getProduct: function (id, callback)
  • getProducts: function (gid, callback)


  • openTicket: function (clientid, department, subject, message, callback)
  • getTicket: function (ticketid, callback)
  • replyTicket: function (clientid, ticketid, message, callback)


  • getDomainLockStatus: function (domainid, callback)
  • setDomainLockStatus: function (domainid, status, callback)
  • getDomainNameservers: function (domainid, callback)
  • setDomainNameservers: function (domainid, nameservers, callback)
npm loves you