# PayPal

> Connect PayPal with live REST API credentials — getting the Client ID and secret, the webhook ESTAGE adds, subscriptions and testing.

Source: https://support.estage.com/commerce-payments-paypal
Part of the ESTAGE Support help center (https://support.estage.com). Full knowledge base: https://support.estage.com/llms-full.txt

---

**PayPal** lets buyers pay with their PayPal account on your order forms, paid meetings and online
store. The money goes to your own PayPal business account.

| Where | What PayPal does |
| --- | --- |
| **[Order forms](https://support.estage.com/order-forms)** | One-time products, subscriptions, free trials and coupons. Buyers pay in PayPal's window. |
| **[Paid meetings](https://support.estage.com/rooms-meeting-booking)** | The booking is paid on the page. A cancelled booking is flagged **Refund by hand**, and you refund it in PayPal. |
| **[Online store](https://support.estage.com/store)** | The storefront checkout. |

## Before you start

- **A PayPal Business account.** PayPal gives live API credentials only to a verified Business
  (or Premier) account.
- **Live credentials only.** ESTAGE connects to PayPal's live environment, so sandbox credentials
  are refused with *Invalid API Key provided*. To test, make a small real purchase and refund it.
- **Business Details.** PayPal can't be ticked on an order form until every required field in
  [Business Details](https://support.estage.com/project-settings-business-details) is saved.

## Getting your credentials

1. Sign in to the [PayPal Developer Dashboard](https://developer.paypal.com/) with the account
   that receives the money.
2. Open **Apps & Credentials** and switch the page to **Live**.
3. Under **REST API apps**, open your app, or create one.
4. Copy the **Client ID** and the **Secret**.

PayPal's guide: [Get started with PayPal REST APIs](https://developer.paypal.com/api/rest/) and
[Go live](https://developer.paypal.com/api/rest/production/).

## Connecting PayPal

1. In Genesis, open **Settings → Payment Processing**.
2. On the **PayPal** card, select **Connect**.
3. Paste the **Client ID**, and the secret into **Secret Key**.
4. Select **Connect My Account**.

*PayPal connected* appears and the card shows **ACTIVE**. Credentials PayPal doesn't accept —
sandbox ones, a typo, a deleted app — give *Failed to connect PayPal* with *Invalid API Key
provided*.

From your CRM it's the same: **Settings → Payments**, **Connect** on PayPal, the same fields,
then **Connect**.

## The webhook

ESTAGE registers a webhook on your PayPal app as you connect; there's nothing to paste. Through it
ESTAGE records:

- refunds you make in PayPal;
- subscriptions that are cancelled, suspended or expire;
- subscription payments that failed.

## Turning PayPal on for products

1. In the CRM, open **Products** and then the product.
2. On the **Pricing** tab, add **PayPal** under **Payment providers**.
3. Pick the price and currency, then select **Update**. For a monthly or annual product, saving
   creates its billing plan in your PayPal account.
4. In the [order form](https://support.estage.com/order-forms-configuring), tick **PayPal** in step 2.

PayPal can charge in **AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, ILS, JPY, MXN, MYR,
NOK, NZD, PHP, PLN, RUB, SEK, SGD, THB, TWD** and **USD**. With other providers chosen too, the
**Currency** menu keeps only the currencies they all share.

> **Note**
>
> A subscription product saved **before** PayPal was ticked on it has no PayPal plan. Buyers then
> see *"PayPal is not set up for this subscription yet. Please choose another payment method or
> contact the seller."* Open the product, check **PayPal** is under **Payment providers**, and
> select **Update**.

## Testing and going live

There's no test mode, so try it with real money:

1. Connect PayPal with your live credentials and turn it on for an inexpensive product.
2. On your published site, buy it with a PayPal account other than the one receiving the money.
3. Check the order in the CRM under **Orders**, then refund the payment in PayPal. The order is
   marked refunded.

To move to another PayPal account, disconnect PayPal, connect it with the new credentials, then
add **PayPal** back under **Payment providers** on each product and select **Update**.

## Things worth knowing

- **Refund in PayPal.** The order is marked refunded and the product's **Action upon refund** runs
  — see [After a purchase](https://support.estage.com/commerce-catalog#after-a-purchase).
- **A coupon on a subscription** gets its own billing plan in PayPal. If PayPal can't take it,
  the buyer is asked to remove the coupon or pick another payment method.
- **One PayPal app on several projects** works: connect it on each project.
- **Paid bookings aren't refunded automatically.** Cancelling one flags it **Refund by hand** in
  [Bookings](https://support.estage.com/crm-bookings#acting-on-a-booking); refund it in PayPal.

Related: [Payment Processing](https://support.estage.com/commerce-payments) · [Stripe](https://support.estage.com/commerce-payments-stripe) ·
[Business Details](https://support.estage.com/project-settings-business-details)
