Skip to main content
Paddle Billing is a merchant of record for selling digital products and subscriptions. It takes care of payments, global tax compliance, fraud prevention, localization, and subscriptions. Here’s how to switch the default payment processor from Stripe to Paddle Billing.
This guide is for Paddle Billing, which is the latest version of Paddle. It doesn’t include Paddle Classic.

1. Swap out the required dependencies

First, uninstall the existing dependencies from the Payments package…
Terminal
… and install the new dependencies…
Terminal

2. Update the Payment keys

Update the required Payment keys in the packages/payments/keys.ts file:
packages/payments/keys.ts

3. Update the environment variables

Next, update the environment variables across the project, replacing the existing Stripe keys with the new Paddle keys:
apps/app/.env

4. Update the payments client

Initialize the payments client in the packages/payments/index.ts file with the new API key.
packages/payments/index.ts

5. Update the payments webhook handler

Remove the Stripe webhook handler from the API package…
Terminal
… and create a new webhook handler for Paddle:
apps/api/app/webhooks/paddle/route.ts
There’s quite a lot you can do with Paddle, so check out the following resources for more information:

Webhooks Overview

Learn how to handle webhooks from Paddle Billing

Signature Verification

Learn how to verify webhooks from Paddle Billing

Simulate Webhooks

Learn how to send test webhooks from Paddle Billing

6. Create a Checkout hook

Create a new file for checkout and install paddle-js:
Terminal
Then, create a new hook to initialize Paddle in the packages/payments/checkout.tsx file:
packages/payments/checkout.tsx

7. Use the Checkout hook

Finally, open a checkout on your pricing page:
apps/web/app/pricing/page.tsx