Free Trial functionality is built into WHMCS which will automatically terminate an account x days after ordering and send an email to the client:

  1. Navigate to Setup > Products/Services > Products/Services > Edit > Pricing tab
  2. Enter the length of your free trial in the Auto Terminate/Fixed Term field (in days)
  3. Select the email to be sent to clients when their free trial period ends and the account is terminated using the Termination Email dropdown
    A new Product-type email template can be created via Setup > Email Templates which will appear in the list

This logic can then be used in conjunction with a promo code to offer customers their first month free whilst still taking their payment details for your security checks:

  1. Go to Setup > Payments > Promotions
  2. Click "Add New"
  3. Enter the promotion code "freetrial"
  4. Change the value to 100.00
  5. Select Monthly from the drop down menu
  6. Set the remaining settings as you would any regular promotion (maximum uses, expiry date, applicable packages)
  7. Click the Create Promotion button

Now you can either have your customers enter the promotion code "freetrial" or use one of the following links to apply the free trial automatically:

http://example.com/whmcs/cart.php?promocode=freetrial  
If you do not wish to collect a client's payment details for a free trial, set the Payment Type value to "Free" under the product's Pricing tab instead.