1. Home
  2. WHMCS + PayPal Billing Gateway
  3. Documentation
  4. Showing a “Billing Agreement already on file” message in the Client Area Credit Card page

Showing a “Billing Agreement already on file” message in the Client Area Credit Card page

One of the features we introduced in V2.7 is an option to show a warning alert on the top of the Manage Credit Card page in the WHMCS client area if a PayPal billing agreement is stored on the client’s account – to deter/inform the client that the billing agreement will be cleared out should they add a card on file.

This is helpful/recommended to not only remind clients that they have a Billing Agreement on file, but also to clarify to them how a change in payment methods will affect their automatic billing – as WHMCS only allows one tokenized method of payment on file at a time.

Below is a screenshot of what this alert looks like in the client area.


To display the alert, the following conditions must be true:

  • A PayPal Billing Agreement must be active and on file
  • You must add the custom code (below) to your credit cart tpl file.


All of the elements involved in this alert are fully customizable. There are two elements – the language PHP file and the alert.tpl file in our module:

  • modules/addons/paypal_billing_center/lang/yourlanguage.php
  • modules/addons/paypal_billing_center/templates/alert.tpl

The language structure is fully multi-language compatible. Ensure you have a file matching your language inĀ modules/addons/paypal_billing_center/lang/ – otherwise it will default to the english.php file in our module folder.

The alert.tpl file may be edited to your desire, however you must ensure the variables are not changed.


To enable this feature, simply add the following code to your templates/activetemplatefolder/clientareacreditcard.tpl file. Also see below for a full clientareacreditcard.tplĀ file with the included code as an example.

{if $paypaltoken}
{include file="../../modules/addons/paypal_billing_center/templates/alert.tpl" type="warning" headerTitle=$langpb_creditcard_header bodyContentPaypal=$langpb_creditcard_body buttonPayPal=$langpb_invoicebutton_paypal paypaltoken=$paypaltoken bodyTextCenter=true}

This code should be added after line 7 of the file – after the {else} condition.

Updated on September 28, 2017

Article Attachments

Was this article helpful?