PHPackages                             los/mundiapi - 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. los/mundiapi

ActiveLibrary[API Development](/categories/api)

los/mundiapi
============

Mundipagg API

1.0.0(8y ago)01018MITPHPPHP &gt;=5.4.0

Since Jun 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Lansoweb/MundiAPI-PHP)[ Packagist](https://packagist.org/packages/los/mundiapi)[ Docs](https://apimatic.io)[ RSS](/packages/los-mundiapi/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Getting started
===============

[](#getting-started)

Mundipagg API

How to Build
------------

[](#how-to-build)

The generated code has dependencies over external libraries like UniRest. These dependencies are defined in the `composer.json` file that comes with the SDK. To resolve these dependencies, we use the Composer package manager which requires PHP greater than 5.3.2 installed in your system. Visit  to download the installer file for Composer and run it in your system. Open command prompt and type `composer --version`. This should display the current version of the Composer installed if the installation was successful.

- Using command line, navigate to the directory containing the generated files (including `composer.json`) for the SDK.
- Run the command `composer install`. This should install all the required dependencies and create the `vendor` directory in your project directory.

[![Building SDK - Step 1](https://camo.githubusercontent.com/770500cde3c21707717a83148c299630950be0186f63fd36dadca170be93fdb9/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/770500cde3c21707717a83148c299630950be0186f63fd36dadca170be93fdb9/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d4d756e64694150492d504850)

### \[For Windows Users Only\] Configuring CURL Certificate Path in php.ini

[](#for-windows-users-only-configuring-curl-certificate-path-in-phpini)

CURL used to include a list of accepted CAs, but no longer bundles ANY CA certs. So by default it will reject all SSL certificates as unverifiable. You will have to get your CA's cert and point curl at it. The steps are as follows:

1. Download the certificate bundle (.pem file) from  on to your system.
2. Add curl.cainfo = "PATH\_TO/cacert.pem" to your php.ini file located in your php installation. “PATH\_TO” must be an absolute path containing the .pem file.

```
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
```

How to Use
----------

[](#how-to-use)

The following section explains how to use the MundiAPI library in a new project.

### 1. Open Project in an IDE

[](#1-open-project-in-an-ide)

Open an IDE for PHP like PhpStorm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

[![Open project in PHPStorm - Step 1](https://camo.githubusercontent.com/7ad0e4958333275183a5a0421a9fed34dbb2a38c7f2104fc91b88c1506f70e2c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/7ad0e4958333275183a5a0421a9fed34dbb2a38c7f2104fc91b88c1506f70e2c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Click on `Open` in PhpStorm to browse to your generated SDK directory and then click `OK`.

[![Open project in PHPStorm - Step 2](https://camo.githubusercontent.com/65918dfd66031128743fdc89c08e2951bdfaa585a3cecad2cd0131e8556702e6/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/65918dfd66031128743fdc89c08e2951bdfaa585a3cecad2cd0131e8556702e6/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d4d756e64694150492d504850)

### 2. Add a new Test Project

[](#2-add-a-new-test-project)

Create a new directory by right clicking on the solution name as shown below:

[![Add a new project in PHPStorm - Step 1](https://camo.githubusercontent.com/dcf1e572f1a1854b61bf439d61e30fd2bcf4dbea56c58f8c1edf9719e4748953/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/dcf1e572f1a1854b61bf439d61e30fd2bcf4dbea56c58f8c1edf9719e4748953/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Name the directory as "test"

[![Add a new project in PHPStorm - Step 2](https://camo.githubusercontent.com/361482a13841261f8ebd60c192cccddb7187700a71c3956a85336c0b518bb892/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/361482a13841261f8ebd60c192cccddb7187700a71c3956a85336c0b518bb892/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Add a PHP file to this project

[![Add a new project in PHPStorm - Step 3](https://camo.githubusercontent.com/5f3299559539904ea7da89ce293347c143da2fb204afc6647c3baff68a02ae9f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/5f3299559539904ea7da89ce293347c143da2fb204afc6647c3baff68a02ae9f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Name it "testSDK"

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/0601d2ec434a720ec8d66eb83bb29a139f762d335e8472916c552b6d4c781508/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/0601d2ec434a720ec8d66eb83bb29a139f762d335e8472916c552b6d4c781508/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Depending on your project setup, you might need to include composer's autoloader in your PHP code to enable auto loading of classes.

```
require_once "../vendor/autoload.php";
```

It is important that the path inside require\_once correctly points to the file `autoload.php` inside the vendor directory created during dependency installations.

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/7fe52d4255d7f7e08dfcd0ca3a3bbdd3a6538cc4e4e9b7db17c90c33da511290/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/7fe52d4255d7f7e08dfcd0ca3a3bbdd3a6538cc4e4e9b7db17c90c33da511290/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d4d756e64694150492d504850)

After this you can add code to initialize the client library and acquire the instance of a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.

### 3. Run the Test Project

[](#3-run-the-test-project)

To run your project you must set the Interpreter for your project. Interpreter is the PHP engine installed on your computer.

Open `Settings` from `File` menu.

[![Run Test Project - Step 1](https://camo.githubusercontent.com/48ddd81049be8ad2e60287f3c2068e74ba795a1d687595baaf8735af16cae780/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/48ddd81049be8ad2e60287f3c2068e74ba795a1d687595baaf8735af16cae780/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Select `PHP` from within `Languages & Frameworks`

[![Run Test Project - Step 2](https://camo.githubusercontent.com/5ad8d119315bfc28a275c843fe3ae74f9e2e48f805250edf1d4a9176bfb851da/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/5ad8d119315bfc28a275c843fe3ae74f9e2e48f805250edf1d4a9176bfb851da/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Browse for Interpreters near the `Interpreter` option and choose your interpreter.

[![Run Test Project - Step 3](https://camo.githubusercontent.com/8c311a2abb9f0f0fed59a38e45ee22b7d3d11454303b4fe7858413d75811e48e/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/8c311a2abb9f0f0fed59a38e45ee22b7d3d11454303b4fe7858413d75811e48e/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d4d756e64694150492d504850)

Once the interpreter is selected, click `OK`

[![Run Test Project - Step 4](https://camo.githubusercontent.com/8e52f079028e05b0979b15df853735fa54a2ba73072d54b98e6f30290c7b0c18/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/8e52f079028e05b0979b15df853735fa54a2ba73072d54b98e6f30290c7b0c18/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d4d756e64694150492d504850)

To run your project, right click on your PHP file inside your Test project and click on `Run`

[![Run Test Project - Step 5](https://camo.githubusercontent.com/f86c2921c5956a62fc79649c41eaa28ccb65284a9f5dfc2a9ab1187497b1009b/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d4d756e64694150492d504850)](https://camo.githubusercontent.com/f86c2921c5956a62fc79649c41eaa28ccb65284a9f5dfc2a9ab1187497b1009b/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d4d756e64694150492d504850)

How to Test
-----------

[](#how-to-test)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialization
--------------

[](#initialization)

### Authentication

[](#authentication)

In order to setup authentication and initialization of the API client, you need the following information.

ParameterDescriptionbasicAuthUserNameThe username to use with basic authenticationbasicAuthPasswordThe password to use with basic authenticationAPI client can be initialized as following.

```
$basicAuthUserName = 'basicAuthUserName'; // The username to use with basic authentication
$basicAuthPassword = 'basicAuthPassword'; // The password to use with basic authentication

$client = new MundiAPILib\MundiAPIClient($basicAuthUserName, $basicAuthPassword);
```

Class Reference
===============

[](#class-reference)

List of Controllers
------------------------------------------------------------------

[](#list-of-controllers)

- [ChargesController](#charges_controller)
- [CustomersController](#customers_controller)
- [SubscriptionsController](#subscriptions_controller)
- [PlansController](#plans_controller)
- [InvoicesController](#invoices_controller)
- [OrdersController](#orders_controller)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".ChargesController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) ChargesController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-chargescontroller)

### Get singleton instance

[](#get-singleton-instance)

The singleton instance of the `ChargesController` class can be accessed from the API Client.

```
$charges = $client->getCharges();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.getCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCharge

[](#-getcharge)

> Get a charge from its id

```
function getCharge($chargeId)
```

#### Parameters

[](#parameters)

ParameterTagsDescriptionchargeId`Required`Charge id#### Example Usage

[](#example-usage)

```
$chargeId = 'ch_wbnd47nCJJFKVZQy';

$result = $charges->getCharge($chargeId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.retryCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) retryCharge

[](#-retrycharge)

> Retries a charge

```
function retryCharge($chargeId)
```

#### Parameters

[](#parameters-1)

ParameterTagsDescriptionchargeId`Required`Charge id#### Example Usage

[](#example-usage-1)

```
$chargeId = 'charge_id';

$result = $charges->retryCharge($chargeId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.getCharges")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCharges

[](#-getcharges)

> Lists all charges

```
function getCharges()
```

#### Example Usage

[](#example-usage-2)

```
$result = $charges->getCharges();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.createCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createCharge

[](#-createcharge)

> Creates a new charge

```
function createCharge($request)
```

#### Parameters

[](#parameters-2)

ParameterTagsDescriptionrequest`Required`Request for creating a charge#### Example Usage

[](#example-usage-3)

```
$request = new CreateChargeRequest();

$result = $charges->createCharge($request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.updateChargeCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateChargeCard

[](#-updatechargecard)

> Updates the card from a charge

```
function updateChargeCard(
        $chargeId,
        $request)
```

#### Parameters

[](#parameters-3)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Required`Request for updating a charge's card#### Example Usage

[](#example-usage-4)

```
$chargeId = 'charge_id';
$request = new UpdateChargeCardRequest();

$result = $charges->updateChargeCard($chargeId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.updateChargePaymentMethod")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateChargePaymentMethod

[](#-updatechargepaymentmethod)

> Updates a charge's payment method

```
function updateChargePaymentMethod(
        $chargeId,
        $request)
```

#### Parameters

[](#parameters-4)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Required`Request for updating the payment method from a charge#### Example Usage

[](#example-usage-5)

```
$chargeId = 'charge_id';
$request = new UpdateChargePaymentMethodRequest();

$result = $charges->updateChargePaymentMethod($chargeId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.cancelCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelCharge

[](#-cancelcharge)

> Cancel a charge

```
function cancelCharge(
        $chargeId,
        $request = null)
```

#### Parameters

[](#parameters-5)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Optional`Request for cancelling a charge#### Example Usage

[](#example-usage-6)

```
$chargeId = 'charge_id';
$request = new CreateCancelChargeRequest();

$result = $charges->cancelCharge($chargeId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.captureCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) captureCharge

[](#-capturecharge)

> Captures a charge

```
function captureCharge(
        $chargeId,
        $request = null)
```

#### Parameters

[](#parameters-6)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Optional`Request for capturing a charge#### Example Usage

[](#example-usage-7)

```
$chargeId = 'charge_id';
$request = new CreateCaptureChargeRequest();

$result = $charges->captureCharge($chargeId, $request);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".CustomersController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) CustomersController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-customerscontroller)

### Get singleton instance

[](#get-singleton-instance-1)

The singleton instance of the `CustomersController` class can be accessed from the API Client.

```
$customers = $client->getCustomers();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getAddresses")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAddresses

[](#-getaddresses)

> Gets all adressess from a customer

```
function getAddresses($customerId)
```

#### Parameters

[](#parameters-7)

ParameterTagsDescriptioncustomerId`Required`Customer id#### Example Usage

[](#example-usage-8)

```
$customerId = 'customer_id';

$result = $customers->getAddresses($customerId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getCards")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCards

[](#-getcards)

> Get all cards from a customer

```
function getCards($customerId)
```

#### Parameters

[](#parameters-8)

ParameterTagsDescriptioncustomerId`Required`Customer Id#### Example Usage

[](#example-usage-9)

```
$customerId = 'customer_id';

$result = $customers->getCards($customerId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getCustomers")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCustomers

[](#-getcustomers)

> Get all Customers

```
function getCustomers()
```

#### Example Usage

[](#example-usage-10)

```
$result = $customers->getCustomers();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.createCustomer")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createCustomer

[](#-createcustomer)

> Creates a new customer

```
function createCustomer($request)
```

#### Parameters

[](#parameters-9)

ParameterTagsDescriptionrequest`Required`Request for creating a customer#### Example Usage

[](#example-usage-11)

```
$request = new CreateCustomerRequest();

$result = $customers->createCustomer($request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getCustomer")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCustomer

[](#-getcustomer)

> Get a customer

```
function getCustomer($customerId)
```

#### Parameters

[](#parameters-10)

ParameterTagsDescriptioncustomerId`Required`Customer Id#### Example Usage

[](#example-usage-12)

```
$customerId = 'customer_id';

$result = $customers->getCustomer($customerId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.updateAddress")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateAddress

[](#-updateaddress)

> Updates an address

```
function updateAddress(
        $customerId,
        $addressId,
        $request)
```

#### Parameters

[](#parameters-11)

ParameterTagsDescriptioncustomerId`Required`Customer IdaddressId`Required`Address Idrequest`Required`Request for updating an address#### Example Usage

[](#example-usage-13)

```
$customerId = 'customer_id';
$addressId = 'address_id';
$request = new UpdateAddressRequest();

$result = $customers->updateAddress($customerId, $addressId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.updateCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateCard

[](#-updatecard)

> Updates a card

```
function updateCard(
        $customerId,
        $cardId,
        $request)
```

#### Parameters

[](#parameters-12)

ParameterTagsDescriptioncustomerId`Required`Customer IdcardId`Required`Card idrequest`Required`Request for updating a card#### Example Usage

[](#example-usage-14)

```
$customerId = 'customer_id';
$cardId = 'card_id';
$request = new UpdateCardRequest();

$result = $customers->updateCard($customerId, $cardId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getAddress")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAddress

[](#-getaddress)

> Get a customer's address

```
function getAddress(
        $customerId,
        $addressId)
```

#### Parameters

[](#parameters-13)

ParameterTagsDescriptioncustomerId`Required`Customer idaddressId`Required`Address Id#### Example Usage

[](#example-usage-15)

```
$customerId = 'customer_id';
$addressId = 'address_id';

$result = $customers->getAddress($customerId, $addressId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.deleteAddress")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteAddress

[](#-deleteaddress)

> Delete a Customer's address

```
function deleteAddress(
        $customerId,
        $addressId)
```

#### Parameters

[](#parameters-14)

ParameterTagsDescriptioncustomerId`Required`Customer IdaddressId`Required`Address Id#### Example Usage

[](#example-usage-16)

```
$customerId = 'customer_id';
$addressId = 'address_id';

$result = $customers->deleteAddress($customerId, $addressId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.deleteCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteCard

[](#-deletecard)

> Delete a customer's card

```
function deleteCard(
        $customerId,
        $cardId)
```

#### Parameters

[](#parameters-15)

ParameterTagsDescriptioncustomerId`Required`Customer IdcardId`Required`Card Id#### Example Usage

[](#example-usage-17)

```
$customerId = 'customer_id';
$cardId = 'card_id';

$result = $customers->deleteCard($customerId, $cardId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.createAddress")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createAddress

[](#-createaddress)

> Creates a new address for a customer

```
function createAddress(
        $customerId,
        $request)
```

#### Parameters

[](#parameters-16)

ParameterTagsDescriptioncustomerId`Required`Customer Idrequest`Required`Request for creating an address#### Example Usage

[](#example-usage-18)

```
$customerId = 'customer_id';
$request = new CreateAddressRequest();

$result = $customers->createAddress($customerId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCard

[](#-getcard)

> Get a customer's card

```
function getCard(
        $customerId,
        $cardId)
```

#### Parameters

[](#parameters-17)

ParameterTagsDescriptioncustomerId`Required`Customer idcardId`Required`Card id#### Example Usage

[](#example-usage-19)

```
$customerId = 'customer_id';
$cardId = 'card_id';

$result = $customers->getCard($customerId, $cardId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.createCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createCard

[](#-createcard)

> Creates a new card for a customer

```
function createCard(
        $customerId,
        $request)
```

#### Parameters

[](#parameters-18)

ParameterTagsDescriptioncustomerId`Required`Customer idrequest`Required`Request for creating a card#### Example Usage

[](#example-usage-20)

```
$customerId = 'customer_id';
$request = new CreateCardRequest();

$result = $customers->createCard($customerId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.updateCustomer")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateCustomer

[](#-updatecustomer)

> Updates a customer

```
function updateCustomer(
        $customerId,
        $request)
```

#### Parameters

[](#parameters-19)

ParameterTagsDescriptioncustomerId`Required`Customer idrequest`Required`Request for updating a customer#### Example Usage

[](#example-usage-21)

```
$customerId = 'customer_id';
$request = new UpdateCustomerRequest();

$result = $customers->updateCustomer($customerId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.deleteAccessTokens")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteAccessTokens

[](#-deleteaccesstokens)

> Delete a Customer's access tokens

```
function deleteAccessTokens($customerId)
```

#### Parameters

[](#parameters-20)

ParameterTagsDescriptioncustomerId`Required`Customer Id#### Example Usage

[](#example-usage-22)

```
$customerId = 'customer_id';

$result = $customers->deleteAccessTokens($customerId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getAccessTokens")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAccessTokens

[](#-getaccesstokens)

> Get all access tokens from a customer

```
function getAccessTokens($customerId)
```

#### Parameters

[](#parameters-21)

ParameterTagsDescriptioncustomerId`Required`Customer Id#### Example Usage

[](#example-usage-23)

```
$customerId = 'customer_id';

$result = $customers->getAccessTokens($customerId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.deleteAccessToken")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteAccessToken

[](#-deleteaccesstoken)

> Delete a customer's access token

```
function deleteAccessToken(
        $customerId,
        $tokenId)
```

#### Parameters

[](#parameters-22)

ParameterTagsDescriptioncustomerId`Required`Customer IdtokenId`Required`Token Id#### Example Usage

[](#example-usage-24)

```
$customerId = 'customer_id';
$tokenId = 'token_id';

$result = $customers->deleteAccessToken($customerId, $tokenId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.createAccessToken")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createAccessToken

[](#-createaccesstoken)

> Creates a access token for a customer

```
function createAccessToken(
        $customerId,
        $request)
```

#### Parameters

[](#parameters-23)

ParameterTagsDescriptioncustomerId`Required`Customer Idrequest`Required`Request for creating a access token#### Example Usage

[](#example-usage-25)

```
$customerId = 'customer_id';
$request = new CreateAccessTokenRequest();

$result = $customers->createAccessToken($customerId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.getAccessToken")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getAccessToken

[](#-getaccesstoken)

> Get a Customer's access token

```
function getAccessToken(
        $customerId,
        $tokenId)
```

#### Parameters

[](#parameters-24)

ParameterTagsDescriptioncustomerId`Required`Customer IdtokenId`Required`Token Id#### Example Usage

[](#example-usage-26)

```
$customerId = 'customer_id';
$tokenId = 'token_id';

$result = $customers->getAccessToken($customerId, $tokenId);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".SubscriptionsController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) SubscriptionsController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-subscriptionscontroller)

### Get singleton instance

[](#get-singleton-instance-2)

The singleton instance of the `SubscriptionsController` class can be accessed from the API Client.

```
$subscriptions = $client->getSubscriptions();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateSubscriptionBillingDate")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSubscriptionBillingDate

[](#-updatesubscriptionbillingdate)

> Updates the billing date from a subscription

```
function updateSubscriptionBillingDate(
        $subscriptionId,
        $request)
```

#### Parameters

[](#parameters-25)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idrequest`Required`Request for updating the subscription billing date#### Example Usage

[](#example-usage-27)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionBillingDateRequest();

$result = $subscriptions->updateSubscriptionBillingDate($subscriptionId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.createUsage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createUsage

[](#-createusage)

> Creates a usage

```
function createUsage(
        $subscriptionId,
        $itemId,
        $body)
```

#### Parameters

[](#parameters-26)

ParameterTagsDescriptionsubscriptionId`Required`Subscription IditemId`Required`Item idbody`Required`Request for creating a usage#### Example Usage

[](#example-usage-28)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$body = new CreateUsageRequest();

$result = $subscriptions->createUsage($subscriptionId, $itemId, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateSubscriptionItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSubscriptionItem

[](#-updatesubscriptionitem)

> Updates a subscription item

```
function updateSubscriptionItem(
        $subscriptionId,
        $itemId,
        $body)
```

#### Parameters

[](#parameters-27)

ParameterTagsDescriptionsubscriptionId`Required`Subscription IditemId`Required`Item idbody`Required`Request for updating a subscription item#### Example Usage

[](#example-usage-29)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$body = new UpdateSubscriptionItemRequest();

$result = $subscriptions->updateSubscriptionItem($subscriptionId, $itemId, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getSubscriptions")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSubscriptions

[](#-getsubscriptions)

> Gets all subscriptions

```
function getSubscriptions()
```

#### Example Usage

[](#example-usage-30)

```
$result = $subscriptions->getSubscriptions();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateSubscriptionCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSubscriptionCard

[](#-updatesubscriptioncard)

> Updates the credit card from a subscription

```
function updateSubscriptionCard(
        $subscriptionId,
        $request)
```

#### Parameters

[](#parameters-28)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for updating a card#### Example Usage

[](#example-usage-31)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionCardRequest();

$result = $subscriptions->updateSubscriptionCard($subscriptionId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.createSubscription")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createSubscription

[](#-createsubscription)

> Creates a new subscription

```
function createSubscription($body)
```

#### Parameters

[](#parameters-29)

ParameterTagsDescriptionbody`Required`Request for creating a subscription#### Example Usage

[](#example-usage-32)

```
$body = new CreateSubscriptionRequest();

$result = $subscriptions->createSubscription($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.createSubscriptionItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createSubscriptionItem

[](#-createsubscriptionitem)

> Creates a new Subscription item

```
function createSubscriptionItem(
        $subscriptionId,
        $request)
```

#### Parameters

[](#parameters-30)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for creating a subscription item#### Example Usage

[](#example-usage-33)

```
$subscriptionId = 'subscription_id';
$request = new CreateSubscriptionItemRequest();

$result = $subscriptions->createSubscriptionItem($subscriptionId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.createDiscount")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createDiscount

[](#-creatediscount)

> Creates a discount

```
function createDiscount(
        $subscriptionId,
        $request)
```

#### Parameters

[](#parameters-31)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for creating a discount#### Example Usage

[](#example-usage-34)

```
$subscriptionId = 'subscription_id';
$request = new CreateDiscountRequest();

$result = $subscriptions->createDiscount($subscriptionId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getSubscription")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSubscription

[](#-getsubscription)

> Gets a subscription

```
function getSubscription($subscriptionId)
```

#### Parameters

[](#parameters-32)

ParameterTagsDescriptionsubscriptionId`Required`Subscription id#### Example Usage

[](#example-usage-35)

```
$subscriptionId = 'subscription_id';

$result = $subscriptions->getSubscription($subscriptionId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateSubscriptionPaymentMethod")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSubscriptionPaymentMethod

[](#-updatesubscriptionpaymentmethod)

> Updates the payment method from a subscription

```
function updateSubscriptionPaymentMethod(
        $subscriptionId,
        $request)
```

#### Parameters

[](#parameters-33)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for updating the paymentmethod from a subscription#### Example Usage

[](#example-usage-36)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionPaymentMethodRequest();

$result = $subscriptions->updateSubscriptionPaymentMethod($subscriptionId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getUsages")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getUsages

[](#-getusages)

> Lists all usages from a subscription item

```
function getUsages(
        $subscriptionId,
        $itemId)
```

#### Parameters

[](#parameters-34)

ParameterTagsDescriptionsubscriptionId`Required`The subscription iditemId`Required`The subscription item id#### Example Usage

[](#example-usage-37)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';

$result = $subscriptions->getUsages($subscriptionId, $itemId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.deleteUsage")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteUsage

[](#-deleteusage)

> Deletes a usage

```
function deleteUsage(
        $subscriptionId,
        $itemId,
        $usageId)
```

#### Parameters

[](#parameters-35)

ParameterTagsDescriptionsubscriptionId`Required`The subscription iditemId`Required`The subscription item idusageId`Required`The usage id#### Example Usage

[](#example-usage-38)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$usageId = 'usage_id';

$result = $subscriptions->deleteUsage($subscriptionId, $itemId, $usageId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.deleteDiscount")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteDiscount

[](#-deletediscount)

> Deletes a discount

```
function deleteDiscount(
        $subscriptionId,
        $discountId)
```

#### Parameters

[](#parameters-36)

ParameterTagsDescriptionsubscriptionId`Required`Subscription iddiscountId`Required`Discount Id#### Example Usage

[](#example-usage-39)

```
$subscriptionId = 'subscription_id';
$discountId = 'discount_id';

$result = $subscriptions->deleteDiscount($subscriptionId, $discountId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.cancelSubscription")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelSubscription

[](#-cancelsubscription)

> Cancels a subscription

```
function cancelSubscription(
        $subscriptionId,
        $request = null)
```

#### Parameters

[](#parameters-37)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Optional`Request for cancelling a subscription#### Example Usage

[](#example-usage-40)

```
$subscriptionId = 'subscription_id';
$request = new CreateCancelSubscriptionRequest();

$result = $subscriptions->cancelSubscription($subscriptionId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.deleteSubscriptionItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteSubscriptionItem

[](#-deletesubscriptionitem)

> Deletes a subscription item

```
function deleteSubscriptionItem(
        $subscriptionId,
        $subscriptionItemId)
```

#### Parameters

[](#parameters-38)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idsubscriptionItemId`Required`Subscription item id#### Example Usage

[](#example-usage-41)

```
$subscriptionId = 'subscription_id';
$subscriptionItemId = 'subscription_item_id';

$result = $subscriptions->deleteSubscriptionItem($subscriptionId, $subscriptionItemId);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".PlansController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) PlansController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-planscontroller)

### Get singleton instance

[](#get-singleton-instance-3)

The singleton instance of the `PlansController` class can be accessed from the API Client.

```
$plans = $client->getPlans();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.getPlanItems")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getPlanItems

[](#-getplanitems)

> Gets all items from a plan

```
function getPlanItems($planId)
```

#### Parameters

[](#parameters-39)

ParameterTagsDescriptionplanId`Required`Plan id#### Example Usage

[](#example-usage-42)

```
$planId = 'plan_id';

$result = $plans->getPlanItems($planId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.updatePlanItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updatePlanItem

[](#-updateplanitem)

> Updates a plan item

```
function updatePlanItem(
        $planId,
        $planItemId,
        $body)
```

#### Parameters

[](#parameters-40)

ParameterTagsDescriptionplanId`Required`Plan idplanItemId`Required`Plan item idbody`Required`Request for updating the plan item#### Example Usage

[](#example-usage-43)

```
$planId = 'plan_id';
$planItemId = 'plan_item_id';
$body = new UpdatePlanItemRequest();

$result = $plans->updatePlanItem($planId, $planItemId, $body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.getPlan")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getPlan

[](#-getplan)

> Gets a plan

```
function getPlan($planId)
```

#### Parameters

[](#parameters-41)

ParameterTagsDescriptionplanId`Required`Plan id#### Example Usage

[](#example-usage-44)

```
$planId = 'plan_id';

$result = $plans->getPlan($planId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.createPlanItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createPlanItem

[](#-createplanitem)

> Adds a new item to a plan

```
function createPlanItem(
        $planId,
        $request)
```

#### Parameters

[](#parameters-42)

ParameterTagsDescriptionplanId`Required`Plan idrequest`Required`Request for creating a plan item#### Example Usage

[](#example-usage-45)

```
$planId = 'plan_id';
$request = new CreatePlanItemRequest();

$result = $plans->createPlanItem($planId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.updatePlan")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updatePlan

[](#-updateplan)

> Updates a plan

```
function updatePlan(
        $planId,
        $request)
```

#### Parameters

[](#parameters-43)

ParameterTagsDescriptionplanId`Required`Plan idrequest`Required`Request for updating a plan#### Example Usage

[](#example-usage-46)

```
$planId = 'plan_id';
$request = new UpdatePlanRequest();

$result = $plans->updatePlan($planId, $request);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.createPlan")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createPlan

[](#-createplan)

> Creates a new plan

```
function createPlan($body)
```

#### Parameters

[](#parameters-44)

ParameterTagsDescriptionbody`Required`Request for creating a plan#### Example Usage

[](#example-usage-47)

```
$body = new CreatePlanRequest();

$result = $plans->createPlan($body);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.getPlans")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getPlans

[](#-getplans)

> Gets all plans

```
function getPlans()
```

#### Example Usage

[](#example-usage-48)

```
$result = $plans->getPlans();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.deletePlan")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deletePlan

[](#-deleteplan)

> Deletes a plan

```
function deletePlan($planId)
```

#### Parameters

[](#parameters-45)

ParameterTagsDescriptionplanId`Required`Plan id#### Example Usage

[](#example-usage-49)

```
$planId = 'plan_id';

$result = $plans->deletePlan($planId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.getPlanItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getPlanItem

[](#-getplanitem)

> Gets a plan item

```
function getPlanItem(
        $planId,
        $planItemId)
```

#### Parameters

[](#parameters-46)

ParameterTagsDescriptionplanId`Required`Plan idplanItemId`Required`Plan item id#### Example Usage

[](#example-usage-50)

```
$planId = 'plan_id';
$planItemId = 'plan_item_id';

$result = $plans->getPlanItem($planId, $planItemId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.deletePlanItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deletePlanItem

[](#-deleteplanitem)

> Removes an item from a plan

```
function deletePlanItem(
        $planId,
        $planItemId)
```

#### Parameters

[](#parameters-47)

ParameterTagsDescriptionplanId`Required`Plan idplanItemId`Required`Plan item id#### Example Usage

[](#example-usage-51)

```
$planId = 'plan_id';
$planItemId = 'plan_item_id';

$result = $plans->deletePlanItem($planId, $planItemId);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".InvoicesController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) InvoicesController
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-invoicescontroller)

### Get singleton instance

[](#get-singleton-instance-4)

The singleton instance of the `InvoicesController` class can be accessed from the API Client.

```
$invoices = $client->getInvoices();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".InvoicesController.cancelInvoice")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelInvoice

[](#-cancelinvoice)

> Cancels an invoice

```
function cancelInvoice($invoiceId)
```

#### Parameters

[](#parameters-48)

ParameterTagsDescriptioninvoiceId`Required`Invoice id#### Example Usage

[](#example-usage-52)

```
$invoiceId = 'invoice_id';

$result = $invoices->cancelInvoice($invoiceId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".InvoicesController.getLastInvoiceCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getLastInvoiceCharge

[](#-getlastinvoicecharge)

> Gets the last charge from an invoice

```
function getLastInvoiceCharge($invoiceId)
```

#### Parameters

[](#parameters-49)

ParameterTagsDescriptioninvoiceId`Required`Invoice id#### Example Usage

[](#example-usage-53)

```
$invoiceId = 'invoice_id';

$result = $invoices->getLastInvoiceCharge($invoiceId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".InvoicesController.getInvoices")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getInvoices

[](#-getinvoices)

> Gets all invoices

```
function getInvoices()
```

#### Example Usage

[](#example-usage-54)

```
$result = $invoices->getInvoices();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".InvoicesController.getInvoice")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getInvoice

[](#-getinvoice)

> Gets an invoice

```
function getInvoice($invoiceId)
```

#### Parameters

[](#parameters-50)

ParameterTagsDescriptioninvoiceId`Required`Invoice Id#### Example Usage

[](#example-usage-55)

```
$invoiceId = 'invoice_id';

$result = $invoices->getInvoice($invoiceId);
```

[Back to List of Controllers](#list_of_controllers)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".OrdersController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) OrdersController
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-orderscontroller)

### Get singleton instance

[](#get-singleton-instance-5)

The singleton instance of the `OrdersController` class can be accessed from the API Client.

```
$orders = $client->getOrders();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.getOrder")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getOrder

[](#-getorder)

> Gets an order

```
function getOrder($orderId)
```

#### Parameters

[](#parameters-51)

ParameterTagsDescriptionorderId`Required`Order id#### Example Usage

[](#example-usage-56)

```
$orderId = 'order_id';

$result = $orders->getOrder($orderId);
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.getOrders")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getOrders

[](#-getorders)

> Gets all orders

```
function getOrders()
```

#### Example Usage

[](#example-usage-57)

```
$result = $orders->getOrders();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.createOrder")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createOrder

[](#-createorder)

> Creates a new Order

```
function createOrder($body)
```

#### Parameters

[](#parameters-52)

ParameterTagsDescriptionbody`Required`Request for creating an order#### Example Usage

[](#example-usage-58)

```
$body = new CreateOrderRequest();

$result = $orders->createOrder($body);
```

[Back to List of Controllers](#list_of_controllers)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~32 days

Total

3

Last Release

3226d ago

Major Versions

0.2.0 → 1.0.02017-08-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b54dffc1ebcb317a0cf825a781ab6c5f30980e9abd0d0a3f9c68830cb05c014?d=identicon)[Lansoweb](/maintainers/Lansoweb)

---

Top Contributors

[![Lansoweb](https://avatars.githubusercontent.com/u/2109813?v=4)](https://github.com/Lansoweb "Lansoweb (1 commits)")[![vandrade-mundipagg](https://avatars.githubusercontent.com/u/12662388?v=4)](https://github.com/vandrade-mundipagg "vandrade-mundipagg (1 commits)")

---

Tags

apisdkMundiAPI

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[bandwidth/sdk

Bandwidth's set of APIs

16995.4k1](/packages/bandwidth-sdk)[messagemedia/messages-sdk

The MessageMedia Messages API provides a number of endpoints for building powerful two-way messaging applications.

12422.1k](/packages/messagemedia-messages-sdk)

PHPackages © 2026

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