PHPackages                             payever/payments-sdk-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. [Payment Processing](/categories/payments)
4. /
5. payever/payments-sdk-php

ActiveLibrary[Payment Processing](/categories/payments)

payever/payments-sdk-php
========================

PHP SDK for payever payments

2.8.2(2mo ago)041.0k↓23.6%1[2 PRs](https://github.com/payeverworldwide/payments-sdk-php/pulls)2MITPHPPHP &gt;=5.4.0

Since Mar 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/payeverworldwide/payments-sdk-php)[ Packagist](https://packagist.org/packages/payever/payments-sdk-php)[ Docs](https://github.com/payeverworldwide/payments-sdk-php)[ RSS](/packages/payever-payments-sdk-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (16)Versions (42)Used By (2)

PHP SDK for payever plugin interactions - internal, not for public use
======================================================================

[](#php-sdk-for-payever-plugin-interactions---internal-not-for-public-use)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0cf3cff6e22f901693b59999e94cce6e560e5789d251d586421bd4c4ca1b9cbe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70617965766572776f726c64776964652f73646b2d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/payeverworldwide/sdk-php/?branch=master)[![Build Status](https://camo.githubusercontent.com/f092570dbd3237318c61ed927c3b498af415278c07656e2d05729c7634dd4bca/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70617965766572776f726c64776964652f73646b2d7068702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/payeverworldwide/sdk-php/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/0db99595b472ac957a5d7f4882bc4ad19c7a25377127d620b3af959981a08608/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70617965766572776f726c64776964652f73646b2d7068702f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![Latest Stable Version](https://camo.githubusercontent.com/a3a27d310354708f0fdbe8e1333fd7cc950b44198db71b9850183def82ac97b8/68747470733a2f2f706f7365722e707567782e6f72672f706179657665722f7061796d656e74732d73646b2d7068702f762f737461626c65)](https://packagist.org/packages/payever/payments-sdk-php)[![Total Downloads](https://camo.githubusercontent.com/cccf1548fd03ea1b52e9e6e597b8ca5b5f3620ed55e1a342159a90e07160ff41/68747470733a2f2f706f7365722e707567782e6f72672f706179657665722f7061796d656e74732d73646b2d7068702f646f776e6c6f616473)](https://packagist.org/packages/payever/payments-sdk-php)[![License](https://camo.githubusercontent.com/6b8c019fd030abe8ee30c1f5fff8c0b5d7cbd644eb7537cf315187142eaff0c4/68747470733a2f2f706f7365722e707567782e6f72672f706179657665722f7061796d656e74732d73646b2d7068702f6c6963656e7365)](https://packagist.org/packages/payever/payments-sdk-php)

This repository contains the open source PHP SDK that allows you to access payever from your PHP app.

This library follows semantic versioning. Read more on [semver.org](http://semver.org).

Please note: this SDK is used within the payever plugins. It is NOT suitable for custom API integrations. If you would like to integrate with us via API, please visit  and follow the instructions and code examples provided there.

Troubleshooting
---------------

[](#troubleshooting)

If you faced an issue you can contact us via official support channel -

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

[](#requirements)

- [PHP 5.4.0 and later](http://www.php.net/)
- PHP cURL extension

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

[](#installation)

You can use **Composer**

### Composer

[](#composer)

The preferred method is via [composer](https://getcomposer.org). Follow the [installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

```
composer require payever/payments-sdk-php
```

Documentation
-------------

[](#documentation)

Raw HTTP API docs can be found here -

### Enums

[](#enums)

The are several list of fixed string values used inside API. For convenience they are represented as constants and grouped into classes.

- Payments
    - [`PaymentMethod`](lib/Payever/Payments/Enum/PaymentMethod.php) - list of available payever payment methods
    - [`Status`](lib/Payever/Payments/Enum/Status.php) - list of available payever payment statuses

### API Clients

[](#api-clients)

HTTP API communication with payever happens through [`PaymentsApiClient`](#paymentsapiclient) API clients.

#### Configuration

[](#configuration)

Each API client requires configuration object as the first argument of client's constructor. In order to get the valid configuration object you need to have valid API credentials:

- Client ID
- Client Secret
- Business UUID

Additionally, you need to tell which API channel you're using:

```
use Payever\Sdk\Core\ClientConfiguration;
use Payever\Sdk\Core\Enum\ChannelSet;

$clientId = 'your-oauth2-client-id';
$clientSecret = 'your-oauth2-client-secret';
$businessUuid = '88888888-4444-4444-4444-121212121212';

$clientConfiguration = new ClientConfiguration();

$clientConfiguration
    ->setClientId($clientId)
    ->setClientSecret($clientSecret)
    ->setBusinessUuid($businessUuid)
    ->setChannelSet(ChannelSet::CHANNEL_MAGENTO)
    ->setApiMode(ClientConfiguration::API_MODE_LIVE)
;
```

NOTE: All examples below assume you have [`ClientConfiguration`](https://github.com/payeverworldwide/core-sdk-php/blob/main/lib/Payever/Core/ClientConfiguration.php) instantiated inside `$clientConfiguration` variable.

##### Logging

[](#logging)

You can setup logging of all API interactions by providing [PSR-3](https://www.php-fig.org/psr/psr-3/) compatible logger instance.

In case if you don't have PSR-3 compatible logger at hand - this SKD contains simple file logger:

```
use Psr\Log\LogLevel;
use Payever\Sdk\Core\Logger\FileLogger;

$logger = new FileLogger(__DIR__.'/payever.log', LogLevel::INFO);
$clientConfiguration->setLogger($logger);
```

#### PaymentsApiClient

[](#paymentsapiclient)

This API client is used in all payment-related interactions.

##### Create payment and obtain redirect url

[](#create-payment-and-obtain-redirect-url)

```
use Payever\Sdk\Payments\Enum\PaymentMethod;
use Payever\Sdk\Payments\PaymentsApiClient;
use Payever\Sdk\Payments\Http\RequestEntity\CreatePaymentRequest;

$paymentsApiClient = new PaymentsApiClient($clientConfiguration);

$createPaymentEntity = new CreatePaymentRequest();

$createPaymentEntity
    ->setOrderId('1001')
    ->setAmount(100.5)
    ->setFee(10)
    ->setCurrency('EUR')
    ->setPaymentMethod(PaymentMethod::METHOD_SANTANDER_DE_INSTALLMENT)
    ->setSalutation('mr')
    ->setFirstName('John')
    ->setLastName('Doe')
    ->setCity('Hamburg')
    ->setCountry('DE')
    ->setZip('10111')
    ->setStreet('Awesome street, 10')
    ->setEmail('john.doe@example.com')
    ->setPhone('+450001122')
    ->setSuccessUrl('https://your.domain/success?paymentId=--PAYMENT-ID--')
    ->setCancelUrl('https://your.domain/checkout?reason=cancel')
    ->setFailureUrl('https://your.domain/checkout?reason=failure')
    ->setNoticeUrl('https://your.domain/async-payment-callback?paymentId=--PAYMENT-ID--')
;

try {
    $response = $paymentsApiClient->createPaymentRequest($createPaymentEntity);
    $responseEntity = $response->getResponseEntity();

    header(sprintf('Location: %s', $responseEntity->getRedirectUrl()), true);
    exit;
} catch (\Exception $exception) {
    echo $exception->getMessage();
}
```

##### Retrieve payment details by id

[](#retrieve-payment-details-by-id)

```
use Payever\Sdk\Payments\PaymentsApiClient;
use Payever\Sdk\Payments\Http\MessageEntity\RetrievePaymentResultEntity;

$paymentId = '--PAYMENT-ID--';
$paymentsApiClient = new PaymentsApiClient($clientConfiguration);

try {
    $response = $paymentsApiClient->retrievePaymentRequest($paymentId);
    /** @var RetrievePaymentResultEntity $payment */
    $payment = $response->getResponseEntity()->getResult();
    $status = $payment->getStatus();
} catch(\Exception $exception) {
    echo $exception->getMessage();
}
```

##### Cancel the payment by id

[](#cancel-the-payment-by-id)

```
use Payever\Sdk\Payments\PaymentsApiClient;
use Payever\Sdk\Payments\Action\ActionDecider;

$paymentId = '--PAYMENT-ID--';
$paymentsApiClient = new PaymentsApiClient($clientConfiguration);
$actionDecider = new ActionDecider($paymentsApiClient);

try {
    if ($actionDecider->isActionAllowed($paymentId, ActionDecider::ACTION_CANCEL, false)) {
        $paymentsApiClient->cancelPaymentRequest($paymentId);
    }
} catch(\Exception $exception) {
    echo $exception->getMessage();
}
```

##### Trigger Santander shipping-goods payment action

[](#trigger-santander-shipping-goods-payment-action)

```
use Payever\Sdk\Payments\PaymentsApiClient;
use Payever\Sdk\Payments\Action\ActionDecider;

$paymentId = '--PAYMENT-ID--';
$paymentsApiClient = new PaymentsApiClient($clientConfiguration);
$actionDecider = new ActionDecider($paymentsApiClient);

try {
    if ($actionDecider->isActionAllowed($paymentId, ActionDecider::ACTION_SHIPPING_GOODS, false)) {
        $paymentsApiClient->shippingGoodsPaymentRequest($paymentId);
    }
} catch(\Exception $exception) {
    echo $exception->getMessage();
}
```

##### Get Company credit level

[](#get-company-credit-level)

```
use Payever\Sdk\Payments\PaymentsApiClient;
use Payever\Sdk\Payments\Http\RequestEntity\CompanySearchCreditRequest;
use Payever\Sdk\Payments\Http\RequestEntity\CompanySearchCredit\CompanyEntity;

$company = new CompanyEntity();
$company->setExternalId('81981372');

$companySearchCredit = new CompanySearchCreditRequest();
$companySearchCredit->setCompany($company);

$paymentsApiClient = new PaymentsApiClient($clientConfiguration);
$result = $paymentsApiClient->companyCredit($companySearchCredit);
```

License
-------

[](#license)

Please see the [license file](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~27 days

Recently: every ~39 days

Total

40

Last Release

67d ago

Major Versions

1.5.3 → 2.0.02024-03-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/366daacbf8d63b9865ec0c754767c79e1f2ccd8eb98dbe0d8371120d1bc9da4c?d=identicon)[payeverdev](/maintainers/payeverdev)

---

Top Contributors

[![payeverdev](https://avatars.githubusercontent.com/u/22471576?v=4)](https://github.com/payeverdev "payeverdev (44 commits)")

---

Tags

paymentspaye-commercepayever

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/payever-payments-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/payever-payments-sdk-php/health.svg)](https://phpackages.com/packages/payever-payments-sdk-php)
```

###  Alternatives

[amzn/amazon-pay-sdk-php

Amazon Pay SDK (PHP)

20512.1M3](/packages/amzn-amazon-pay-sdk-php)[recurly/recurly-client

The PHP client library for the Recurly API

1736.3M7](/packages/recurly-recurly-client)[amzn/amazon-pay-api-sdk-php

Amazon Pay API SDK (PHP)

505.1M9](/packages/amzn-amazon-pay-api-sdk-php)[enupal/stripe

Allows customers sign up for recurring and one-time payments with Stripe, perfect for orders, donations, subscriptions, and events. Create simple payment forms in seconds easily without coding. For Craft CMS 3.x

3416.5k1](/packages/enupal-stripe)

PHPackages © 2026

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