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. payone-gmbh/pcp-serversdk-php

ActiveLibrary

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

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

1.4.0(7mo ago)41↓100%[1 PRs](https://github.com/PAYONE-GmbH/PCP-ServerSDK-php/pulls)MITPHPPHP ~8.2||~8.3CI passing

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

READMEChangelog (5)Dependencies (9)Versions (18)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)

- 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)
- [API Reference](#api-reference)
    - [CommunicatorConfiguration](#communicatorconfiguration)
        - [Setup your configuration](#setup-your-configuration)
        - [Constants](#constants)
        - [Methods](#methods)
    - [Queries](#queries)
        - [GetCommerceCasesQuery](#getcommercecasesquery)
        - [GetCheckoutsQuery](#getcheckoutsquery)
    - [API Clients](#api-clients)
        - [BaseApiClient](#baseapiclient)
        - [CheckoutApiClient](#checkoutapiclient)
        - [CommerceCaseApiClient](#commercecaseapiclient)
        - [OrderManagementCheckoutActionsApiClient](#ordermanagementcheckoutactionsapiclient)
        - [PaymentExecutionApiClient](#paymentexecutionapiclient)
        - [PaymentInformationApiClient](#paymentinformationapiclient)
- [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.

```
