1. Home
  2. WHMCS + PayPal Billing Gateway
  3. Documentation
  4. How PayPal Billing Agreements are stored/displayed in our gateway

How PayPal Billing Agreements are stored/displayed in our gateway

Our gateway handles the storage and display of client Billing Agreements in a few different ways.

Billing Agreement Storage

Our gateway stores a billing agreement ID in two different places when it is created by a client.

  1. mod_paypalbilling table. This is a module-related table that handles the storage of all billing agreements – for records/historical purposes only. This is helpful to allow you to see a list of all Billing Agreements a client has had. Our Summary page in Addons > MyWorks PayPal > Summary > Billing Agreements pulls from this page.
  2. tblclients > gatewayid field. This field is where WHMCS specifies the gateway token must be stored to keep a token for recurring billing on file. The green summary box in the admin Client Summary tab shows the value in this field. Our gateway stores the Billing Agreement here upon creation, and it is not removed from this field unless:
    1. The billing agreement is cancelled (either in PayPal or via WHMCS).
    2. The billing agreement is removed or cleared by the admin.

Billing Agreement Display

Our module allows you to view the billing agreements a client has /has had on file in a few different ways.

  1. By visiting Addons > MyWorks PayPal > Summary > Billing Agreements. This page shows a list of all billing agreements clients have created – pulled from our mod_paypalbilling table (more about that above). This is not an accurate indicator of which Billing Agreement a client has actively on file, as that would be decided by the value stored in the tblclients>gatewayid field. See more on this below:
  2. By visiting Admin > Client > Summary tab in WHMCS. If a client has an active billing agreement on file (in tblclients > gatewayid field), a bright green box will appear in the top right of this page showing the active billing agreement, with an option to manage/view it. It can be also removed/cancelled from this dialog as well.
Updated on August 15, 2017

Was this article helpful?