PHPackages                             shopware/paypal-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. shopware/paypal-sdk

ActiveLibrary[Payment Processing](/categories/payments)

shopware/paypal-sdk
===================

SDK to communicate with the PayPal API

v2.2.0(5d ago)0303.0k—2.2%[1 issues](https://github.com/shopware/paypal-sdk/issues)[1 PRs](https://github.com/shopware/paypal-sdk/pulls)1MITPHPPHP &gt;=8.2CI passing

Since Apr 10Pushed 3d ago2 watchersCompare

[ Source](https://github.com/shopware/paypal-sdk)[ Packagist](https://packagist.org/packages/shopware/paypal-sdk)[ RSS](/packages/shopware-paypal-sdk/feed)WikiDiscussions trunk Synced 2d ago

READMEChangelog (10)Dependencies (54)Versions (37)Used By (1)

 [![PayPal Logo](.github/paypal-php-sdk.svg)](.github/paypal-php-sdk.svg)

PayPal SDK for PHP
==================

[](#paypal-sdk-for-php)

A PayPal PHP SDK that allows integration of PayPal services into PHP applications. This SDK provides a simple and easy-to-use interface for working with PayPal's REST APIs, making it easier to accept payments, handle PayPal-related tasks and errors.

Warning

Currently this SDK is an extraction of the implementation within Shopware's [PayPal plugin](https://github.com/shopware/SwagPayPal). Only use cases and API responses used within the plugin are covered.

Quick start
-----------

[](#quick-start)

### Installation

[](#installation)

You can install the SDK via Composer. Run the following command in your terminal:

```
composer require shopware/paypal-sdk
```

In addition, a PSR client implementation is needed. We recommend [Guzzle HTTP](https://github.com/guzzle/guzzle) or Symfony's [HttpClient](https://symfony.com/doc/current/http_client.html).

```
composer require guzzlehttp/psr7 php-http/guzzle7-adapter
```

The [php-http/discovery](https://github.com/php-http/discovery) package is used for this library to discover the PSR client implementation automatically. Have a look at [their README](https://github.com/php-http/discovery?tab=readme-ov-file#usage-as-a-library-user) to set the client implementation manually. Alternatively you can provide a gateway with a concrete client of your choice.

### Usage (Simple)

[](#usage-simple)

```
use Shopware\PayPalSDK\Context\ApiContext;
use Shopware\PayPalSDK\Context\CredentialsOAuthContext;
use Shopware\PayPalSDK\Gateway\OrderGateway;
use Shopware\PayPalSDK\Struct\V2\Order;

$context = new ApiContext(
    new CredentialsOAuthContext('', ''),
    sandbox: true,
);

$orderGateway = new OrderGateway();

$toCreateOrder = new Order();
$toCreateOrder->setPaymentSource(...);
$createdOrder = $orderGateway->createOrder($toCreateOrder, $context);

$anotherOrder = $orderGateway->getOrder('', $context);
```

### Usage (Advanced)

[](#usage-advanced)

```
use Shopware\PayPalSDK\Context\ApiContext;
use Shopware\PayPalSDK\Context\CredentialsOAuthContext;
use Shopware\PayPalSDK\Gateway\TokenGateway;
use Shopware\PayPalSDK\Gateway\OrderGateway;
use Shopware\PayPalSDK\Struct\V2\Order;

$context = new ApiContext(
    new CredentialsOAuthContext('', ''),
    sandbox: true,
    merchantId: '', // optional
    headers: ['some-additional-header' => 'value'], // optional
    queryParameters: ['filter' => 'value'], // optional
    thirdParty: false, // optional
)

$client = new Http\Adapter\Guzzle7\Client(new GuzzleHttp\Client([
    // some custom options like adding a logger middleware
]));

$tokenGateway = new TokenGateway($client);
$orderGateway = new OrderGateway($client, $tokenGateway);

$toCreateOrder = new Order();
$toCreateOrder->setPaymentSource(...);
$createdOrder = $orderGateway->createOrder($toCreateOrder, $context);

$anotherOrder = $orderGateway->getOrder('', $context);
```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance99

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 57.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~3 days

Total

22

Last Release

3d ago

Major Versions

v1.6.3 → v2.0.02026-06-12

v1.7.1 → v2.2.02026-06-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c45ef9077b73fce78afbfab2fa27e611a453dd77de003e2785ac84105d02bef?d=identicon)[shyim](/maintainers/shyim)

![](https://www.gravatar.com/avatar/66e9bb4e4fc1010046161b16bce3526aaac9a4208791a3f6fe15b236ed363a5f?d=identicon)[shopwareBot](/maintainers/shopwareBot)

---

Top Contributors

[![cyl3x](https://avatars.githubusercontent.com/u/53476027?v=4)](https://github.com/cyl3x "cyl3x (49 commits)")[![mstegmeyer](https://avatars.githubusercontent.com/u/40475653?v=4)](https://github.com/mstegmeyer "mstegmeyer (18 commits)")[![lernhart](https://avatars.githubusercontent.com/u/21331033?v=4)](https://github.com/lernhart "lernhart (4 commits)")[![socrec](https://avatars.githubusercontent.com/u/6811780?v=4)](https://github.com/socrec "socrec (4 commits)")[![untilu29](https://avatars.githubusercontent.com/u/16525153?v=4)](https://github.com/untilu29 "untilu29 (3 commits)")[![En0Ma1259](https://avatars.githubusercontent.com/u/30216825?v=4)](https://github.com/En0Ma1259 "En0Ma1259 (3 commits)")[![Aliaaaam](https://avatars.githubusercontent.com/u/88658555?v=4)](https://github.com/Aliaaaam "Aliaaaam (3 commits)")[![daniel3010](https://avatars.githubusercontent.com/u/26252901?v=4)](https://github.com/daniel3010 "daniel3010 (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shopware-paypal-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/shopware-paypal-sdk/health.svg)](https://phpackages.com/packages/shopware-paypal-sdk)
```

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

9067.8k](/packages/n1ebieski-ksef-php-client)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[shopware/app-php-sdk

Shopware App SDK for PHP

15109.8k3](/packages/shopware-app-php-sdk)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
