PHPackages                             james-ingold/paypal-server-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. james-ingold/paypal-server-sdk

ActiveLibrary[Payment Processing](/categories/payments)

james-ingold/paypal-server-sdk
==============================

Forked PayPal's SDK for interacting with the REST APIs

029PHP

Since Nov 21Pushed 1y agoCompare

[ Source](https://github.com/james-ingold/PayPal-PHP-Server-SDK)[ Packagist](https://packagist.org/packages/james-ingold/paypal-server-sdk)[ RSS](/packages/james-ingold-paypal-server-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Getting Started with PayPal Server SDK
======================================

[](#getting-started-with-paypal-server-sdk)

Introduction
------------

[](#introduction)

### ⚠️ Beta Release Notice

[](#️-beta-release-notice)

This version is considered a **beta release**. While we have done our best to ensure stability and functionality, there may still be bugs, incomplete features, or breaking changes in future updates.

#### Important Notes

[](#important-notes)

- **Available Features:** This SDK currently contains only 3 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.
- **API Changes:** Expect potential changes in APIs and features as we finalize the product.

### Information

[](#information)

The PayPal Server SDK provides integration access to the PayPal REST APIs. The API endpoints are divided into distinct controllers:

- Orders Controller: [Orders API v2](https://developer.paypal.com/docs/api/orders/v2/)
- Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2/)
- Vault Controller: [Payment Method Tokens API v3](https://developer.paypal.com/docs/api/payment-tokens/v3/) *Available in the US only.*

Find out more here:

Install the Package
-------------------

[](#install-the-package)

Run the following command to install the package and automatically add the dependency to your composer.json file:

```
composer require "paypal/paypal-server-sdk:0.6.1"
```

Or add it to the composer.json file manually as given below:

```
"require": {
    "paypal/paypal-server-sdk": "0.6.1"
}
```

You can also view the package at:

Initialize the API Client
-------------------------

[](#initialize-the-api-client)

***Note:*** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/client.md)

The following parameters are configurable for the API Client:

ParameterTypeDescription`environment``Environment`The API environment.
 **Default: `Environment.SANDBOX`**`timeout``int`Timeout for API calls in seconds.
*Default*: `0``enableRetries``bool`Whether to enable retries and backoff feature.
*Default*: `false``numberOfRetries``int`The number of retries to make.
*Default*: `0``retryInterval``float`The retry time interval between the endpoint calls.
*Default*: `1``backOffFactor``float`Exponential backoff factor to increase interval between retries.
*Default*: `2``maximumRetryWaitTime``int`The maximum wait time in seconds for overall retrying requests.
*Default*: `0``retryOnTimeout``bool`Whether to retry on request timeout.
*Default*: `true``httpStatusCodesToRetry``array`Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524``httpMethodsToRetry``array`Http methods to retry against.
*Default*: `'GET', 'PUT'``loggingConfiguration`[`LoggingConfigurationBuilder`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/logging-configuration-builder.md)Represents the logging configurations for API calls`clientCredentialsAuth`[`ClientCredentialsAuth`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/auth/oauth-2-client-credentials-grant.md)The Credentials Setter for OAuth 2 Client Credentials GrantThe API client can be initialized as follows:

```
$client = PaypalServerSdkClientBuilder::init()
    ->clientCredentialsAuthCredentials(
        ClientCredentialsAuthCredentialsBuilder::init(
            'OAuthClientId',
            'OAuthClientSecret'
        )
    )
    ->environment(Environment::SANDBOX)
    ->loggingConfiguration(
        LoggingConfigurationBuilder::init()
            ->level(LogLevel::INFO)
            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))
            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))
    )
    ->build();
```

API calls return an `ApiResponse` object that includes the following fields:

FieldDescription`getStatusCode`Status code of the HTTP response`getHeaders`Headers of the HTTP response as a Hash`getResult`The deserialized body of the HTTP response as a StringEnvironments
------------

[](#environments)

The SDK can be configured to use a different environment for making API calls. Available environments are:

### Fields

[](#fields)

NameDescriptionProductionPayPal Live EnvironmentSandbox**Default** PayPal Sandbox EnvironmentAuthorization
-------------

[](#authorization)

This API uses the following authentication schemes.

- [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/auth/oauth-2-client-credentials-grant.md)

List of APIs
------------

[](#list-of-apis)

- [Orders](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/controllers/orders.md)
- [Payments](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/controllers/payments.md)
- [Vault](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/controllers/vault.md)

Classes Documentation
---------------------

[](#classes-documentation)

- [ApiException](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/api-exception.md)
- [HttpRequest](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/http-request.md)
- [HttpResponse](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/http-response.md)
- [LoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/logging-configuration-builder.md)
- [RequestLoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/request-logging-configuration-builder.md)
- [ResponseLoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/0.6.1/doc/response-logging-configuration-builder.md)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 68.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bc011d767506ea997fb8929a09fc084341499dc87a2b34d1298ac23d916bd46?d=identicon)[jamesingold](/maintainers/jamesingold)

---

Top Contributors

[![james-ingold](https://avatars.githubusercontent.com/u/700919?v=4)](https://github.com/james-ingold "james-ingold (13 commits)")[![Dani-Kirby](https://avatars.githubusercontent.com/u/58542682?v=4)](https://github.com/Dani-Kirby "Dani-Kirby (6 commits)")

### Embed Badge

![Health badge](/badges/james-ingold-paypal-server-sdk/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/braintree

Braintree gateway for Omnipay payment processing library

35558.0k3](/packages/omnipay-braintree)

PHPackages © 2026

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