> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bubblav.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PayPal

> Let customers check PayPal payments, invoices, and disputes in chat, and pay through a PayPal payment link

Connect a PayPal REST app (Client ID and Secret) so customers can ask about their PayPal payments in chat: whether a payment went through, whether an invoice is paid, and whether a dispute is open. The chatbot can also create a PayPal payment link for a price you state. BubblaV adds four chatbot tools; nothing is installed on your site through PayPal.

## Why Connect PayPal?

> **Payment Status**
>
> Show whether a PayPal payment is completed, pending, denied, or reversed, with its amount, date, and what it was for.

> **Invoice Status**
>
> Show whether a PayPal invoice is paid, unpaid, partially paid, cancelled, or refunded, and give the payment link if it is still unpaid.

> **Dispute Status**
>
> Show whether a dispute or claim exists for a payment, its status and reason, and when your response is due.

> **Payment Links**
>
> When a customer asks to pay with PayPal, the chatbot creates a PayPal invoice and shares its payment link in chat.

## Prerequisites

* A BubblaV website with edit access
* A PayPal Business account
* A PayPal REST API app with the features **Transaction search**, **Invoicing**, and **Customer disputes** enabled
* Available on all plans

## Setup Steps

**1. Create a REST API app**

In [developer.paypal.com](https://developer.paypal.com), open **Apps & Credentials**, choose the **Live** tab (or **Sandbox** for testing), and create or open a REST API app. Copy the **Client ID** and the **Secret**.

**2. Enable the app features**

In the app's **Features**, enable **Transaction search**, **Invoicing**, and **Customer disputes**, then save. PayPal can take a few hours to apply Transaction search.

**3. Connect PayPal**

Open that website's **Dashboard** → **Integrations** → **Built-in Integrations** → **PayPal**, click **Connect**, and enter the **Client ID** and **Client Secret**. Tick **These are Sandbox credentials** only for Sandbox credentials.

**4. BubblaV adds the tools**

BubblaV validates the credentials and the Transaction search and Invoicing features with live API calls, then adds the four PayPal tools to your chatbot.

**5. Test**

Ask the chatbot about a real payment with its transaction ID and the payer's email, then ask for a payment link.

## Available Tools After Connection

| Tool | Parameters and Behavior | Example Query |
| - | - | - |
| `paypal_get_transaction` | Required `transaction_id` and `customer_email`; optional `payment_date` (YYYY-MM-DD, speeds up the search). The email must be the PayPal account that paid. Returns status, amount, date, and what the payment was for. | "What is the status of PayPal payment 5TY05013RG002845M? My email is [anna@example.com](mailto:anna@example.com)" |
| `paypal_get_dispute_status` | Same three parameters as `paypal_get_transaction`. Returns whether a dispute or claim exists, with status, reason, amount, and response due date. | "Is there a dispute on PayPal payment 5TY05013RG002845M? My email is [anna@example.com](mailto:anna@example.com)" |
| `paypal_get_invoice_status` | Required `invoice_number` and `customer_email`. The email must match the invoice recipient. Returns status, total, amount due, due date, and the payment link if still unpaid. | "Is PayPal invoice 0042 paid? My email is [anna@example.com](mailto:anna@example.com)" |
| `paypal_create_payment_link` | Required `amount`, `currency_code`, `description`, and `customer_email`. Creates a PayPal invoice and returns its payment link. | "I want to pay 49.99 USD for the Pro setup with PayPal. My email is [anna@example.com](mailto:anna@example.com)" |

Payment, dispute, and invoice lookups need both the ID or number and the matching email, and cover about 6 months. New payments can take up to 3 hours to appear. Payer names, addresses, phone numbers, and account IDs are never shown in the chat. The chatbot never lists your transactions, and it cannot refund or pay out.

### Payment links

Payment links are PayPal invoices shared by link. PayPal does not email them. Each invoice carries the reference "BubblaV chat", and the same email can have at most 3 unpaid payment links per 24 hours. Check the paid amount in PayPal before you fulfill an order. To turn payment links off, open the integration's **Configure** page and disable the **Create PayPal Payment Link** tool.

## Troubleshooting

> **PayPal rejected the credentials on connect**
>
> Check that the Client ID and Secret are copied in full and that the **These are Sandbox credentials** box matches the tab you copied them from: Live credentials come from the **Live** tab, Sandbox credentials from the **Sandbox** tab.

> **The PayPal app is missing a feature**
>
> In developer.paypal.com → **Apps & Credentials** → your app → **Features**, enable **Transaction search**, **Invoicing**, and **Customer disputes**, save, then connect again. PayPal can take a few hours to apply Transaction search.

> **The chatbot says the payment was not found**
>
> The transaction ID and the payer's email must both match, and the payment must be from the last 6 months. New payments can take up to 3 hours to appear. For privacy, the chatbot gives the same answer when the ID is unknown and when the email does not match.

> **Dispute lookups fail with an access error**
>
> The app needs the **Customer disputes** feature. Enable it in the app's **Features**, save, then disconnect and connect PayPal again.

> **Replace the credentials or switch between Live and Sandbox**
>
> On the PayPal integration card, click **Disconnect**, then click **Connect** and enter the new Client ID and Secret. Tick **These are Sandbox credentials** only for Sandbox credentials.

> **Tools are missing after connecting**
>
> If BubblaV shows **Connected, but the chatbot tools were not added**, or tools are missing, open the integration's **Configure** page and click **Sync Tools**. Then check that the PayPal tools are enabled.

> [!NOTE]
>
> **Security**: Your Client Secret is stored encrypted. A visitor must give the matching email to see a payment, invoice, or dispute.

## Next Steps

> **[Customize Your Widget](https://docs.bubblav.com/user-guide/widget-design.md)**
>
> Match the chat widget to your storefront's appearance.

> **[Test Your Chatbot](https://docs.bubblav.com/user-guide/testing.md)**
>
> Check payment answers and your configured website knowledge.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.