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

# PayPal

> Read PayPal transactions, balances, invoices, and orders

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: OAuth 2.0 (client credentials).
* **Connection**: Veryfront mints machine-to-machine tokens from the client ID and secret in the project's environment variables.
* **Docs**: [https://developer.paypal.com/api/rest/authentication/](https://developer.paypal.com/api/rest/authentication/)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable               | Required | Description                                                                                     |
| ---------------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `PAYPAL_CLIENT_ID`     | Yes      | PayPal REST app Client ID [Docs](https://developer.paypal.com/dashboard/applications/live).     |
| `PAYPAL_CLIENT_SECRET` | Yes      | PayPal REST app Client Secret [Docs](https://developer.paypal.com/dashboard/applications/live). |

## Setup

1. **Create a REST app**: Go to [https://developer.paypal.com/dashboard/applications/live](https://developer.paypal.com/dashboard/applications/live) (or /sandbox for testing) and create an app. Copy the Client ID and Secret.
2. **Enable required features**: In the app settings, enable 'Transaction Search' (required for List Transactions/Balances) and 'Invoicing'. Newly enabled features can take a few minutes to propagate.
3. **Set environment variables**: Add PAYPAL\_CLIENT\_ID and PAYPAL\_CLIENT\_SECRET to your .env.
4. **Verify access**: Run List Balances. Access tokens are minted automatically via the OAuth2 client\_credentials grant - no user login is involved.

* This connector targets the live API (api-m.paypal.com). For sandbox testing, point a copy of the connector at api-m.sandbox.paypal.com with sandbox app credentials.
* Transaction data can lag up to a few hours behind real-time; the reporting window per request is limited to 31 days.

Provider API reference: [https://developer.paypal.com/api/rest/](https://developer.paypal.com/api/rest/)

## Tools

| Tool              | Access | Description                                                            |
| ----------------- | ------ | ---------------------------------------------------------------------- |
| List Transactions | Read   | Search account transactions in a date window (max 31 days per request) |
| List Balances     | Read   | Get current account balances by currency                               |
| List Invoices     | Read   | List invoices                                                          |
| Get Invoice       | Read   | Get details of an invoice                                              |
| Get Order         | Read   | Get details of a checkout order                                        |

## Example prompts

* List my PayPal transactions from the last 7 days and summarize totals by status.
* Show my current PayPal balances by currency.
