Please note that the following steps apply for the out-of-the-box Customer Portal.

For configuring PayPal integration in your CP starting VCS-3.13.0 version, you have to do the following:

Step 1: Create a PayPal application

Create your PayPal application here (or use an existing one). As a result, you should have an application that is ready to work and looks like this example:

(warning)   Attention

Be careful: as you can see, there are two modes - “sandbox” and “live”. They have different Client ID and Client Secret values.

Step 2: Configure customer-params.json file

Now you have to redefine default values of PayPal payment gateway configuration section in your customer-params.json file:

  • Enable this payment gateway: set “true” value in “enabled” key.
  • Select correct mode (whether you want to run your system in a test or real mode): set “true” value for “sandbox” or “false” value for “live” mode in “sandbox” key.
  • Put your Client ID and Client Secret according to your mode of application.

Step 3: Webhooks

CP accepts transactions that were made with the PayPal payment gateway using webhooks. It means that you don’t need to worry about IPN action it will be done by the system itself. However, the new transaction might not appear in the system immediately. It could happen because of the internal queue on the PayPal servers. Please note, that according to the PayPal documentation, the links used in webhooks must be secure, public and without any other port but 443. All other types of links would have no effect. It means that you must redefine your “openedEndpoint” value from “http://127.0.0.1/” to something like “https://example.com” (certified - secure connection using HTTP over SSL protocol - and public domain name).

Step 4: Test your CP

Your Refill Balance section must look like this:

After clicking “Process”, clients will be sent to PayPal auth form and would be able to pay the selected amount:

Once webhook action would be called, a new transaction will be created. You will see it in the Payments History section of the CP:

Please note that this action could happen not immediately (usually it takes 1-2 minutes). Also, if your system was not available (for some reason) after payment was sent and the client was charged, PayPal would try to send webhook back 25 times with bigger time gap each attempt, so it will be circa 36 hours PayPal could create a transaction in the system.

(warning)   Attention

For all versions of VCS earlier than 3.19.0, you have to enable and configure Payment Gateways in VCS web admin as well as customer-params.json file. Starting from JeraSoft Billing 3.19.0, you have to configure only customer-params.json file as Payment Gateways section is deprecated.