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

ActiveLibrary[API Development](/categories/api)

signativa/mundiapi
==================

Mundipagg API

4.3.1(4y ago)05MITPHPPHP &gt;=5.4.0

Since Nov 9Pushed 4y agoCompare

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

READMEChangelog (1)Dependencies (3)Versions (42)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)

- [CustomersController](#customers_controller)
- [ChargesController](#charges_controller)
- [RecipientsController](#recipients_controller)
- [SubscriptionsController](#subscriptions_controller)
- [InvoicesController](#invoices_controller)
- [OrdersController](#orders_controller)
- [TokensController](#tokens_controller)
- [PlansController](#plans_controller)
- [TransactionsController](#transactions_controller)
- [TransfersController](#transfers_controller)

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

[](#-customerscontroller)

### Get singleton instance

[](#get-singleton-instance)

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.createAccessToken")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createAccessToken

[](#-createaccesstoken)

> Creates a access token for a customer

```
function createAccessToken(
        $customerId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters)

ParameterTagsDescriptioncustomerId`Required`Customer Idrequest`Required`Request for creating a access tokenidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage)

```
$customerId = 'customer_id';
$request = new CreateAccessTokenRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatecustomer)

> Updates a customer

```
function updateCustomer(
        $customerId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-1)

ParameterTagsDescriptioncustomerId`Required`Customer idrequest`Required`Request for updating a customeridempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-1)

```
$customerId = 'customer_id';
$request = new UpdateCustomerRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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-2)

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

[](#example-usage-2)

```
$customerId = 'customer_id';

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

### [![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-3)

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

[](#example-usage-3)

```
$customerId = 'customer_id';

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

### [![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,
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-4)

ParameterTagsDescriptioncustomerId`Required`Customer idpage`Optional`Page numbersize`Optional`Page size#### Example Usage

[](#example-usage-4)

```
$customerId = 'customer_id';
$page = 52;
$size = 52;

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

### [![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-5)

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

[](#example-usage-5)

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

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

### [![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-6)

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

[](#example-usage-6)

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

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-7)

ParameterTagsDescriptioncustomerId`Required`Customer idrequest`Required`Request for creating a cardidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-7)

```
$customerId = 'customer_id';
$request = new CreateCardRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-renewcard)

> Renew a card

```
function renewCard(
        $customerId,
        $cardId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-8)

ParameterTagsDescriptioncustomerId`Required`Customer idcardId`Required`Card IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-8)

```
$customerId = 'customer_id';
$cardId = 'card_id';
$idempotencyKey = 'idempotency-key';

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

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

[](#-createcustomer)

> Creates a new customer

```
function createCustomer(
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-9)

ParameterTagsDescriptionrequest`Required`Request for creating a customeridempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-9)

```
$request = new CreateCustomerRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-10)

ParameterTagsDescriptioncustomerId`Required`Customer IdaddressId`Required`Address Idrequest`Required`Request for updating an addressidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-10)

```
$customerId = 'customer_id';
$addressId = 'address_id';
$request = new UpdateAddressRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-11)

ParameterTagsDescriptioncustomerId`Required`Customer Idpage`Optional`Page numbersize`Optional`Page size#### Example Usage

[](#example-usage-11)

```
$customerId = 'customer_id';
$page = 52;
$size = 52;

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

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

[](#-updatecustomermetadata)

> Updates the metadata a customer

```
function updateCustomerMetadata(
        $customerId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-12)

ParameterTagsDescriptioncustomerId`Required`The customer idrequest`Required`Request for updating the customer metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-12)

```
$customerId = 'customer_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-13)

ParameterTagsDescriptioncustomerId`Required`Customer IdaddressId`Required`Address IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-13)

```
$customerId = 'customer_id';
$addressId = 'address_id';
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-14)

ParameterTagsDescriptioncustomerId`Required`Customer IdcardId`Required`Card idrequest`Required`Request for updating a cardidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-14)

```
$customerId = 'customer_id';
$cardId = 'card_id';
$request = new UpdateCardRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-15)

ParameterTagsDescriptioncustomerId`Required`Customer Idpage`Optional`Page numbersize`Optional`Page size#### Example Usage

[](#example-usage-15)

```
$customerId = 'customer_id';
$page = 52;
$size = 52;

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-16)

ParameterTagsDescriptioncustomerId`Required`Customer IdcardId`Required`Card IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-16)

```
$customerId = 'customer_id';
$cardId = 'card_id';
$idempotencyKey = 'idempotency-key';

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

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

[](#-getcustomers)

> Get all Customers

```
function getCustomers(
        $name = null,
        $document = null,
        $page = 1,
        $size = 10,
        $email = null,
        $code = null)
```

#### Parameters

[](#parameters-17)

ParameterTagsDescriptionname`Optional`Name of the Customerdocument`Optional`Document of the Customerpage`Optional` `DefaultValue`Current page the the searchsize`Optional` `DefaultValue`Quantity pages of the searchemail`Optional`Customer's emailcode`Optional`Customer's code#### Example Usage

[](#example-usage-17)

```
$name = 'name';
$document = 'document';
$page = 1;
$size = 10;
$email = 'email';
$code = 'Code';

$result = $customers->getCustomers($name, $document, $page, $size, $email, $code);
```

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-18)

ParameterTagsDescriptioncustomerId`Required`Customer IdtokenId`Required`Token IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-18)

```
$customerId = 'customer_id';
$tokenId = 'token_id';
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-19)

ParameterTagsDescriptioncustomerId`Required`Customer Idrequest`Required`Request for creating an addressidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-19)

```
$customerId = 'customer_id';
$request = new CreateAddressRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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-20)

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

[](#example-usage-20)

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

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

[Back to List of Controllers](#list_of_controllers)

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

[](#-chargescontroller)

### Get singleton instance

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

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-21)

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

[](#example-usage-21)

```
$chargeId = 'charge_id';

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

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

[](#-confirmpayment)

> TODO: Add a method description

```
function confirmPayment(
        $chargeId,
        $request = null,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-22)

ParameterTagsDescriptionchargeId`Required`TODO: Add a parameter descriptionrequest`Optional`Request for confirm paymentidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-22)

```
$chargeId = 'charge_id';
$request = new CreateConfirmPaymentRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-23)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Required`Request for updating a charge's cardidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-23)

```
$chargeId = 'charge_id';
$request = new UpdateChargeCardRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getcharges)

> Lists all charges

```
function getCharges(
        $page = null,
        $size = null,
        $code = null,
        $status = null,
        $paymentMethod = null,
        $customerId = null,
        $orderId = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-24)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page sizecode`Optional`Filter for charge's codestatus`Optional`Filter for charge's statuspaymentMethod`Optional`Filter for charge's payment methodcustomerId`Optional`Filter for charge's customer idorderId`Optional`Filter for charge's order idcreatedSince`Optional`Filter for the beginning of the range for charge's creationcreatedUntil`Optional`Filter for the end of the range for charge's creation#### Example Usage

[](#example-usage-24)

```
$page = 52;
$size = 52;
$code = 'code';
$status = 'status';
$paymentMethod = 'payment_method';
$customerId = 'customer_id';
$orderId = 'order_id';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $charges->getCharges($page, $size, $code, $status, $paymentMethod, $customerId, $orderId, $createdSince, $createdUntil);
```

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-25)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Optional`Request for cancelling a chargeidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-25)

```
$chargeId = 'charge_id';
$request = new CreateCancelChargeRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-retrycharge)

> Retries a charge

```
function retryCharge(
        $chargeId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-26)

ParameterTagsDescriptionchargeId`Required`Charge ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-26)

```
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-27)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Required`Request for updating the payment method from a chargeidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-27)

```
$chargeId = 'charge_id';
$request = new UpdateChargePaymentMethodRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatechargemetadata)

> Updates the metadata from a charge

```
function updateChargeMetadata(
        $chargeId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-28)

ParameterTagsDescriptionchargeId`Required`The charge idrequest`Required`Request for updating the charge metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-28)

```
$chargeId = 'charge_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-29)

ParameterTagsDescriptionchargeId`Required`Charge idrequest`Optional`Request for capturing a chargeidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-29)

```
$chargeId = 'charge_id';
$request = new CreateCaptureChargeRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatechargeduedate)

> Updates the due date from a charge

```
function updateChargeDueDate(
        $chargeId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-30)

ParameterTagsDescriptionchargeId`Required`Charge Idrequest`Required`Request for updating the due dateidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-30)

```
$chargeId = 'charge_id';
$request = new UpdateChargeDueDateRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-createcharge)

> Creates a new charge

```
function createCharge(
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-31)

ParameterTagsDescriptionrequest`Required`Request for creating a chargeidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-31)

```
$request = new CreateChargeRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getchargetransactions)

> TODO: Add a method description

```
function getChargeTransactions(
        $chargeId,
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-32)

ParameterTagsDescriptionchargeId`Required`Charge Idpage`Optional`Page numbersize`Optional`Page size#### Example Usage

[](#example-usage-32)

```
$chargeId = 'charge_id';
$page = 52;
$size = 52;

$result = $charges->getChargeTransactions($chargeId, $page, $size);
```

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

[](#-getchargessummary)

> TODO: Add a method description

```
function getChargesSummary(
        $status,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-33)

ParameterTagsDescriptionstatus`Required`TODO: Add a parameter descriptioncreatedSince`Optional`TODO: Add a parameter descriptioncreatedUntil`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-33)

```
$status = 'status';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $charges->getChargesSummary($status, $createdSince, $createdUntil);
```

[Back to List of Controllers](#list_of_controllers)

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

[](#-recipientscontroller)

### Get singleton instance

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

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

```
$recipients = $client->getRecipients();
```

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

[](#-updaterecipientmetadata)

> Updates recipient metadata

```
function updateRecipientMetadata(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-34)

ParameterTagsDescriptionrecipientId`Required`Recipient idrequest`Required`MetadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-34)

```
$recipientId = 'recipient_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->updateRecipientMetadata($recipientId, $request, $idempotencyKey);
```

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

[](#-updaterecipienttransfersettings)

> TODO: Add a method description

```
function updateRecipientTransferSettings(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-35)

ParameterTagsDescriptionrecipientId`Required`Recipient Identificatorrequest`Required`TODO: Add a parameter descriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-35)

```
$recipientId = 'recipient_id';
$request = new UpdateTransferSettingsRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->updateRecipientTransferSettings($recipientId, $request, $idempotencyKey);
```

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

[](#-getanticipation)

> Gets an anticipation

```
function getAnticipation(
        $recipientId,
        $anticipationId)
```

#### Parameters

[](#parameters-36)

ParameterTagsDescriptionrecipientId`Required`Recipient idanticipationId`Required`Anticipation id#### Example Usage

[](#example-usage-36)

```
$recipientId = 'recipient_id';
$anticipationId = 'anticipation_id';

$result = $recipients->getAnticipation($recipientId, $anticipationId);
```

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

[](#-getrecipients)

> Retrieves paginated recipients information

```
function getRecipients(
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-37)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page size#### Example Usage

[](#example-usage-37)

```
$page = 144;
$size = 144;

$result = $recipients->getRecipients($page, $size);
```

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

[](#-getbalance)

> Get balance information for a recipient

```
function getBalance($recipientId)
```

#### Parameters

[](#parameters-38)

ParameterTagsDescriptionrecipientId`Required`Recipient id#### Example Usage

[](#example-usage-38)

```
$recipientId = 'recipient_id';

$result = $recipients->getBalance($recipientId);
```

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

[](#-getanticipations)

> Retrieves a paginated list of anticipations from a recipient

```
function getAnticipations(
        $recipientId,
        $page = null,
        $size = null,
        $status = null,
        $timeframe = null,
        $paymentDateSince = null,
        $paymentDateUntil = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-39)

ParameterTagsDescriptionrecipientId`Required`Recipient idpage`Optional`Page numbersize`Optional`Page sizestatus`Optional`Filter for anticipation statustimeframe`Optional`Filter for anticipation timeframepaymentDateSince`Optional`Filter for start range for anticipation payment datepaymentDateUntil`Optional`Filter for end range for anticipation payment datecreatedSince`Optional`Filter for start range for anticipation creation datecreatedUntil`Optional`Filter for end range for anticipation creation date#### Example Usage

[](#example-usage-39)

```
$recipientId = 'recipient_id';
$page = 144;
$size = 144;
$status = 'status';
$timeframe = 'timeframe';
$paymentDateSince = date("D M d, Y G:i");
$paymentDateUntil = date("D M d, Y G:i");
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $recipients->getAnticipations($recipientId, $page, $size, $status, $timeframe, $paymentDateSince, $paymentDateUntil, $createdSince, $createdUntil);
```

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

[](#-createanticipation)

> Creates an anticipation

```
function createAnticipation(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-40)

ParameterTagsDescriptionrecipientId`Required`Recipient idrequest`Required`Anticipation dataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-40)

```
$recipientId = 'recipient_id';
$request = new CreateAnticipationRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->createAnticipation($recipientId, $request, $idempotencyKey);
```

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

[](#-updaterecipientdefaultbankaccount)

> Updates the default bank account from a recipient

```
function updateRecipientDefaultBankAccount(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-41)

ParameterTagsDescriptionrecipientId`Required`Recipient idrequest`Required`Bank account dataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-41)

```
$recipientId = 'recipient_id';
$request = new UpdateRecipientBankAccountRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->updateRecipientDefaultBankAccount($recipientId, $request, $idempotencyKey);
```

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

[](#-getrecipient)

> Retrieves recipient information

```
function getRecipient($recipientId)
```

#### Parameters

[](#parameters-42)

ParameterTagsDescriptionrecipientId`Required`Recipiend id#### Example Usage

[](#example-usage-42)

```
$recipientId = 'recipient_id';

$result = $recipients->getRecipient($recipientId);
```

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

[](#-gettransfer)

> Gets a transfer

```
function getTransfer(
        $recipientId,
        $transferId)
```

#### Parameters

[](#parameters-43)

ParameterTagsDescriptionrecipientId`Required`Recipient idtransferId`Required`Transfer id#### Example Usage

[](#example-usage-43)

```
$recipientId = 'recipient_id';
$transferId = 'transfer_id';

$result = $recipients->getTransfer($recipientId, $transferId);
```

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

[](#-gettransfers)

> Gets a paginated list of transfers for the recipient

```
function getTransfers(
        $recipientId,
        $page = null,
        $size = null,
        $status = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-44)

ParameterTagsDescriptionrecipientId`Required`Recipient idpage`Optional`Page numbersize`Optional`Page sizestatus`Optional`Filter for transfer statuscreatedSince`Optional`Filter for start range of transfer creation datecreatedUntil`Optional`Filter for end range of transfer creation date#### Example Usage

[](#example-usage-44)

```
$recipientId = 'recipient_id';
$page = 144;
$size = 144;
$status = 'status';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $recipients->getTransfers($recipientId, $page, $size, $status, $createdSince, $createdUntil);
```

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

[](#-updaterecipient)

> Updates a recipient

```
function updateRecipient(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-45)

ParameterTagsDescriptionrecipientId`Required`Recipient idrequest`Required`Recipient dataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-45)

```
$recipientId = 'recipient_id';
$request = new UpdateRecipientRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->updateRecipient($recipientId, $request, $idempotencyKey);
```

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

[](#-createrecipient)

> Creates a new recipient

```
function createRecipient(
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-46)

ParameterTagsDescriptionrequest`Required`Recipient dataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-46)

```
$request = new CreateRecipientRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->createRecipient($request, $idempotencyKey);
```

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

[](#-createtransfer)

> Creates a transfer for a recipient

```
function createTransfer(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-47)

ParameterTagsDescriptionrecipientId`Required`Recipient Idrequest`Required`Transfer dataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-47)

```
$recipientId = 'recipient_id';
$request = new CreateTransferRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->createTransfer($recipientId, $request, $idempotencyKey);
```

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

[](#-getanticipationlimits)

> Gets the anticipation limits for a recipient

```
function getAnticipationLimits(
        $recipientId,
        $timeframe,
        $paymentDate)
```

#### Parameters

[](#parameters-48)

ParameterTagsDescriptionrecipientId`Required`Recipient idtimeframe`Required`TimeframepaymentDate`Required`Anticipation payment date#### Example Usage

[](#example-usage-48)

```
$recipientId = 'recipient_id';
$timeframe = 'timeframe';
$paymentDate = date("D M d, Y G:i");

$result = $recipients->getAnticipationLimits($recipientId, $timeframe, $paymentDate);
```

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

[](#-createwithdraw)

> TODO: Add a method description

```
function createWithdraw(
        $recipientId,
        $request)
```

#### Parameters

[](#parameters-49)

ParameterTagsDescriptionrecipientId`Required`TODO: Add a parameter descriptionrequest`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-49)

```
$recipientId = 'recipient_id';
$request = new CreateWithdrawRequest();

$result = $recipients->createWithdraw($recipientId, $request);
```

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

[](#-getwithdrawbyid)

> TODO: Add a method description

```
function getWithdrawById(
        $recipientId,
        $withdrawalId)
```

#### Parameters

[](#parameters-50)

ParameterTagsDescriptionrecipientId`Required`TODO: Add a parameter descriptionwithdrawalId`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-50)

```
$recipientId = 'recipient_id';
$withdrawalId = 'withdrawal_id';

$result = $recipients->getWithdrawById($recipientId, $withdrawalId);
```

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

[](#-getwithdrawals)

> Gets a paginated list of transfers for the recipient

```
function getWithdrawals(
        $recipientId,
        $page = null,
        $size = null,
        $status = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-51)

ParameterTagsDescriptionrecipientId`Required`TODO: Add a parameter descriptionpage`Optional`TODO: Add a parameter descriptionsize`Optional`TODO: Add a parameter descriptionstatus`Optional`TODO: Add a parameter descriptioncreatedSince`Optional`TODO: Add a parameter descriptioncreatedUntil`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-51)

```
$recipientId = 'recipient_id';
$page = 144;
$size = 144;
$status = 'status';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $recipients->getWithdrawals($recipientId, $page, $size, $status, $createdSince, $createdUntil);
```

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

[](#-updateautomaticanticipationsettings)

> Updates recipient metadata

```
function updateAutomaticAnticipationSettings(
        $recipientId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-52)

ParameterTagsDescriptionrecipientId`Required`Recipient idrequest`Required`MetadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-52)

```
$recipientId = 'recipient_id';
$request = new UpdateAutomaticAnticipationSettingsRequest();
$idempotencyKey = 'idempotency-key';

$result = $recipients->updateAutomaticAnticipationSettings($recipientId, $request, $idempotencyKey);
```

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

[](#-getrecipientbycode)

> Retrieves recipient information

```
function getRecipientByCode($code)
```

#### Parameters

[](#parameters-53)

ParameterTagsDescriptioncode`Required`Recipient code#### Example Usage

[](#example-usage-53)

```
$code = 'code';

$result = $recipients->getRecipientByCode($code);
```

[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-3)

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.createDiscount")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createDiscount

[](#-creatediscount)

> Creates a discount

```
function createDiscount(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-54)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for creating a discountidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-54)

```
$subscriptionId = 'subscription_id';
$request = new CreateDiscountRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getsubscriptionitem)

> Get Subscription Item

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

#### Parameters

[](#parameters-55)

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

[](#example-usage-55)

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

$result = $subscriptions->getSubscriptionItem($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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-56)

ParameterTagsDescriptionsubscriptionId`Required`The subscription iditemId`Required`The subscription item idusageId`Required`The usage ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-56)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$usageId = 'usage_id';
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-57)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Optional`Request for cancelling a subscriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-57)

```
$subscriptionId = 'subscription_id';
$request = new CreateCancelSubscriptionRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-deleteincrement)

> Deletes a increment

```
function deleteIncrement(
        $subscriptionId,
        $incrementId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-58)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idincrementId`Required`Increment ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-58)

```
$subscriptionId = 'subscription_id';
$incrementId = 'increment_id';
$idempotencyKey = 'idempotency-key';

$result = $subscriptions->deleteIncrement($subscriptionId, $incrementId, $idempotencyKey);
```

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

[](#-getsubscriptioncyclebyid)

> TODO: Add a method description

```
function getSubscriptionCycleById(
        $subscriptionId,
        $cycleId)
```

#### Parameters

[](#parameters-59)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idcycleId`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-59)

```
$subscriptionId = 'subscription_id';
$cycleId = 'cycleId';

$result = $subscriptions->getSubscriptionCycleById($subscriptionId, $cycleId);
```

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

[](#-updatesubscriptionstartat)

> Updates the start at date from a subscription

```
function updateSubscriptionStartAt(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-60)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idrequest`Required`Request for updating the subscription start dateidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-60)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionStartAtRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-61)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for updating the paymentmethod from a subscriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-61)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionPaymentMethodRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatecurrentcyclestatus)

> TODO: Add a method description

```
function updateCurrentCycleStatus(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-62)

ParameterTagsDescriptionsubscriptionId`Required`Subscription Idrequest`Required`Request for updating the end date of the subscription current statusidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-62)

```
$subscriptionId = 'subscription_id';
$request = new UpdateCurrentCycleStatusRequest();
$idempotencyKey = 'idempotency-key';

$subscriptions->updateCurrentCycleStatus($subscriptionId, $request, $idempotencyKey);
```

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

[](#-createsubscription)

> Creates a new subscription

```
function createSubscription(
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-63)

ParameterTagsDescriptionbody`Required`Request for creating a subscriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-63)

```
$body = new CreateSubscriptionRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getusagesdetails)

> TODO: Add a method description

```
function getUsagesDetails(
        $subscriptionId,
        $cycleId = null,
        $size = null,
        $page = null,
        $itemId = null,
        $group = null)
```

#### Parameters

[](#parameters-64)

ParameterTagsDescriptionsubscriptionId`Required`Subscription IdentifiercycleId`Optional`Cycle idsize`Optional`Page sizepage`Optional`Page numberitemId`Optional`Identificador do itemgroup`Optional`identificador da loja (account) de cada item#### Example Usage

[](#example-usage-64)

```
$subscriptionId = 'subscription_id';
$cycleId = 'cycle_id';
$size = 144;
$page = 144;
$itemId = 'item_id';
$group = 'group';

$result = $subscriptions->getUsagesDetails($subscriptionId, $cycleId, $size, $page, $itemId, $group);
```

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

[](#-renewsubscription)

> TODO: Add a method description

```
function renewSubscription(
        $subscriptionId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-65)

ParameterTagsDescriptionsubscriptionId`Required`TODO: Add a parameter descriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-65)

```
$subscriptionId = 'subscription_id';
$idempotencyKey = 'idempotency-key';

$result = $subscriptions->renewSubscription($subscriptionId, $idempotencyKey);
```

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-66)

ParameterTagsDescriptionsubscriptionId`Required`Subscription IditemId`Required`Item idbody`Required`Request for updating a subscription itemidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-66)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$body = new UpdateSubscriptionItemRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-createanusage)

> Create Usage

```
function createAnUsage(
        $subscriptionId,
        $itemId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-67)

ParameterTagsDescriptionsubscriptionId`Required`Subscription iditemId`Required`Item ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-67)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$idempotencyKey = 'idempotency-key';

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

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

[](#-getincrementbyid)

> TODO: Add a method description

```
function getIncrementById(
        $subscriptionId,
        $incrementId)
```

#### Parameters

[](#parameters-68)

ParameterTagsDescriptionsubscriptionId`Required`The subscription IdincrementId`Required`The increment Id#### Example Usage

[](#example-usage-68)

```
$subscriptionId = 'subscription_id';
$incrementId = 'increment_id';

$result = $subscriptions->getIncrementById($subscriptionId, $incrementId);
```

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

[](#-deletediscount)

> Deletes a discount

```
function deleteDiscount(
        $subscriptionId,
        $discountId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-69)

ParameterTagsDescriptionsubscriptionId`Required`Subscription iddiscountId`Required`Discount IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-69)

```
$subscriptionId = 'subscription_id';
$discountId = 'discount_id';
$idempotencyKey = 'idempotency-key';

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

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

[](#-getincrements)

> TODO: Add a method description

```
function getIncrements(
        $subscriptionId,
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-70)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idpage`Optional`Page numbersize`Optional`Page size#### Example Usage

[](#example-usage-70)

```
$subscriptionId = 'subscription_id';
$page = 144;
$size = 144;

$result = $subscriptions->getIncrements($subscriptionId, $page, $size);
```

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-71)

ParameterTagsDescriptionsubscriptionId`Required`Subscription IditemId`Required`Item idbody`Required`Request for creating a usageidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-71)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$body = new CreateUsageRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-72)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for creating a subscription itemidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-72)

```
$subscriptionId = 'subscription_id';
$request = new CreateSubscriptionItemRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $page = null,
        $size = null,
        $code = null,
        $group = null,
        $usedSince = null,
        $usedUntil = null)
```

#### Parameters

[](#parameters-73)

ParameterTagsDescriptionsubscriptionId`Required`The subscription iditemId`Required`The subscription item idpage`Optional`Page numbersize`Optional`Page sizecode`Optional`Identification code in the client systemgroup`Optional`Identification group in the client systemusedSince`Optional`TODO: Add a parameter descriptionusedUntil`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-73)

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$page = 144;
$size = 144;
$code = 'code';
$group = 'group';
$usedSince = date("D M d, Y G:i");
$usedUntil = date("D M d, Y G:i");

$result = $subscriptions->getUsages($subscriptionId, $itemId, $page, $size, $code, $group, $usedSince, $usedUntil);
```

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-74)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idrequest`Required`Request for updating the subscription billing dateidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-74)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionBillingDateRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatelatestperiodendat)

> TODO: Add a method description

```
function updateLatestPeriodEndAt(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-75)

ParameterTagsDescriptionsubscriptionId`Required`TODO: Add a parameter descriptionrequest`Required`Request for updating the end date of the current signature cycleidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-75)

```
$subscriptionId = 'subscription_id';
$request = new UpdateCurrentCycleEndDateRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getsubscriptioncycles)

> TODO: Add a method description

```
function getSubscriptionCycles(
        $subscriptionId,
        $page,
        $size)
```

#### Parameters

[](#parameters-76)

ParameterTagsDescriptionsubscriptionId`Required`Subscription Idpage`Required`Page numbersize`Required`Page size#### Example Usage

[](#example-usage-76)

```
$subscriptionId = 'subscription_id';
$page = 'page';
$size = 'size';

$result = $subscriptions->getSubscriptionCycles($subscriptionId, $page, $size);
```

### [![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-77)

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

[](#example-usage-77)

```
$subscriptionId = 'subscription_id';

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

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

[](#-updatesubscriptionaffiliationid)

> TODO: Add a method description

```
function updateSubscriptionAffiliationId(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-78)

ParameterTagsDescriptionsubscriptionId`Required`TODO: Add a parameter descriptionrequest`Required`Request for updating a subscription affiliation ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-78)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionAffiliationIdRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-79)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idsubscriptionItemId`Required`Subscription item ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-79)

```
$subscriptionId = 'subscription_id';
$subscriptionItemId = 'subscription_item_id';
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-80)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for updating a cardidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-80)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionCardRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatesubscriptionmetadata)

> Updates the metadata from a subscription

```
function updateSubscriptionMetadata(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-81)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idrequest`Required`Request for updating the subscrption metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-81)

```
$subscriptionId = 'subscription_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updatesubscriptionduedays)

> Updates the boleto due days from a subscription

```
function updateSubscriptionDueDays(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-82)

ParameterTagsDescriptionsubscriptionId`Required`Subscription Idrequest`Required`TODO: Add a parameter descriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-82)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionDueDaysRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getdiscounts)

> TODO: Add a method description

```
function getDiscounts(
        $subscriptionId,
        $page,
        $size)
```

#### Parameters

[](#parameters-83)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idpage`Required`Page numbersize`Required`Page size#### Example Usage

[](#example-usage-83)

```
$subscriptionId = 'subscription_id';
$page = 235;
$size = 235;

$result = $subscriptions->getDiscounts($subscriptionId, $page, $size);
```

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

[](#-createincrement)

> Creates a increment

```
function createIncrement(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-84)

ParameterTagsDescriptionsubscriptionId`Required`Subscription idrequest`Required`Request for creating a incrementidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-84)

```
$subscriptionId = 'subscription_id';
$request = new CreateIncrementRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getsubscriptions)

> Gets all subscriptions

```
function getSubscriptions(
        $page = null,
        $size = null,
        $code = null,
        $billingType = null,
        $customerId = null,
        $planId = null,
        $cardId = null,
        $status = null,
        $nextBillingSince = null,
        $nextBillingUntil = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-85)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page sizecode`Optional`Filter for subscription's codebillingType`Optional`Filter for subscription's billing typecustomerId`Optional`Filter for subscription's customer idplanId`Optional`Filter for subscription's plan idcardId`Optional`Filter for subscription's card idstatus`Optional`Filter for subscription's statusnextBillingSince`Optional`Filter for subscription's next billing date start rangenextBillingUntil`Optional`Filter for subscription's next billing date end rangecreatedSince`Optional`Filter for subscription's creation date start rangecreatedUntil`Optional`Filter for subscriptions creation date end range#### Example Usage

[](#example-usage-85)

```
$page = 235;
$size = 235;
$code = 'code';
$billingType = 'billing_type';
$customerId = 'customer_id';
$planId = 'plan_id';
$cardId = 'card_id';
$status = 'status';
$nextBillingSince = date("D M d, Y G:i");
$nextBillingUntil = date("D M d, Y G:i");
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $subscriptions->getSubscriptions($page, $size, $code, $billingType, $customerId, $planId, $cardId, $status, $nextBillingSince, $nextBillingUntil, $createdSince, $createdUntil);
```

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

[](#-getdiscountbyid)

> TODO: Add a method description

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

#### Parameters

[](#parameters-86)

ParameterTagsDescriptionsubscriptionId`Required`The subscription iddiscountId`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-86)

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

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

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

[](#-getsubscriptionitems)

> Get Subscription Items

```
function getSubscriptionItems(
        $subscriptionId,
        $page = null,
        $size = null,
        $name = null,
        $code = null,
        $status = null,
        $description = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-87)

ParameterTagsDescriptionsubscriptionId`Required`The subscription idpage`Optional`Page numbersize`Optional`Page sizename`Optional`The item namecode`Optional`Identification code in the client systemstatus`Optional`The item statisdescription`Optional`The item descriptioncreatedSince`Optional`Filter for item's creation date start rangecreatedUntil`Optional`Filter for item's creation date end range#### Example Usage

[](#example-usage-87)

```
$subscriptionId = 'subscription_id';
$page = 235;
$size = 235;
$name = 'name';
$code = 'code';
$status = 'status';
$description = 'description';
$createdSince = 'created_since';
$createdUntil = 'created_until';

$result = $subscriptions->getSubscriptionItems($subscriptionId, $page, $size, $name, $code, $status, $description, $createdSince, $createdUntil);
```

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

[](#-updatesubscriptionminiumprice)

> Atualização do valor mínimo da assinatura

```
function updateSubscriptionMiniumPrice(
        $subscriptionId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-88)

ParameterTagsDescriptionsubscriptionId`Required`Subscription Idrequest`Required`Request da requisição com o valor mínimo que será configuradoidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-88)

```
$subscriptionId = 'subscription_id';
$request = new UpdateSubscriptionMinimumPriceRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getusagereport)

> TODO: Add a method description

```
function getUsageReport(
        $subscriptionId,
        $periodId)
```

#### Parameters

[](#parameters-89)

ParameterTagsDescriptionsubscriptionId`Required`The subscription IdperiodId`Required`The period Id#### Example Usage

[](#example-usage-89)

```
$subscriptionId = 'subscription_id';
$periodId = 'period_id';

$result = $subscriptions->getUsageReport($subscriptionId, $periodId);
```

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

[](#-updatesplitsubscription)

> TODO: Add a method description

```
function updateSplitSubscription(
        $id,
        $request)
```

#### Parameters

[](#parameters-90)

ParameterTagsDescriptionid`Required`Subscription's idrequest`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-90)

```
$id = 'id';
$request = new UpdateSubscriptionSplitRequest();

$result = $subscriptions->updateSplitSubscription($id, $request);
```

[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.createInvoice")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createInvoice

[](#-createinvoice)

> Create an Invoice

```
function createInvoice(
        $subscriptionId,
        $cycleId,
        $request = null,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-91)

ParameterTagsDescriptionsubscriptionId`Required`Subscription IdcycleId`Required`Cycle Idrequest`Optional`TODO: Add a parameter descriptionidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-91)

```
$subscriptionId = 'subscription_id';
$cycleId = 'cycle_id';
$request = new CreateInvoiceRequest();
$idempotencyKey = 'idempotency-key';

$result = $invoices->createInvoice($subscriptionId, $cycleId, $request, $idempotencyKey);
```

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

[](#-getpartialinvoice)

> TODO: Add a method description

```
function getPartialInvoice($subscriptionId)
```

#### Parameters

[](#parameters-92)

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

[](#example-usage-92)

```
$subscriptionId = 'subscription_id';

$result = $invoices->getPartialInvoice($subscriptionId);
```

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

[](#-updateinvoicestatus)

> Updates the status from an invoice

```
function updateInvoiceStatus(
        $invoiceId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-93)

ParameterTagsDescriptioninvoiceId`Required`Invoice Idrequest`Required`Request for updating an invoice's statusidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-93)

```
$invoiceId = 'invoice_id';
$request = new UpdateInvoiceStatusRequest();
$idempotencyKey = 'idempotency-key';

$result = $invoices->updateInvoiceStatus($invoiceId, $request, $idempotencyKey);
```

### [![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-94)

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

[](#example-usage-94)

```
$invoiceId = 'invoice_id';

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

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

[](#-updateinvoicemetadata)

> Updates the metadata from an invoice

```
function updateInvoiceMetadata(
        $invoiceId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-95)

ParameterTagsDescriptioninvoiceId`Required`The invoice idrequest`Required`Request for updating the invoice metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-95)

```
$invoiceId = 'invoice_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

$result = $invoices->updateInvoiceMetadata($invoiceId, $request, $idempotencyKey);
```

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

[](#-cancelinvoice)

> Cancels an invoice

```
function cancelInvoice(
        $invoiceId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-96)

ParameterTagsDescriptioninvoiceId`Required`Invoice ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-96)

```
$invoiceId = 'invoice_id';
$idempotencyKey = 'idempotency-key';

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

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

[](#-getinvoices)

> Gets all invoices

```
function getInvoices(
        $page = null,
        $size = null,
        $code = null,
        $customerId = null,
        $subscriptionId = null,
        $createdSince = null,
        $createdUntil = null,
        $status = null,
        $dueSince = null,
        $dueUntil = null,
        $customerDocument = null)
```

#### Parameters

[](#parameters-97)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page sizecode`Optional`Filter for Invoice's codecustomerId`Optional`Filter for Invoice's customer idsubscriptionId`Optional`Filter for Invoice's subscription idcreatedSince`Optional`Filter for Invoice's creation date start rangecreatedUntil`Optional`Filter for Invoices creation date end rangestatus`Optional`Filter for Invoice's statusdueSince`Optional`Filter for Invoice's due date start rangedueUntil`Optional`Filter for Invoice's due date end rangecustomerDocument`Optional`Fillter for invoice's document#### Example Usage

[](#example-usage-97)

```
$page = 235;
$size = 235;
$code = 'code';
$customerId = 'customer_id';
$subscriptionId = 'subscription_id';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");
$status = 'status';
$dueSince = date("D M d, Y G:i");
$dueUntil = date("D M d, Y G:i");
$customerDocument = 'customer_document';

$result = $invoices->getInvoices($page, $size, $code, $customerId, $subscriptionId, $createdSince, $createdUntil, $status, $dueSince, $dueUntil, $customerDocument);
```

[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.updateOrderStatus")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateOrderStatus

[](#-updateorderstatus)

> TODO: Add a method description

```
function updateOrderStatus(
        $id,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-98)

ParameterTagsDescriptionid`Required`Order Idrequest`Required`Update Order ModelidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-98)

```
$id = 'id';
$request = new UpdateOrderStatusRequest();
$idempotencyKey = 'idempotency-key';

$result = $orders->updateOrderStatus($id, $request, $idempotencyKey);
```

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

[](#-deleteallorderitems)

> TODO: Add a method description

```
function deleteAllOrderItems(
        $orderId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-99)

ParameterTagsDescriptionorderId`Required`Order IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-99)

```
$orderId = 'orderId';
$idempotencyKey = 'idempotency-key';

$result = $orders->deleteAllOrderItems($orderId, $idempotencyKey);
```

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

[](#-updateordermetadata)

> Updates the metadata from an order

```
function updateOrderMetadata(
        $orderId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-100)

ParameterTagsDescriptionorderId`Required`The order idrequest`Required`Request for updating the order metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-100)

```
$orderId = 'order_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

$result = $orders->updateOrderMetadata($orderId, $request, $idempotencyKey);
```

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

[](#-getorders)

> Gets all orders

```
function getOrders(
        $page = null,
        $size = null,
        $code = null,
        $status = null,
        $createdSince = null,
        $createdUntil = null,
        $customerId = null)
```

#### Parameters

[](#parameters-101)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page sizecode`Optional`Filter for order's codestatus`Optional`Filter for order's statuscreatedSince`Optional`Filter for order's creation date start rangecreatedUntil`Optional`Filter for order's creation date end rangecustomerId`Optional`Filter for order's customer id#### Example Usage

[](#example-usage-101)

```
$page = 235;
$size = 235;
$code = 'code';
$status = 'status';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");
$customerId = 'customer_id';

$result = $orders->getOrders($page, $size, $code, $status, $createdSince, $createdUntil, $customerId);
```

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

[](#-createorderitem)

> TODO: Add a method description

```
function createOrderItem(
        $orderId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-102)

ParameterTagsDescriptionorderId`Required`Order Idrequest`Required`Order Item ModelidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-102)

```
$orderId = 'orderId';
$request = new CreateOrderItemRequest();
$idempotencyKey = 'idempotency-key';

$result = $orders->createOrderItem($orderId, $request, $idempotencyKey);
```

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

[](#-deleteorderitem)

> TODO: Add a method description

```
function deleteOrderItem(
        $orderId,
        $itemId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-103)

ParameterTagsDescriptionorderId`Required`Order IditemId`Required`Item IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-103)

```
$orderId = 'orderId';
$itemId = 'itemId';
$idempotencyKey = 'idempotency-key';

$result = $orders->deleteOrderItem($orderId, $itemId, $idempotencyKey);
```

### [![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-104)

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

[](#example-usage-104)

```
$orderId = 'order_id';

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

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

[](#-createorder)

> Creates a new Order

```
function createOrder(
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-105)

ParameterTagsDescriptionbody`Required`Request for creating an orderidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-105)

```
$body = new CreateOrderRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getorderitem)

> TODO: Add a method description

```
function getOrderItem(
        $orderId,
        $itemId)
```

#### Parameters

[](#parameters-106)

ParameterTagsDescriptionorderId`Required`Order IditemId`Required`Item Id#### Example Usage

[](#example-usage-106)

```
$orderId = 'orderId';
$itemId = 'itemId';

$result = $orders->getOrderItem($orderId, $itemId);
```

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

[](#-updateorderitem)

> TODO: Add a method description

```
function updateOrderItem(
        $orderId,
        $itemId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-107)

ParameterTagsDescriptionorderId`Required`Order IditemId`Required`Item Idrequest`Required`Item ModelidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-107)

```
$orderId = 'orderId';
$itemId = 'itemId';
$request = new UpdateOrderItemRequest();
$idempotencyKey = 'idempotency-key';

$result = $orders->updateOrderItem($orderId, $itemId, $request, $idempotencyKey);
```

[Back to List of Controllers](#list_of_controllers)

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

[](#-tokenscontroller)

### Get singleton instance

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

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

```
$tokens = $client->getTokens();
```

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

[](#-createtoken)

> *Tags:* `Skips Authentication`

> TODO: Add a method description

```
function createToken(
        $publicKey,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-108)

ParameterTagsDescriptionpublicKey`Required`Public keyrequest`Required`Request for creating a tokenidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-108)

```
$publicKey = 'public_key';
$request = new CreateTokenRequest();
$idempotencyKey = 'idempotency-key';

$result = $tokens->createToken($publicKey, $request, $idempotencyKey);
```

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

[](#-gettoken)

> *Tags:* `Skips Authentication`

> Gets a token from its id

```
function getToken(
        $id,
        $publicKey)
```

#### Parameters

[](#parameters-109)

ParameterTagsDescriptionid`Required`Token idpublicKey`Required`Public key#### Example Usage

[](#example-usage-109)

```
$id = 'id';
$publicKey = 'public_key';

$result = $tokens->getToken($id, $publicKey);
```

[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-7)

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.updatePlanItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updatePlanItem

[](#-updateplanitem)

> Updates a plan item

```
function updatePlanItem(
        $planId,
        $planItemId,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-110)

ParameterTagsDescriptionplanId`Required`Plan idplanItemId`Required`Plan item idbody`Required`Request for updating the plan itemidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-110)

```
$planId = 'plan_id';
$planItemId = 'plan_item_id';
$body = new UpdatePlanItemRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-111)

ParameterTagsDescriptionplanId`Required`Plan idrequest`Required`Request for creating a plan itemidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-111)

```
$planId = 'plan_id';
$request = new CreatePlanItemRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-getplans)

> Gets all plans

```
function getPlans(
        $page = null,
        $size = null,
        $name = null,
        $status = null,
        $billingType = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-112)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page sizename`Optional`Filter for Plan's namestatus`Optional`Filter for Plan's statusbillingType`Optional`Filter for plan's billing typecreatedSince`Optional`Filter for plan's creation date start rangecreatedUntil`Optional`Filter for plan's creation date end range#### Example Usage

[](#example-usage-112)

```
$page = 235;
$size = 235;
$name = 'name';
$status = 'status';
$billingType = 'billing_type';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $plans->getPlans($page, $size, $name, $status, $billingType, $createdSince, $createdUntil);
```

### [![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-113)

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

[](#example-usage-113)

```
$planId = 'plan_id';

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

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

[](#-updateplan)

> Updates a plan

```
function updatePlan(
        $planId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-114)

ParameterTagsDescriptionplanId`Required`Plan idrequest`Required`Request for updating a planidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-114)

```
$planId = 'plan_id';
$request = new UpdatePlanRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-updateplanmetadata)

> Updates the metadata from a plan

```
function updatePlanMetadata(
        $planId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-115)

ParameterTagsDescriptionplanId`Required`The plan idrequest`Required`Request for updating the plan metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-115)

```
$planId = 'plan_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

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

[](#-createplan)

> Creates a new plan

```
function createPlan(
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-116)

ParameterTagsDescriptionbody`Required`Request for creating a planidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-116)

```
$body = new CreatePlanRequest();
$idempotencyKey = 'idempotency-key';

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

### [![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,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-117)

ParameterTagsDescriptionplanId`Required`Plan idplanItemId`Required`Plan item ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-117)

```
$planId = 'plan_id';
$planItemId = 'plan_item_id';
$idempotencyKey = 'idempotency-key';

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

### [![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-118)

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

[](#example-usage-118)

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

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

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

[](#-deleteplan)

> Deletes a plan

```
function deletePlan(
        $planId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-119)

ParameterTagsDescriptionplanId`Required`Plan ididempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-119)

```
$planId = 'plan_id';
$idempotencyKey = 'idempotency-key';

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

[Back to List of Controllers](#list_of_controllers)

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

[](#-transactionscontroller)

### Get singleton instance

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

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

```
$transactions = $client->getTransactions();
```

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

[](#-gettransaction)

> TODO: Add a method description

```
function getTransaction($transactionId)
```

#### Parameters

[](#parameters-120)

ParameterTagsDescriptiontransactionId`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-120)

```
$transactionId = 'transaction_id';

$result = $transactions->getTransaction($transactionId);
```

[Back to List of Controllers](#list_of_controllers)

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

[](#-transferscontroller)

### Get singleton instance

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

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

```
$transfers = $client->getTransfers();
```

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

[](#-createtransfer-1)

> TODO: Add a method description

```
function createTransfer($request)
```

#### Parameters

[](#parameters-121)

ParameterTagsDescriptionrequest`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-121)

```
$request = new CreateTransfer();

$result = $transfers->createTransfer($request);
```

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

[](#-gettransferbyid)

> TODO: Add a method description

```
function getTransferById($transferId)
```

#### Parameters

[](#parameters-122)

ParameterTagsDescriptiontransferId`Required`TODO: Add a parameter description#### Example Usage

[](#example-usage-122)

```
$transferId = 'transfer_id';

$result = $transfers->getTransferById($transferId);
```

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

[](#-gettransfers-1)

> Gets all transfers

```
function getTransfers()
```

#### Example Usage

[](#example-usage-123)

```
$result = $transfers->getTransfers();
```

[Back to List of Controllers](#list_of_controllers)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~40 days

Recently: every ~70 days

Total

41

Last Release

1481d ago

Major Versions

1.0.0 → 2.0.02017-12-07

2.0.1 → 3.0.02017-12-20

3.1.20 → 4.0.02021-06-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/1800e9fadb97704e02ee6fd5fb70bc44282bb7ea77ef5f40df701b8fa38b7698?d=identicon)[ti.signativa](/maintainers/ti.signativa)

---

Top Contributors

[![marcelo-marini](https://avatars.githubusercontent.com/u/27635812?v=4)](https://github.com/marcelo-marini "marcelo-marini (65 commits)")[![LilianaLessa](https://avatars.githubusercontent.com/u/24816655?v=4)](https://github.com/LilianaLessa "LilianaLessa (18 commits)")[![bruno-sales](https://avatars.githubusercontent.com/u/15315522?v=4)](https://github.com/bruno-sales "bruno-sales (7 commits)")[![GustavoFonsecaDeAlmeida](https://avatars.githubusercontent.com/u/34376408?v=4)](https://github.com/GustavoFonsecaDeAlmeida "GustavoFonsecaDeAlmeida (7 commits)")[![vandrade-mundipagg](https://avatars.githubusercontent.com/u/12662388?v=4)](https://github.com/vandrade-mundipagg "vandrade-mundipagg (3 commits)")[![lucasnobredev](https://avatars.githubusercontent.com/u/11798617?v=4)](https://github.com/lucasnobredev "lucasnobredev (3 commits)")[![magnomoreira](https://avatars.githubusercontent.com/u/42675117?v=4)](https://github.com/magnomoreira "magnomoreira (3 commits)")[![luisgrangeiro](https://avatars.githubusercontent.com/u/15247622?v=4)](https://github.com/luisgrangeiro "luisgrangeiro (2 commits)")[![jbravobr](https://avatars.githubusercontent.com/u/6537000?v=4)](https://github.com/jbravobr "jbravobr (2 commits)")[![michelpl](https://avatars.githubusercontent.com/u/6605776?v=4)](https://github.com/michelpl "michelpl (2 commits)")[![matheussignativa](https://avatars.githubusercontent.com/u/107142937?v=4)](https://github.com/matheussignativa "matheussignativa (1 commits)")[![tiagor87](https://avatars.githubusercontent.com/u/1944654?v=4)](https://github.com/tiagor87 "tiagor87 (1 commits)")[![ThiagoBarradas](https://avatars.githubusercontent.com/u/12145276?v=4)](https://github.com/ThiagoBarradas "ThiagoBarradas (1 commits)")[![GusBedasi](https://avatars.githubusercontent.com/u/23214684?v=4)](https://github.com/GusBedasi "GusBedasi (1 commits)")[![JefersonCAugusto](https://avatars.githubusercontent.com/u/50467118?v=4)](https://github.com/JefersonCAugusto "JefersonCAugusto (1 commits)")

---

Tags

apisdkMundiAPI

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

793.4M20](/packages/square-square)[bandwidth/sdk

Bandwidth's set of APIs

16948.8k1](/packages/bandwidth-sdk)

PHPackages © 2026

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