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

# Paddle

> Connect Paddle to record transactions, refunds and subscriptions as revenue, linked to your players.

Manalens records each Paddle sale and refund from a signed webhook and links it to the player who paid. [Revenue](https://docs.manalens.dev/features/revenue.md) and [attribution](https://docs.manalens.dev/attribution/models.md) then show which channels bring paying players.

| Data | How it gets here | What it shows |
| - | - | - |
| Transactions, refunds and subscriptions | Signed Paddle webhooks | Revenue on Overview, user profiles, the Explorer and attribution |
| History (optional) | An import with a restricted read key | Past revenue, reconciled daily |

## Connect Paddle

You need the owner or admin role and a verified [MFA](https://docs.manalens.dev/security/mfa.md) session.

**1. Create the webhook endpoint**

In **Settings**, **Integrations**, **Paddle**, click **Create webhook endpoint**.

**2. Register it in Paddle**

In Paddle, add a webhook endpoint with the URL from Manalens. Select the [supported events](#supported-events).

**3. Save the signing secret**

Paste the Paddle webhook secret key into **Webhook signing secret** and click **Save signing secret**. Revenue ingestion starts.

**4. Import history (optional)**

Enter a **Read API key** with read access to transactions, adjustments and subscriptions, then import. Imports resume automatically and are reconciled daily.

Secrets and read keys are encrypted and never returned to the browser.

## Supported events

`transaction.completed`, approved refund `adjustment.created` and `adjustment.updated`, and `subscription.*`.

Each webhook is verified against its signature. Other event types are ignored.

## Link payments to players

Use one of these:

1. A `user_id` in the Paddle `custom_data`.
2. An identify trait `paddle_customer_id`:

```ts theme={null}
await analytics.identify('user_123', { paddle_customer_id: 'ctm_123' });
```

See [link revenue to users](https://docs.manalens.dev/features/revenue.md#link-revenue-to-users) for the rules.

## Disconnect

In **Settings**, **Integrations**, **Paddle**, click **Disconnect read API**. This removes the read key and stops imports. The webhook and imported revenue stay. To stop new revenue, delete the webhook endpoint in Paddle.


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