RealComposer

Paddle Safe & Unsafe Practices

Direct Answer

Paddle client-side tokens are built for Paddle.js in the browser, while Paddle API keys and webhook secret keys are server-only. Provision access only after a verified webhook, never from a checkout completion event fired in the browser.

Credentials & Where They Belong

Client safe
Client-side token

Initializes Paddle.js to open checkouts. Cannot read or modify account data.

Server only
API key

Reads and modifies customers, subscriptions, prices, and transactions.

Server only
Notification destination secret key

Verifies the Paddle-Signature header on webhook deliveries.

Safe Practices

  • Verify Paddle-Signature on every webhook

    Compute the HMAC over the timestamp and raw body with your secret key and reject stale or mismatched signatures.

  • Pass price IDs, not amounts, to checkout

    Let Paddle resolve pricing, tax, and currency from catalog IDs defined in your dashboard.

  • Map customers to users on the server

    Store the Paddle customer ID against your user record from verified webhooks and look it up server-side for portal or subscription calls.

Unsafe Practices

  • Using the API key in Paddle.js or a frontend fetch

    The API key can cancel subscriptions and issue refunds. Only the client-side token belongs in the browser.

  • Granting access from checkout.completed in the browser

    Client events can be faked from DevTools. Wait for transaction.completed or subscription.activated on your server.

  • Accepting a customer ID from the client for lookups

    An attacker can swap IDs to read another customer. Derive the Paddle customer from the authenticated session.

The RealComposer Pattern

Keep PADDLE_API_KEY in the Secret Vault and build a pipeline that fetches the subscription for the signed-in user. The client token stays in the browser for checkout, and the edge URL returns a slim plan and status object.

START BUILDING FREE

Frequently Asked Questions

Q:Is the Paddle client-side token a secret?

No. It is designed to be public and only opens checkouts. Rotate it if abused, but it cannot read or change account data.

Platforms & Frameworks

Retool connect paddle refunds securely

Retool apps hit CORS and credential limits when calling Paddle. Retool queries RealComposer for Paddle write operations. Use one RealComposer edge URL with OPTIONS handling, client tokens, and vault injection.

Sub-10ms edgeView Recipe

Related Concepts