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

ActiveLibrary[API Development](/categories/api)

cubits/cubits-php
=================

Cubits PHP Client Library

1.0.1(7y ago)020PHP

Since Feb 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/uLow/cubits-php)[ Packagist](https://packagist.org/packages/cubits/cubits-php)[ RSS](/packages/cubits-cubits-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Cubits PHP Client Library
=========================

[](#cubits-php-client-library)

An easy way to buy, send, and accept [bitcoin](http://en.wikipedia.org/wiki/Bitcoin) through the [Cubits API](https://cubits.com/help).

This library supports [API key authentication method](https://cubits.com/help)

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

[](#installation)

```
composer require cubits/cubits-php

```

Usage
-----

[](#usage)

Start by [enabling an API Key on your account](https://cubits.com/merchant#integration_tools).

Next, configure the Cubits library via `Cubits::configure` method and create an instance of the client using the `Cubits::withApiKey` method:

```
 Cubits::configure("https://pay.cubits.com/api/v1/",true);
 $cubits = Cubits::withApiKey($_ENV['Cubits_API_KEY'], $_ENV['Cubits_API_SECRET'])
```

Examples
--------

[](#examples)

### Create an Invoice

[](#create-an-invoice)

```
$response = $cubits->createInvoice("EUR", "42.95", "Your Order #1234", array(
            "description" => "1 widget at EUR 42.95",
            "reference" =>  "my custom tracking code for this order"
        ));
```

### Get an Invoice

[](#get-an-invoice)

```
$response = $cubits->getInvoice("ef73a6ed61a8c97427eaae2073b9127b");
```

### Send Money

[](#send-money)

```
$response = $cubits->sendMoney("3Pj4mJfK62n9mjMRcHYs96nd15UQLHHhPS","0.25120521");
```

### List Accounts

[](#list-accounts)

```
$response = $cubits->listAccounts();
```

### Request Quote

[](#request-quote)

```
$response = $cubits->requestQuote("buy","EUR","10","BTC");
```

### Buy

[](#buy)

```
$response = $cubits->buy("EUR","10");
```

### Sell

[](#sell)

```
$response = $cubits->sell("0.150","EUR");
```

### createChannel

[](#createchannel)

```
$response =  $cubits->createChannel("EUR");
```

### getChannel

[](#getchannel)

```
  $cubits->getChannel("7ff31a5843887cbaffb9adb3fcb2aebd");
```

### updateChannel

[](#updatechannel)

```
$response = $cubits->updateChannel("7ff31a5843887cbaffb9adb3fcb2aebd", "EUR", "Alpaca underwear");
```

Security notes
--------------

[](#security-notes)

If someone gains access to your API Key they will have complete control of your Cubits account. This includes the abillity to send all of your bitcoins elsewhere.

For this reason, API access is disabled on all Cubits accounts by default. If you decide to enable API key access you should take precautions to store your API key securely in your application. How to do this is application specific, but it's something you should [research](http://programmers.stackexchange.com/questions/65601/is-it-smart-to-store-application-keys-ids-etc-directly-inside-an-application) if you have never done this before.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~0 days

Total

2

Last Release

2893d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47269e48a15fbe884a6ba45026bb671743f4c68768c39bf6c0b3077688013d09?d=identicon)[uLow](/maintainers/uLow)

---

Top Contributors

[![uLow](https://avatars.githubusercontent.com/u/1608213?v=4)](https://github.com/uLow "uLow (5 commits)")[![integration-cubits](https://avatars.githubusercontent.com/u/11734957?v=4)](https://github.com/integration-cubits "integration-cubits (4 commits)")[![Exilibris](https://avatars.githubusercontent.com/u/319717?v=4)](https://github.com/Exilibris "Exilibris (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M272](/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.1M454](/packages/google-gax)

PHPackages © 2026

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