Docs

Authenticate using client-side tokens

Pass a client-side token when initializing to authenticate with Paddle.js. There's no need to pass your seller ID anymore.

Tooling

  • Paddle.js
  • Checkout
  • Platform

Released

October 27, 2023

Status

Released

What's new?

We added client-side tokens to the Paddle platform. As part of this update, you can pass a client-side token to the Paddle.Initialize() method to authenticate.

token string

Client-side token for authentication. You can create and manage client-side tokens in Paddle > Developer tools > Authentication. Required

This supersedes the seller parameter that was used previously.

How it works

Client-side tokens let you authenticate with the Paddle platform in your frontend. They work with Paddle.js to handle working with pricing information and securely capturing payment details.

You can create and manage client-side tokens in Paddle > Developer tools > Authentication. This page has been redesigned to make it easier to work with API keys and client-side tokens.

Client-side tokens vs API keys

API keys are designed for working with the Paddle API in your backend. They have full access to the data in your system. You must store them securely and keep them secret.

Unlike API keys, client-side tokens may be published in your app code. They're designed for working with the Paddle platform in your frontend. They have limited access to the data in your system.

Paddle.Initialize() changes

Previously, we recommended passing the seller parameter with your seller ID to the Paddle.Initialize() method. Now, you can use the token parameter with a client-side token instead. We've updated our docs to reflect this new way of working.

Existing methods that use seller will continue to work, but future methods may require client-side tokens. We recommend that you replace the seller parameter with token and a client-side token when you're next reviewing your code.

Examples

This example shows how you include and initialize Paddle.js with Retain.

Before

Using seller ID
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
<script type="text/javascript">
Paddle.Initialize({
seller: 99999,
pwCustomer: { }
});
</script>

After

Using a client-side token
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
<script type="text/javascript">
Paddle.Initialize({
token: 'live_7d279f61a3499fed520f7cd8c08',
pwCustomer: { }
});
</script>

Next steps

This change is live now, so you can start using a client-side token to authenticate when using Paddle.js.

You don't need to do anything to get the latest version of Paddle.js — we serve the latest version automatically.

Summary of changes

Entity Field Change Type
Paddle.Initialize() token + Added Paddle.js param
Client-side token for authentication; replaces seller ID.

Was this page helpful?