Paddle
Official Python SDK for Paddle Billing (the new Paddle platform). PyPI package is paddle-python-sdk, imports as paddle_billing. Requires Python >=3.11. Note: there are two Paddle platforms — Paddle Classic (legacy) and Paddle Billing (current). This SDK is Paddle Billing only.
Warnings
- breaking Paddle Classic (old platform) and Paddle Billing (new platform) are entirely different APIs with different SDKs. This SDK (paddle-python-sdk) is Paddle Billing only. If your account is on Paddle Classic, this SDK will not work.
- breaking Requires Python >=3.11. Installing on Python 3.10 or lower will fail at install time or raise a RuntimeError.
- gotcha Package name is paddle-python-sdk but import module is paddle_billing. 'import paddle' or 'from paddle import ...' will fail — 'paddle' is not the module name.
- gotcha Sandbox and live API keys are separate credentials. Using a live key against the sandbox environment (or vice versa) returns 401 or unexpected data.
- gotcha Paddle Billing list() methods return iterators, not lists. Code that indexes the result directly (products[0]) raises TypeError.
Install
-
pip install paddle-python-sdk
Imports
- Client
from paddle_billing import Client paddle = Client('PADDLE_API_SECRET_KEY') - Sandbox environment
from paddle_billing import Client, Environment, Options paddle = Client('PADDLE_API_SECRET_KEY', options=Options(Environment.SANDBOX))
Quickstart
from paddle_billing import Client
paddle = Client('PADDLE_API_SECRET_KEY')
# List products
products = paddle.products.list()
for product in products:
print(f'{product.id}: {product.name}')
# Verify webhook signature
from paddle_billing.Notifications import Secret, Verifier
integrity_check = Verifier().verify(request, Secret('WEBHOOK_SECRET_KEY'))