PHPackages                             codename065/coinbase-commerce - 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. codename065/coinbase-commerce

ActiveLibrary[API Development](/categories/api)

codename065/coinbase-commerce
=============================

PHP SDK for Coinbase commerce

41582PHP

Since Dec 14Pushed 3y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

coinbase-commerce-php-sdk
=========================

[](#coinbase-commerce-php-sdk)

This SDK is a way to simplify the usage of Coinbase Commerce REST API for your web application.

About Coinbase Commerce
-----------------------

[](#about-coinbase-commerce)

Coinbase Commerce is the easiest and safest way for your business to start accepting digital currency payments. For more info go to [Coinbase Commerce API reference page](https://commerce.coinbase.com/docs/)

Available Endpoints
-------------------

[](#available-endpoints)

The following are the endpoints available

### Charge

[](#charge)

```
POST /api/charge
GET /api/charge

```

### Checkout

[](#checkout)

```
POST /api/checkout
GET /api/checkout

```

Instalation
-----------

[](#instalation)

The coinbase-commerce-php-sdk is available at GitHub. It requires [PHP Guzzle](http://docs.guzzlephp.org/en/latest/) and PHP 5.6 or later.

You will need to use [Composer](https://getcomposer.org/) to install dependencies. Assuming you already have Composer:

### Via Composer command

[](#via-composer-command)

```
$ composer require codename065/coinbase-commerce-php-sdk
```

### Via Composer update/install

[](#via-composer-updateinstall)

To use the Coinbase Commerce PHP SDK from Composer:

- Add a `composer.json` file to your project and link to Coinbase Commerce:

```
{
    "require": {
        "codename065/coinabse-commerce": "*"
    }
}
```

Run `composer install` or `composer update` to download the latest version and dependencies.

### Via Git (clone)

[](#via-git-clone)

First, clone the repository:

```
# git clone https://github.com/codename065/coinbase-commerce.git # optionally, specify the directory in which to clone
$ cd path/to/install
```

Then, you can run the composer command to install:

```
$ composer install
```

Usage
-----

[](#usage)

### Architecture

[](#architecture)

The SDK has a very simple architecture:

```
  HTTP Client       to communicate with Coinbase Commerce servers
  Models            Data Objects, to hold and transport data

```

### Using the SDK

[](#using-the-sdk)

Below you can find an example for the Charge endpoint ( \\charge )

```
