Skip to content

patricktan98/invoiced-php

 
 

Repository files navigation

invoiced-php

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

Build Status Coverage Status PHP version

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

About

Official PHP client library for the Invoiced API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%