# Paypal Configuration

In this section, we will go through how to configure your Paypal account to work with your Class 4 installation.

Step 1: Go to developer.paypal.com

![](/files/-MXmdUv3vjbaWf37y1ED)

#### Step 2: Go to "My Apps & Credential"

In this section, you need to create an APP.  You can crate either a Sandbox or Live APP.  Sandbox will accept test account and test credit card.  Live APP only accept real paypal account and real credit card.&#x20;

![Create an APP](/files/-MXmdiheZtX6lglhoNT8)

#### Step 3: Fill out APP details

![](/files/-MXme6ht5rUQDMqOSZBs)

#### Step 4: Review your APP information

![](/files/-MXmecixixs4QP8cvFL3)

This Client ID and Secret should be placed inside the Paypal section like below:

![](/files/-MXmerThYM35GtBXu14Z)

Here you can select to charge the total amount that the user paid or the amount that actually got credited to your paypal account after the Paypal fee. &#x20;

If you select "Enable Paypal Test Mode", Class 4 will send query to the Paypal Sandbox URL instead of the Live Paypal URL.

#### Step 5: Specify Webhook and select the events that Class 4 needs

In the APP setting, you also need to setup Webhook.  This webhook is needed for Paypal to tell Class4 when a user has paid.&#x20;

![Webhook Setting](/files/-MXmfUp5hhdsWoKKOIlJ)

In the Paypal Webhook URL, you copy that URL.

![](/files/-MXmfjCJOo9wLdcGZa7P)

Then, you enter that webhook URL to the following:

![](/files/-MXmg3FQk4YhGERIGvCx)

You can set "all" but Class 4 only expects 'PAYMENT.SALE.COMPLETED' in fact.&#x20;

## Troubleshoot

You must use HTTPS and a domain name when setting up webhook in Paypal.  That means your Class 4 portal must be setup with a https domain url.  Otherwise, Paypal will complaint the following error:

![](/files/-MZuh5IyvSgX3bpYSPwe)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cookbook.denovolab.com/configuration/configuring-payment-gateway/paypal-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
