Official PHP client library for the Invoiced API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data supply our own CA bundle Mar 1, 2016
src bump version to v0.14 Sep 4, 2018
tests fix class casing in invoice test Sep 4, 2018
.coveralls.yml update code coverage dependency Dec 23, 2017
.gitattributes added .gitattributes Feb 7, 2016
.gitignore gitignore May 12, 2017
.travis.yml test with php 7.3 Dec 15, 2018
LICENSE added MIT license Aug 20, 2015
README.md update requirements May 12, 2017
composer.json update code coverage dependency Dec 23, 2017
phpunit.xml.dist added tests for Client class Aug 20, 2015

README.md

invoiced-php

This repository contains the PHP client library for the Invoiced API.

Build Status Coverage Status

Installing

The Invoiced package can be installed with composer:

composer require invoiced/invoiced

Requirements

Usage

First, you must instantiate a new client

$invoiced = new Invoiced\Client("{API_KEY}");

Then, API calls can be made like this:

// retrieve invoice
$invoice = $invoiced->Invoice->retrieve("{INVOICE_ID}");

// mark as paid
$transaction = $invoiced->Transaction->create([
    'invoice' => $invoice->id,
    'amount' => $invoice->balance,
    'method' => "check"
]);

If you want to use the sandbox API instead then you must set the second argument on the client to true like this:

$invoiced = new Invoiced\Client("{SANDBOX_API_KEY}", true);

Developing

The test suite can be ran with phpunit