PHP code example of paddlehq / paddle-php-sdk

1. Go to this page and download the library: Download paddlehq/paddle-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

paddlehq / paddle-php-sdk example snippets



bash
composer 
 php
use Paddle\SDK\Client;

$paddle = new Client('API_KEY');
 php
use Paddle\SDK\Client;

$paddle = new Client('API_KEY');

$products = $paddle->products->list();

// List returns an iterable, so pagination is handled automatically.
foreach ($products as $product) {
    echo $product->id;
}
 php
$address = $paddle->addresses->update(
    'customer_id',
    'address_id',
    $operation,
);
 php
use Paddle\SDK\Client;

$paddle = new Client('API_KEY');

$product = $paddle->products->get('id');