PHPackages                             cubepay/cubepay-api-library - 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. cubepay/cubepay-api-library

ActiveProject[API Development](/categories/api)

cubepay/cubepay-api-library
===========================

CubePay API library for PHP, a third-party cryptocurrency payment gateway.

0.0.1(7y ago)0121MITPHPPHP &gt;=5.4

Since Sep 25Pushed 7y agoCompare

[ Source](https://github.com/CubePayIO/cubepay-php)[ Packagist](https://packagist.org/packages/cubepay/cubepay-api-library)[ RSS](/packages/cubepay-cubepay-api-library/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

CubePay API standard library for PHP
====================================

[](#cubepay-api-standard-library-for-php)

A third-party cryptocurrency payment gateway.

Make it easy for receiving cryptocurrency!

More information at .

API Document
------------

[](#api-document)

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

[](#installation)

- The minimum required PHP version of Yii is PHP 5.4.
- It works best with PHP 7.

```
$ php composer.phar require cubepay/cubepay-api-library

```

Usage
-----

[](#usage)

**Initialization**

```
use CubePay\CubePay;

$cubepay = new CubePay(CLIENT_ID, CLIENT_SECRET, URL);

```

**Get available cryptocurrencies**

You can use these currencies at payment API for receive/send coin.

```
$response = $cubepay->getCoin();

```

**Get available fiat currenies.**

You can only use these fiat currencies for your product's original list price. We'll convert value by exchange rate between currency of list price and currency of actual paid.

```
$response = $cubepay->getFiat();

```

**Do Payment**

Render a page with these payment information:

- Your shop information
- Item name
- Payable coin list and corresponding price.

```
$response = $cubepay->doPayment($sourceCoinId, $sourceAmount, $itemName, $merchantTransactionId, $other = null, $returnUrl = null, $ipnUrl = null, $sendCoinId = null, $sendAmount = null, $receiveAddress = null);

```

**Init payment With specific coin**

Initial payment with specific coin. The payment will expire after 6 hours.

```
$response = $cubepay->doPaymentByCoinId($coinId, $sourceCoinId, $sourceAmount, $itemName, $merchantTransactionId, $other = null, $returnUrl = null, $ipnUrl = null, $sendCoinId = null, $sendAmount = null, $receiveAddress = null);

```

**Query payment information**

Query payment information by specific identity

```
$response = $cubepay->queryPayment($id = null, $merchantTransactionId = null);

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

2835d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43127408?v=4)[CubePayIO](/maintainers/CubePayIO)[@CubePayIO](https://github.com/CubePayIO)

---

Top Contributors

[![CubePayIO](https://avatars.githubusercontent.com/u/43127408?v=4)](https://github.com/CubePayIO "CubePayIO (5 commits)")

---

Tags

cryptocurrencypayment-gatewayapipaymentcryptocurrencycubepay

### Embed Badge

![Health badge](/badges/cubepay-cubepay-api-library/health.svg)

```
[![Health](https://phpackages.com/badges/cubepay-cubepay-api-library/health.svg)](https://phpackages.com/packages/cubepay-cubepay-api-library)
```

###  Alternatives

[everypay/everypay-php

1743.0k](/packages/everypay-everypay-php)

PHPackages © 2026

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