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. shopware/paypal-sdk

ActiveLibrary

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

SDK to communicate with the PayPal API

v1.6.2(3mo ago)0181.6k—3.6%[4 PRs](https://github.com/shopware/paypal-sdk/pulls)1MITPHPCI passing

Since Apr 10Pushed 1mo 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 1mo ago

READMEChangelog (10)Dependencies (18)Versions (23)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

48

—

FairBetter than 95% of packages

Maintenance85

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.1% 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 ~22 days

Total

14

Last Release

118d ago

### 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 (41 commits)")[![mstegmeyer](https://avatars.githubusercontent.com/u/40475653?v=4)](https://github.com/mstegmeyer "mstegmeyer (10 commits)")[![socrec](https://avatars.githubusercontent.com/u/6811780?v=4)](https://github.com/socrec "socrec (4 commits)")[![lernhart](https://avatars.githubusercontent.com/u/21331033?v=4)](https://github.com/lernhart "lernhart (3 commits)")[![Aliaaaam](https://avatars.githubusercontent.com/u/88658555?v=4)](https://github.com/Aliaaaam "Aliaaaam (3 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 (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

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[friendsofsymfony/http-cache

Tools to manage HTTP caching proxies with PHP

36114.7M36](/packages/friendsofsymfony-http-cache)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

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