Socket
Book a DemoInstallSign in
Socket

com.paypal.sdk:paypal-server-sdk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.paypal.sdk:paypal-server-sdk

PayPal's SDK for interacting with the REST APIs

Source
mavenMaven
Version
1.1.0
Version published
Maintainers
1
Source

Getting Started with PayPal Server SDK

Introduction

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.

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
  • Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2
  • Vault Controller: Payment Method Tokens API v3 Available in the US only.

Install the Package

Install the SDK by adding the following dependency in your project's pom.xml file:

<dependency>
  <groupId>com.paypal.sdk</groupId>
  <artifactId>paypal-server-sdk</artifactId>
  <version>1.1.0</version>
</dependency>

You can also view the package at: https://central.sonatype.com/artifact/com.paypal.sdk/paypal-server-sdk/1.1.0

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

ParameterTypeDescription
environmentEnvironmentThe API environment.
Default: Environment.SANDBOX
httpClientConfigConsumer<HttpClientConfiguration.Builder>Set up Http Client Configuration instance.
loggingConfigConsumer<ApiLoggingConfiguration.Builder>Set up Logging Configuration instance.
clientCredentialsAuthClientCredentialsAuthThe Credentials Setter for OAuth 2 Client Credentials Grant

The API client can be initialized as follows:

PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()
    .loggingConfig(builder -> builder
            .level(Level.DEBUG)
            .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))
            .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))
    .httpClientConfig(configBuilder -> configBuilder
            .timeout(0))
    .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(
            "OAuthClientId",
            "OAuthClientSecret"
        )
        .build())
    .environment(Environment.SANDBOX)
    .build();

Environments

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

Fields

NameDescription
ProductionPayPal Live Environment
SandboxDefault PayPal Sandbox Environment

Authorization

This API uses the following authentication schemes.

List of APIs

SDK Infrastructure

Configuration

HTTP

Utilities

FAQs

Package last updated on 27 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts