User Tools

Site Tools


This document outline the basic installation, configuration and the basic usage of the WHMCS Gift Card Module v2.

The usage guide can be found here.


File Uploads

Upload all the files in the modules folder to your WHMCS installation. modules/addons/giftcard & modules/servers/giftcard

Template Uploads

No template upload is needed

Language Uploads

The module includes English as the base language. If you wish to translate it to your own language. Make a copy of the english.php in /modules/addons/giftcard/lang/ to your associated language.



Log into your WHMCS admin and enable the module by going to Setup → Addon Module → Gift Card Module Admin → Activate

Once activated, click on Configure and fill in the license key and make any settings adjustment.

Important!! If your WHMCS is less than version 7.2, then make sure you have selected the proper APIuser with API access.

WHMCS Product Setup

During the initial module activation, the wizard will create a new Product Group and Product (Product Placeholder) in your WHMCS install. Both of these are hidden by default and it does not need to be shown to your customers.

There are few things you would want to adjust before continuing.

  1. Update the Product groups (Gift Card Group) to only allow certain type of payment. This important as you don't want to allow fraud to happen with gift cards
  2. Updating the Product,

2a) You may want to change the Product Name as this will be listed in the invoice item.

2b) Make sure the Welcome Email is matched with the Welcome email (Gift Card Available) the module had created during activation.

2c) Tax, on or off? Some countries require Gift cards purchase to be taxed

2d) Pricing, leaving it as 0.00. They will be adjusted accordingly during checkout

2e) Module Settings → Module Name → Gift Card Provision Module

If you have updated the name of product placeholder, make sure you go back to the Module Configuration in Setup → Addon Modules → Configure and update to the new Product name accordingly to the Generic Product ID dropdown

Note: The product and product is hidden because the module doesn't use the WHMCS system to checkout the order. However, it does use WHMCS's order system + API to manage the orders. Therefore, the Product Placeholder is needed for invoice iteming.

WHMCS Email Template Setup

The module will create the following two email templates into your WHMCS. Gift Card Available and Gift Card Sending Template

Template Description Useable Variable
Gift Card Available This template is used for the Welcome Email for the Product Placeholder
Gift Card Assigned This template is used when you Generate or Import Gift Card Codes in the Admin backend. This will send an notification email to your client that they had been assigned a new Card{$prefix}{$value}{$suffix}{$gc}
Gift Card Sending Template This template is used when your customer want to send out the gift card to their friends via email. {$prefix}{$value}{$suffix}{$gc}{$pm}

If you have updated the name of Gift Card Sending Template, make sure you go back to the Module Configuration in Setup → Addon Modules → Configure and update to the new name accordingly to the Send GC Template dropdown

Gift Card Listing

In order for the module to work in the front end, you must have at least one Gift Card available for purchase. To add a Card for sale, navigate to

Addons → Gift Card Module Admin → Card Management → Create New Listing

To understand what each option does, simply mouseover each option.

HTML codes: <p><br><b><strong><strike> can be used in the Card Description field

Cashier Mode

(New in 2.5)

With Cashier Mode, you can now create a Card Listing which allows for the customer to create their own Gift Card with their defined card value.

There are 4 options for Cashier Mode

Option Description
Cashier Mode Enable the mode for the particular Card Listing. Once enabled, the defined Card Face Value will be ignored
Cashier Mode Minimum Amount This define the minimum value the customer set the Card value as
Cashier Mode Maximum Amount This define the maximum value the customer set the Card value as
Cashier Mode Discount Percentage The percentage you want to give this particular card listing discount off the Face Value. For example, if you set 10 here. That means you will give 10% discount from the Card's purchase. If someone buy a $1000 card, they will get $100 off (10%)

Restriction Group

(New in 2.5)

with the Restriction Group feature. You can now restrict which client in which WHMCS Client Group to be able to Purchase and/or Redeem Gift Card in a particular Gift Card Listing

To utilize this function.

  1. Create a new Restriction Group (Gift Card AddonCard ManagementRestriction Group)
  2. Once created, go back to the Restriction Group and Edit
  3. Now you will be able to select which group is allow to buy/redeem for this Restriction Group
  4. Once you have the Restriction Group ready. Go back to Card Management then you will now see the new group you created in the Restriction Group option dropdown for each Card Listing. You can now adjust accordingly

Note: If a list is empty then that means it is allowed all. The list is activated when there is one or more group inside the list. If you want to allow all Client Groups except for one group (Eg. Group ABC), then you will need to add the rest of the group except Group ABC into the Allow to Buy/Redeem list.

With our seamless template setup, there is no template modification needed. To enable the Gift Card menu in your navigation bar goto the Configuration of the Module and use the following options

Option Description
1) Display Gift Card in Service This adds a new link in the Services sub-menu in the default navigation bar
2) Display menu in navigation menu This will add a new Gift Card sub-menu into the navigation bar
3) Display My Gift Card This will display a My Gift Card link in the Gift Card sub-menu
4) Display Redemption LinkThis will display a Redemption link in the Gift Card sub-menu
5) Display Buy Gift Card This will display a Buy Gift Card in the Gift Card sub-menu
6) Search Sub Card This will display a Search Sub Card in the Gift Card sub-menu

If 2) is disabled, then 3-6 will not show up.

Frontend Workflow

The module work in this workflow

Flow URL
1) Client browse for gift card index.php?m=giftcard
2) Client add to cart index.php?m=giftcard
3) Client select quantity index.php?m=giftcard
4) Order added to WHMCS via API, client redirects to invoice pageindex.php?m=giftcard&action=checkout
5) Once order is paid, your WHMCS could automatically create/activate the cards (based on your Product Placeholder setting) or it will be in Pending Orders waiting on your action
6) Once the card is added to the system (Pending, Activated or Used), the client will be able to see it under their account index.php?m=giftcard&action=managegc or My Gift Cards under Services menu
7) Client will be able to manage the cards in either of the menus
8) Client will only be able to Redeem the cards when it's Activated, not used and not expired

Error Codes

Error Code Solution
Warning Code: CP11 License error, please check your license
No matching Gift Card in the database, please create it manually This error relates to a missing Gift Card entry in the gift card table. You will need to create a new card, assign it to the user then update the Domain field under the Service tab.
whmcs-gift_card_v2_installation.txt · Last modified: 2019/11/28 08:38 by wiki