Just launched
We're actively working on new content and improvements to our documentation. We'd love to hear your thoughts, launch quick survey
Paddle Billing
Search

Include and initialize Paddle.js

Include Paddle.js on your website to start building checkout experiences with Paddle. Initialize by passing your seller ID and Retain API key.

To start building subscription billing experiences with Paddle, include Paddle.js on your checkout pages and in-app.

To include, add the Paddle.js in the <head> of pages where you use Paddle Checkout or where you want to use Retain:

Always load Paddle.js directly from https://cdn.paddle.com/. This makes sure that you're running with the latest security and feature updates from Paddle.

Initialize Paddle.js

You must call the Paddle.Setup() method and pass your seller ID to use Paddle Checkout. You can find your seller ID in Paddle > Developer Tools > Authentication.

Initialize Paddle.js and Retain

Paddle.js integrates with Retain, so you don't have to include a separate Retain script in your app or website.

To use Retain, include Paddle.js on every page of your web app or website — including your commercial or marketing website.

Call the Paddle.Setup() method and pass seller, pwAuth, and pwCustomer where:

sellerinteger

Seller ID for your Paddle account. You can find your seller ID in Paddle > Developer Tools. Required.

pwAuthstring or null

Retain API key. Required if using Retain. You can find your key in ProfitWell > Account Settings > Integrations > API keys/Dev Kit.

pwCustomerobject or null

Identifier for a logged-in customer for Retain Notifications. Pass either id or email, or an empty object if you don't have a logged-in customer.

idstring or null

Paddle ID for a customer entity in Paddle. Do not pass a subscription ID.

emailstring<email> or null

Email address related to a customer entity in Paddle.

Related pages