Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Paloma Shop PHP Client

PHP client library for the Paloma Shop. Facilitates the access to the following APIs (see for details and code examples):

  • Catalog
  • Checkout
  • Customers

Note: This is v3 of the Paloma Shop PHP Client. It is not backwards-compatible with v2 and is intended to be used together with the Paloma Shop Bundle for Symfony.


// Create Paloma client
$factory = new Paloma\Shop\PalomaClientFactory($options);

$client = $factory->create([
    'base_url' => '', 
    'api_key' => 'yourAPIKey',
    'channel' => 'yourChannel',
    'locale' => 'yourLocale',

// Create security service
$security = new MyPalomaSecurity(); // implements \Paloma\Shop\Security\PalomaSecurityInterface

// Create Paloma catalog
$catalog = new \Paloma\Shop\Catalog\Catalog($client, new \Paloma\Shop\Common\PricingContextProvider($security));

// Call API, e.g. fetch catalog categories
$categories = $catalog->getCategories();

// Create Symfony validator
$validator = new Validator(); // implements Symfony\Component\Validator\Validator\ValidatorInterface

// Create Paloma checkout
$checkout = new \Paloma\Shop\Checkout\Checkout($client, $security, $validator);

// Add cart item
$checkout->addCartItem('100-200', 1);


Hint: Find more examples at

Get product for a category, sorted by price:

$page = $catalog->search(new SearchRequest(...));

Get cart (e.g. to render shopping cart view):

$order = $checkout->getCart();

Add product to cart:

$order = $checkout->addCartItem('12345', 1);

Update cart item quantity:

$checkout->updateCartItem('123' /* order item id */, 2 /* quantity */);

Remove a cart item:


Get cart items count:

// Number of order items

// Number of items times quantities

Set order addresses:

$billingAddress = new Address(...);
$shippingAddress = new Address(...);
$checkout->setAddresses($billingAddress, $shippingAddress);

Initialize payment:

$payment = $checkout->initializePayment(new PaymentInitParameters(...));

Use $payment->getProviderParams() to create payment URL or to render payment form.

Place the order:

$orderPurchase = $checkout->purchase();
echo 'Purchased order ' . $orderPurchase->getOrderNumber() . '!';