PHPackages                             prosus-pay/prosuspay-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. prosus-pay/prosuspay-php

ActiveLibrary[API Development](/categories/api)

prosus-pay/prosuspay-php
========================

Prosus Pay API PHP client library.

04PHP

Since Jun 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/prosus-pay/prosuspay-php)[ Packagist](https://packagist.org/packages/prosus-pay/prosuspay-php)[ RSS](/packages/prosus-pay-prosuspay-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Prosus Pay API PHP client library
=================================

[](#prosus-pay-api-php-client-library)

This library makes it easier to integrate Prosus Pay in your PHP application.

Approach
--------

[](#approach)

This library takes an opinionated approach to API with the aim of making your developer life as easy and convenient as possible. For this reason, we have decided to structure arguments a bit differently, but still allow full and advanced use cases.

The general reasoning behind the arguments an API client takes are in this order:

- First the required parameters =&gt; method arguments with NULL not allowed
- Recommended parameters =&gt; method arguments with NULL as default
- Optional parameters =&gt; arguments with NULL as default
- Lastly the advanced parameters =&gt; Inside an extra class

Methods that return a Unix timestamp always end with `Timestamp` like `getReceivedTimestamp()` to avoid format and timezone confusion. These are always in seconds (not milliseconds).

Features
--------

[](#features)

- No external dependencies. You can just drop this code in your project using composer or without composer.
- Requires PHP 8.0 and up. End-of-life'd versions will not be actively supported.
- All calls needed for eCommerce are included, but there are more we still need to add.

TODO
----

[](#todo)

- convert examples to tests
- Getters and setters
- Expand beyond the eCommerce related API calls and make this library 100% complete.

How to use with composer
------------------------

[](#how-to-use-with-composer)

```
composer require prosuspay/prosuspay-php

```

If you use some framework or other project you likely are ready to go. If you start from scratch make sure to include Composer autoloader.

```
require __DIR__ . '/../vendor/autoload.php';

```

How to use without composer (not recommended)
---------------------------------------------

[](#how-to-use-without-composer-not-recommended)

In the `src` directory we have a custom `autoload.php` which you can require and avoid using composer if needed.

```
// Require the autoload file.
require __DIR__ . '/../src/autoload.php';

// Example to get all stores.
$apiKey = '';
$host = ''; // e.g. https://your.prosuspay-server.tld

try {
    $client = new \ProsusPay\Client\Store($host, $apiKey);
    var_dump($client->getStores());
} catch (\Throwable $e) {
    echo "Error: " . $e->getMessage();
}

```

Best practices
--------------

[](#best-practices)

- Always use an API key with as little permissions as possible.
- If you only interact with specific stores, use an API key that is limited to that store or those stores only.
- When processing an incoming webhook, always load the data fresh using the API as the data may be stale or changed in the meantime. Webhook payloads can be resent on error, so you could be seeing outdated information. By loading the data fresh, you are also protecting yourself from possibly spoofed (fake) requests.

FAQ
---

[](#faq)

### Where to get the API key from?

[](#where-to-get-the-api-key-from)

The API keys for API are *not* on the store level "Access Tokens" anymore. You need to go to your account profile: "My Settings" (user profile icon) -&gt; "API Keys" instead. You can even redirect the users to generate the API keys there.

Contribute
----------

[](#contribute)

We run static analyzer [Psalm](https://psalm.dev/) and [PHP-CS-fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) for codestyle when you open a pull-request. Please check if there are any errors and fix them accordingly.

### Codestyle

[](#codestyle)

We use PSR-12 code style to ensure proper formatting and spacing. You can test and format your code using composer commands. Before doing a PR you can run `composer cs-check` and `composer cs-fix` which will run php-cs-fixer.

### API coverage

[](#api-coverage)

Currently implemented functionality is tracked in [this sheet](https://docs.google.com/spreadsheets/d/1A1tMWYHGVkFWRgqfkW9GSGBRjzKZzsu5XMIW1NLs-xg/edit#gid=0) and will be updated sporadically. Check to see which areas still need work in case you want to contribute.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc1b40c2250bed4552f344977c16b2e5a812bfc1f48307bff5d9fc03b6bf1dea?d=identicon)[driquelme](/maintainers/driquelme)

---

Top Contributors

[![driquelme](https://avatars.githubusercontent.com/u/5178158?v=4)](https://github.com/driquelme "driquelme (2 commits)")

### Embed Badge

![Health badge](/badges/prosus-pay-prosuspay-php/health.svg)

```
[![Health](https://phpackages.com/badges/prosus-pay-prosuspay-php/health.svg)](https://phpackages.com/packages/prosus-pay-prosuspay-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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