PHPackages                             coinsimple/coinsimple - 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. coinsimple/coinsimple

ActiveLibrary[API Development](/categories/api)

coinsimple/coinsimple
=====================

CoinSimple API wrapper

v1(11y ago)0231MITPHP

Since Nov 22Pushed 11y ago3 watchersCompare

[ Source](https://github.com/coinsimple/CoinSimple-PHP-API)[ Packagist](https://packagist.org/packages/coinsimple/coinsimple)[ Docs](https://coinsimple.com)[ RSS](/packages/coinsimple-coinsimple/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

PHP CoinSimple API
==================

[](#php-coinsimple-api)

The CoinSimple API allows you to create invoices for your businesses programatically using the Business's ID and API key.

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

[](#installation)

#### Composer

[](#composer)

You can add this repo to your project via composer, to both download and include the neccessary classes into your project. To do this simply add `coinsimple/coinsimple` to your `composer.json` like in the following:

```
{
    "require": {
        "coinsimple/coinsimple": "0.0.1"
    }
}
```

#### Manual Install

[](#manual-install)

Alternatively you can download the repo manually and `require` the `coinsimple.php` file into your project.

Usage
-----

[](#usage)

To create a new invoice you need to objects, a `business` and an `invoice`. A business contains the `Business ID` and the `API Key` and handles authorization:

```
$business = new \CoinSimple\Business(BUSINESS_ID, API_KEY);
```

You can then use this instance to send invoices. An invoice can have the following fields:

```
$data = array(
    "name" => "",
    "email" => "",
    "items" => array(
        array("description" => "", "price" => 0.0, "quantity" => 0)
    ),
    "processor" => "",
    "rate" => "",
    "currency" => "",
    "notes" => "",
    "percent" => 0.0,
    "custom" => array(),
    "callback_url" => "",
    "redirect_url" => "",
    "invoice_type" => "",
    "interval" => 0,
    "recurring_times" => 0
);

$invoice = new \CoinsSimple\Invoice($data);
```

But the only fields that are really required are `name`, `email`, `items`, `processor`, `rate` and `currency`. If you set defaults for `processor`, `rate` and `currency` in the business settings on CoinSimple, then they can be left out as well.

This library also contains the following functions if you preffer to setup the invoice incrementally:

- `->setName($name)`
- `->setEmail($email)`
- `->addItem($item)`
- `->setProcessor($processor)`
- `->setRate($rate)`
- `->setCurrency($currency)`
- `->setNotes($notes)`
- `->setPercent($percent)` (alias: `->setDiscount($percent)`)
- `->setCustom($data)`
- `->setCallbackUrl($url)`
- `->setRedirectUrl($url)`
- `->setRecurringTimes($times)` (alias: `->stopAfter($times)`)
- `->recurByDays($num_days)`
- `->recurByDate($day_of_month)`

These methods are all chainable and you can mix both options of using functions and setting intial parameters in the constructor. For example you can create an invoice like so:

```
$user_info = array(
    "name" => "Coin Simple",
    "email" => "hi@coinsimple.com"
);

$invoice = new \CoinSimple\Invoice($user_info);

$invoice.addItem(array(
    "description" => "Nice Shirt",
    "price" => 15.8,
    "quantity" => 2,
))->setCurrency("usd")->recurByDays(4)->stopAfter(2);
```

This code will create an invoice with one item which will recur 2 times once every four days.

To then send the invoice using a business you created you can use the `sendInvoice` method:

```
$business->sendInvoice($invoice);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

4133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/870b72f6ce701d12aba81be89f49816dc26b43b4f96c5ea63280688ac1841b0a?d=identicon)[gmanricks](/maintainers/gmanricks)

---

Top Contributors

[![gmanricks](https://avatars.githubusercontent.com/u/1296664?v=4)](https://github.com/gmanricks "gmanricks (13 commits)")

---

Tags

bitcoincoinsimple

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[coinbase/coinbase-commerce

Coinbase Commerce API library

148275.7k2](/packages/coinbase-coinbase-commerce)[coinpaymentsnet/coinpayments-php

A PHP wrapper for the CoinPayments.net v1 API.

55126.2k](/packages/coinpaymentsnet-coinpayments-php)[mocking-magician/coinbase-pro-sdk

Library for coinbase pro API calls

233.2k](/packages/mocking-magician-coinbase-pro-sdk)

PHPackages © 2026

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