> For the complete documentation index, see [llms.txt](https://docs.yaycommerce.com/bookster/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yaycommerce.com/bookster/addons/paypal.md).

# PayPal

Take payments through PayPal when customers book. Customers pay with their PayPal account or a card in the PayPal window.

{% hint style="info" %}
The **PayPal** addon is free. Install it from **Settings › Payment**: turn on **Payment for booking**, then click **Install** next to **Paypal**, then **Activate**.
{% endhint %}

## Before you start

You need a PayPal Business account and a REST app in the [PayPal Developer Dashboard](https://developer.paypal.com/). The app gives you a **Client ID** and a **Client Secret**. Sandbox and live apps have different ones.

## Turn on PayPal

1. Go to **Settings › Payment**.
2. Under **Payment Gateways**, turn on **Payment for booking**.
3. Under **Payment Method**, pick **Paypal**.
4. In **Sandbox or Live Mode**, pick **Sandbox Mode** to test, or **Live Mode** to take real payments.
5. Paste **Sandbox Client ID** and **Sandbox Client Secret**, or **Live Client ID** and **Live Client Secret**.
6. Click **Save Changes**.

<figure><img src="https://3654694329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOokiT38oKvyMtYds88Kp%2Fuploads%2Fgit-blob-57e417bdf4226aba419a7937da95dd59afed1ef1%2Fpaypal-settings.webp?alt=media" alt="PayPal settings in Sandbox Mode with a client ID and client secret"><figcaption><p>PayPal settings under Payment Gateways.</p></figcaption></figure>

Only one online payment method works at a time: picking PayPal turns Stripe off. See [Payment](https://docs.yaycommerce.com/bookster/administration/settings/payment.md).

To test with sandbox accounts, see the [FAQs](https://docs.yaycommerce.com/bookster/other-links/faqs.md#how-can-i-test-the-paypal-payment-process-without-using-real-money).

## What the customer sees

1. In the checkout step, the customer picks **Pay Now** (if you also offer **Pay Later**) and clicks the PayPal button.
2. They approve the payment in the PayPal window. No money moves yet.
3. Bookster checks that the approved amount matches the price it works out on your server, then takes the payment and saves the booking.

If the amounts don't match, nothing is taken and the customer sees "The price changed. Please check the new amount and confirm again.". If the PayPal window was left open too long, they see "This PayPal payment can no longer be used. Please check out again.". Other messages are on [Troubleshooting](https://docs.yaycommerce.com/bookster/other-links/troubleshooting.md#customers-in-the-booking-form).

## Payments PayPal holds as pending

Some PayPal payments, such as an eCheck, stay **Pending** in PayPal for a few days. Bookster saves the booking, but it stays unpaid, and Bookster doesn't learn when PayPal completes the payment.

When PayPal shows the payment as **Completed**, record it in Bookster:

* For a booking in an order, open the order and click **Complete payment**. See [Manage orders and their payments](https://docs.yaycommerce.com/bookster/orders-and-packages/orders-and-packages/manage-orders.md#take-the-rest-of-the-payment).
* For a booking made alone, open the appointment and set **Payment Status** to **Completed**.

## Refunds

If the booking can't be saved after the payment, Bookster refunds it in PayPal at once. If that refund fails, admins see the notice **Bookster: refund these payments by hand**. See [Troubleshooting](https://docs.yaycommerce.com/bookster/other-links/troubleshooting.md#refund-these-payments-by-hand).

Canceling a booking does not refund it. Refund it in your PayPal account.
