# Quick Setup Guide

### Paddle Configuration

Login to your Paddle Vendor Dashboard at <https://vendors.paddle.com>

**From the left sidebar, choose Checkout > Website Approval**

Click on Add a new domain and add your WHMCS domain, or subdomain

For example: if your WHMCS is hosted at billing.domain.com, enter that. Otherwise if it is hosted at domain.com/billing then enter domain.com and click on the Submit For Approval button

| Subdomain          | Directory  |
| ------------------ | ---------- |
| billing.domain.com | domain.com |

<figure><img src="/files/l0zJq6vfFBNPN6kkZvnz" alt=""><figcaption></figcaption></figure>

**Then, from the left sidebar, choose Checkout > Checkout Settings**&#x20;

Set the Default payment link as below and save

For example: if your WHMCS is hosted at billing.domain.com, enter <https://billing.domain.com/viewinvoice.php> . Otherwise if it is hosted at domain.com/billing then enter <https://domain.com/billing/viewinvoice.php>

| Subdomain                                    | Directory                                    |
| -------------------------------------------- | -------------------------------------------- |
| <https://billing.domain.com/viewinvoice.php> | <https://domain.com/billing/viewinvoice.php> |

<figure><img src="/files/npv8jMANXXkZv2UAjuFk" alt=""><figcaption></figcaption></figure>

**Then, from the left sidebar, choose Checkout > Sales Tax Settings**

Select the Sales Tax Setting required and press Save Changes

<figure><img src="/files/OgTPOJfms5L1Ur1FmCKC" alt=""><figcaption></figcaption></figure>

**Then, from the left sidebar, choose Developer Tools > Authentication**

Click on Generate API Key

<figure><img src="/files/v9eMFqDc8A7lU5g5RiVr" alt=""><figcaption></figcaption></figure>

Give it a familiar name, and press the Generate button, copy the key as you will need it later when configuring the payment module in WHMCS

Next, click on Generate client-side token

<figure><img src="/files/eU4mypYeC7HMgQsSWVLV" alt=""><figcaption></figcaption></figure>

Give it a familiar name, and press the Generate button, copy the token as you will need it later when configuring the payment module in WHMCS

**Then, from the left sidebar, choose Developer Tools > Notifications**

**Click on New Destination**

<figure><img src="/files/AEjhhr0wS20zENMaibz0" alt=""><figcaption></figcaption></figure>

Give it a familiar description, choose Webhook for notification type and for the URL it will be one of the below depending on your setup

| Subdomain                                                              | Directory                                                              |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| <https://billing.domain.com/modules/gateways/callback/paddlelayer.php> | <https://domain.com/billing/modules/gateways/callback/paddlelayer.php> |

Under Events, choose the below 3 Events

<figure><img src="/files/OVvABbTj4ogbNOAtAjyj" alt=""><figcaption></figcaption></figure>

Press Save Destination.&#x20;

Now, click the ... button and click on Edit destination

<figure><img src="/files/HVELClzM86PoMdmO1f2T" alt=""><figcaption></figcaption></figure>

Now copy the Secret Key, this will be the 'Notification Secret Key' which you will need when you configure the module in WHMCS.

<figure><img src="/files/2qBZmbuJR4gO6ssuJIEX" alt=""><figcaption></figcaption></figure>

Everything is ready and configured on Paddle side.&#x20;

### WHMCS Configuration

* Download the latest .zip of the Paddle module file from the Layer client area - <https://my.layer.ae>
* Unzip the .zip file and place the contents into the WHMCS directory
* Login to the admin side of WHMCS, and go to Setup > Apps & Integrations (as below)

<figure><img src="/files/bx6nFMDNzF0ct0tREKDX" alt=""><figcaption></figcaption></figure>

* Click on Browse, and then click on Payments under categories, and look for the Layer Paddle Billing module

<figure><img src="/files/TeBXUm2fxNpgmcyj1aOV" alt=""><figcaption></figcaption></figure>

* Click on Layer Paddle Billing, and then click on Activate

<figure><img src="/files/rdy85GQHHTeGV5dXI9Fv" alt=""><figcaption></figcaption></figure>

* Fill in your Layer license Key, your Paddle API Key (from the previous steps), your Paddle Client Side Token (from the previous steps) and your Notification Secret Key
* Select the currency to charge in (this should be an enabled currency in your paddle account)
* Select the Paddle Sales Tax Setting
* If your WHMCS has multiple currencies, you have to set "Convert To For Processing" to match the charge currency

Congratulations! Everything is ready for you now. You can create a test invoice, and go through the flow.

{% hint style="info" %}
To use the sandbox mode, you need to register on the paddle sandbox environment at <https://sandbox-vendors.paddle.com> the steps are the same - you only need to enable sandbox mode in the module setting in WHMCS for the module to use Paddle's sandbox environment.
{% endhint %}


---

# 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://layerlabs.gitbook.io/paddle-billing/quick-setup-guide.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.
