PHPackages                             coolpay/coolpay-php-client - 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. coolpay/coolpay-php-client

ActiveLibrary[Payment Processing](/categories/payments)

coolpay/coolpay-php-client
==========================

PHP-SDK to communicate with the payment provider CoolPay

05.7kPHP

Since Nov 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/CoolPay/coolpay-php-client)[ Packagist](https://packagist.org/packages/coolpay/coolpay-php-client)[ RSS](/packages/coolpay-coolpay-php-client/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

coolpay-php-client
==================

[](#coolpay-php-client)

`coolpay-php-client` is a official client for [CoolPay API](http://www.coolpay.com/docs). The CoolPay API enables you to accept payments in a secure and reliable manner. This package currently support CoolPay `v10` api.

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

[](#installation)

### Composer

[](#composer)

Simply add a dependency on coolpay/coolpay-php-client to your project's composer.json file if you use Composer to manage the dependencies of your project. Here is a minimal example of a composer.json file that just defines a dependency on newest stable version of CoolPay:

```
{
    "require": {
        "coolpay/coolpay-php-client": "1.0.*"
    }
}

```

### Manually upload

[](#manually-upload)

If you cannot use composer and all the goodness the autoloader in composer gives you, you can upload `/CoolPay/` to your web space. However, then you need to manage the autoloading of the classes yourself.

Usage
-----

[](#usage)

Before doing anything you should register yourself with CoolPay and get access credentials. If you haven't please [click](https://coolpay.com/) here to apply.

### Create a new client

[](#create-a-new-client)

First you should create a client instance that is anonymous or authorized with `api_key` or login credentials provided by CoolPay.

To initialise an anonymous client:

```

```

To initialise a client with CoolPay Api Key:

```

```

Or you can provide login credentials like:

```

```

### API Calls

[](#api-calls)

You can afterwards call any method described in CoolPay api with corresponding http method and endpoint. These methods are supported currently: `get`, `post`, `put`, `patch` and `delete`.

```
// Get all payments
$payments = $client->request->get('/payments');

// Get specific payment
$payments = $client->request->get('/payments/{id}');

// Create payment
$form = array(
    'order_id' => $order_id,
    'currency' => $currency,
    ...
);
$payments = $client->request->post('/payments', $form);
$status = $payments->httpStatus();
if ($status == 201) {
    // Successful created
}
```

### Handling the response

[](#handling-the-response)

Getting the `HTTP status code`:

```
$response = $client->request->get('/payments');
$status = $response->httpStatus();

if ($status == 200) {
    // Successful request
}
```

The returned response object supports 3 different ways of returning the response body, `asRaw()`, `asObject`, `asArray()`.

```
// Get the HTTP status code, headers and raw response body.
list($status_code, $headers, $response_body) = $client->request->get('/payments')->asRaw();

// Get the response body as an object
$response_body = $client->request->get('/payments')->asObject();

// Get the response body as an array
$response_body = $client->request->get('/payments')->asArray();

// Example usage
$payments = $client->request->get('/payments')->asArray();

foreach($payments as $payment) {
    //...
}
```

You can read more about api responses at .

Tests
-----

[](#tests)

Use composer to create an autoloader:

```
$ composer install
$ phpunit
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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/da3f11c22f9fb2147f860372c61c3e0f13bc9143396190a28f64479414eff65e?d=identicon)[kongkc](/maintainers/kongkc)

---

Top Contributors

[![kongkc](https://avatars.githubusercontent.com/u/44399595?v=4)](https://github.com/kongkc "kongkc (3 commits)")

### Embed Badge

![Health badge](/badges/coolpay-coolpay-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/coolpay-coolpay-php-client/health.svg)](https://phpackages.com/packages/coolpay-coolpay-php-client)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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