Skip to main content

How to configure PayPal integration for Customer Portal?

note

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:

PayPal application

warning

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.
  • Input 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.

info

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:

PayPal application

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

PayPal application

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

PayPal application

tip

Please note that this action might not be immediate (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, during which PayPal could create a transaction in the system.

warning

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.