# PayPal

{% embed url="<https://www.youtube.com/watch?v=mjU8B8lCXeI>" %}

**The Cost Calculator Builder** provides seamless integration with PayPal, allowing it to be used as a payment method for your business. You can configure a default PayPal account to be used across all calculators via [**Global Settings**](#global-settings). Additionally, within the [**individual settings**](#settings-in-the-calculator) of each calculator, you have the option to link separate PayPal accounts to receive payments specifically for that calculator.

## PayPal via Global Settings

You can integrate and set up **Paypal** to the Cost Calculator in the Payments of the **Global settings**. To do this, go to **Global Settings >Payments > Paypal Payment** and you can see these settings:

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

* **Apply to all calculators** - The settings you put here will apply to all calculators.
* **Integration type** - choose the way of integration: [**Legacy**](#paypal-legacy-integration) or [**REST API**](#paypal-rest-api-integration)
* **PayPal IPN setup** - It is a shortcode you put in your PayPal account to specify the calculator(listener).
* **Account Type** - You can choose the **Live** (for getting payments) or **Sandbox**(for testing the integration) account types.
* **Currency** - Choose the currency in which you want to make payments.

{% hint style="info" %}
IPN lets you get information about transaction events, such as payments received on your services and products. To learn how to set up PayPal IPN, read [PayPal’s documentation](https://developer.paypal.com/api/nvp-soap/ipn/IPNSetup/).
{% endhint %}

### PayPal Integration Types

Cost Calculator Builder offers two types of integration for **PayPal:**

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

[**Legacy Mode (PayPal Email)**:](#paypal-legacy-integration)

* **Simplicity**: Users only need to provide their PayPal email address, making this method quick and easy to set up.
* **Limited Functionality**: This method typically supports basic payment processing but lacks advanced features like transaction management, payment tracking, and more detailed reporting.
* **Use Case**: This is suitable for users who need a simple, straightforward way to accept payments without diving into more technical setup processes.

**REST API (Client ID and Secret Key)**:

* **Advanced Features**: Users need to generate API credentials (Client ID and Secret Key), which provide access to more powerful features like advanced payment options, better security, and detailed transaction management.
* **Customization**: The REST API integration allows for more flexibility, including handling payments programmatically and getting more insights into the payment data.
* **Use Case**: This is ideal for users who want a more robust solution are comfortable with handling API credentials and prefer greater control over the payment process.

## PayPal Legacy Integration

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

In the **Legacy mode** of integration all you have to do is to provide your **PayPal email** address to the designated area to receive funds.

## PayPal REST API Integration

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

In the **PayPal REST API** mode of integration, special **Client ID** and **Client Secret** should be provided to the designated areas. But first, you have to [**generate these credentials**](#generate-paypal-api-credentials) via PayPal Developers Account.

### Generate PayPal API Credentials

1. Login to <https://developer.paypal.com/dashboard/> to reach the dashboard of the PayPal Developers Account and move to the **Apps & Credentials** tab:

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

2. To generate **new credentials**, click on the **Create App** button:

<figure><img src="/files/4ozfNNjeU9GeVs5PYSeJ" alt=""><figcaption></figcaption></figure>

3. Give **a name** to your app, select **Merchant** as the type, and click on **Create App:**

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

4. On the **API credentials** section of the opened page copy the **Client ID** and **Secret** and paste them to their designated areas in the **Cost Calculator:**

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

{% hint style="info" %}
You can apply the same process to generate credentials for **Live Apps** (we have shown them in **Sandbox mode**). After setting up and checking everything, if there are no problems, you can freely change the mode of your PayPal to **Live** to receive funds.
{% endhint %}

<figure><img src="/files/3KP1enbFd0ZjoIfEeNtD" alt=""><figcaption></figcaption></figure>

## PayPal via Individual Settings

You can also set up **Paypal** to the Cost Calculator in the **Payments** section of Individual settings. To do this, go to the **Settings** tab of the calculator you want and head over to the **PayPal Payment** of the **Payments** section. There will be these settings:

<figure><img src="/files/8GWIKKyw9Ign2xji2oa4" alt=""><figcaption></figcaption></figure>

After enabling PayPal payment, you can see these settings:&#x20;

* **Enable PayPal payment** - enables PayPal as one of the payment methods for this calculator
* **Integration type** - choose the way of integration: [**Legacy**](#paypal-legacy-integration) or [**REST API**](#paypal-rest-api-integration)
* **PayPal IPN setup** - It is a shortcode you put in your PayPal account to specify the calculator(listener
* **Account Type** - You can choose the **Live** (for getting payments) or **Sandbox**(for testing the integration) account types
* **Currency** - Choose the currency in which you want to make payments

{% hint style="info" %}
IPN lets you get information about transaction events, such as payments received on your services and products. To learn how to set up PayPal IPN, read [PayPal’s documentation](https://developer.paypal.com/api/nvp-soap/ipn/IPNSetup/).
{% endhint %}

***

<figure><img src="/files/1493VfczvWBF1imfuneD" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When "**Apply for all calculators**" is enabled in the Global settings, it will be applied for all created calculators, and there will be a notice when you edit the individual settings of the certain calculator.&#x20;
{% endhint %}

## Cases when you have several Formula elements

1. For example, you make custom T-shirts for men and women. You let your customers choose the print for their shirts. In calculations, VAT will be calculated separately and within the total cost with VAT.

You choose to show only the formula element with the Total cost with VAT.

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

Let’s look at how it will look in the orders.

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

2. There is another example with the Gift card shop. Your customers can choose the design from the options available for each card and or send their own image. They can choose whether they will get only a digital card or get their package delivered.&#x20;

You can set up PayPal to show only the Total cost of the delivery if they decide to choose the delivery.

<figure><img src="/files/9LvKarQcuX9IOCzuF6DR" alt=""><figcaption></figcaption></figure>

That is how their order will look:

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


---

# 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://docs.stylemixthemes.com/cost-calculator-builder/payments/paypal.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.
