PHPackages                             payone-gmbh/pcp-serversdk-php - 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. [API Development](/categories/api)
4. /
5. payone-gmbh/pcp-serversdk-php

ActiveLibrary[API Development](/categories/api)

payone-gmbh/pcp-serversdk-php
=============================

PHP SDK to communicate with the PAYONE Commerce Platform server-to-server API

v1.9.0(1mo ago)41[1 issues](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/issues)[1 PRs](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/pulls)MITPHPPHP ~8.2||~8.3||~8.4||~8.5CI passing

Since Apr 3Pushed 1w ago1 watchersCompare

[ Source](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php)[ Packagist](https://packagist.org/packages/payone-gmbh/pcp-serversdk-php)[ RSS](/packages/payone-gmbh-pcp-serversdk-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (9)Dependencies (18)Versions (24)Used By (0)

PAYONE Commerce Platform PHP SDK
================================

[](#payone-commerce-platform-php-sdk)

[![Quality Gate Status](https://camo.githubusercontent.com/0b31c7d6ecaeaec7b78c5f41440794c7f4a88415d9a2ee5e52b5ae90e8450e11/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d5041594f4e452d476d62485f5043502d53657276657253444b2d706870266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=PAYONE-GmbH_PCP-ServerSDK-php)[![Coverage](https://camo.githubusercontent.com/b12c92d2aa14212cd7125761ae3d834842af5ae51cba1399e673391e7e68acfd/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d5041594f4e452d476d62485f5043502d53657276657253444b2d706870266d65747269633d636f766572616765)](https://sonarcloud.io/summary/new_code?id=PAYONE-GmbH_PCP-ServerSDK-php)[![Packagist Version](https://camo.githubusercontent.com/4dd8433613b37280b50c5cca2dbf9c485e4d635aaf18b49a557ebd82ef096ab9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061796f6e652d676d62682f7063702d73657276657273646b2d706870)](https://camo.githubusercontent.com/4dd8433613b37280b50c5cca2dbf9c485e4d635aaf18b49a557ebd82ef096ab9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061796f6e652d676d62682f7063702d73657276657273646b2d706870)

- A convenient PHP wrapper around API calls and responses:
    - marshals PHP request objects to HTTP requests
    - unmarshals HTTP responses to PHP response objects or PHP exceptions
- handling of all the details concerning authentication
- handling of required metadata

For a general introduction to the API and various checkout flows, see the documentation: - General introduction to the [PAYONE Commerce Platform](https://docs.payone.com/pcp/payone-commerce-platform) - Overview of the [checkout flows](https://docs.payone.com/pcp/checkout-flows) - Available [payment methods](https://docs.payone.com/pcp/checkout-flows)

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [General](#general)
    - [Error Handling](#error-handling)
    - [Client Side](#client-side)
    - [Apple Pay](#apple-pay)
    - [HTTP Client Customization](#http-client-customization)
    - [Authentication Token Retrieval](#authentication-token-retrieval)
- [Demo App](#demo-app)
- [Contributing](#contributing)
- [Development](#development)
    - [Structure of this repository](#structure-of-this-repository)
    - [Release](#release)
    - [Optional: Creating a GitHub Release](#optional-creating-a-github-release)
- [License](#license)

Requirements
------------

[](#requirements)

This SDK requires PHP 8.2 or later.

**[back to top](#table-of-contents)**

Installation
------------

[](#installation)

This SDK is currently not released on [packagist](https://packagist.org/). You can install it from GitHub by specifying a `vcs` repository within your `composer.json`:

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/PAYONE-GmbH/PCP-ServerSDK-php"
    }
  ],
  "require": {
    "payone-gmbh/pcp-serversdk-php": "dev-main"
  }
}
```

These snippets specify the main branch, which contains the latest release. You can specify a version by inserting a git tag `vX.Y.Z` instead of `main`. Make sure to prepend the git branch or tag with `dev-`. For an in depth explanation take a look at the [Composer documentation](https://getcomposer.org/doc/05-repositories.md#vcs).

**[back to top](#table-of-contents)**

Usage
-----

[](#usage)

### General

[](#general)

To use this SDK, you need to construct a `CommunicatorConfiguration` which encapsulates everything needed to connect to the PAYONE Commerce Platform.

```
