For AI agents and LLMs: a structured documentation index is available at /llms.txt. Every page has a Markdown sibling — append .md to any URL.

Skip to content
Docs

PHP SDK

Install, authenticate, and make your first request with the official Paddle PHP SDK.

AI summary

Install the Paddle PHP SDK (paddlehq/paddle-php-sdk) to integrate Paddle Billing with PHP applications. The SDK provides typed operation classes for creates and updates, iterator-based pagination, and a PSR-7 compatible webhook signature verifier.

  • • Requires PHP 8.1 or later; install with composer require paddlehq/paddle-php-sdk and load Composer's autoloader before constructing the client.
  • • Instantiate with new Client(apiKey: getenv('PADDLE_API_KEY'), options: new Options(Environment::SANDBOX)); omit options or use Environment::PRODUCTION for live.
  • • List endpoints return iterators — foreach ($paddle->products->list() as $product) walks every page automatically as the SDK fetches the next page when the current one is exhausted.

The Paddle PHP SDK integrates Paddle Billing with PHP applications. It exposes typed operation classes for creates and updates, iterator-based pagination, and a webhook signature verifier.

Latest: v1.17.1 · 2026-04-30

Requirements

PHP 8.1 or later.

Install

Install using Composer:

Shell
composer require paddlehq/paddle-php-sdk

Then load Composer's autoloader in your application:

PHP
require_once 'vendor/autoload.php';

Authenticate

Create an API key in Paddle > Developer tools > Authentication, then pass it when you construct the client.

API keys are environment-specific. Use a sandbox key for sandbox, a live key for production.

PHP
use Paddle\SDK\Client;
use Paddle\SDK\Environment;
use Paddle\SDK\Options;
$paddle = new Client(
apiKey: getenv('PADDLE_API_KEY'),
options: new Options(Environment::SANDBOX),
);

Omit the options argument, or use Environment::PRODUCTION, to use the live API.

Make your first request

List the products in your catalog:

PHP
use Paddle\SDK\Client;
use Paddle\SDK\Environment;
use Paddle\SDK\Options;
$paddle = new Client(
apiKey: getenv('PADDLE_API_KEY'),
options: new Options(Environment::SANDBOX),
);
foreach ($paddle->products->list() as $product) {
echo $product->id . ' ' . $product->name . PHP_EOL;
}

$paddle->products->list() returns an iterator. foreach walks every page automatically. The SDK fetches the next page when the current one is exhausted.

Next steps

  • Understand shared patterns for pagination, idempotency, retries, and error handling across SDKs.
  • Browse the API reference for every resource and operation the SDK exposes.
  • Work against sandbox while you build, then follow the go-live checklist to switch environments.

Was this page helpful?