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

ActiveLibrary[API Development](/categories/api)

liveecommerce/mundiapi
======================

Mundipagg API

3.1.0(4y ago)04MITPHPPHP &gt;=5.4.0

Since Sep 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/liveecommerce/mundiapi)[ Packagist](https://packagist.org/packages/liveecommerce/mundiapi)[ Docs](https://apimatic.io)[ RSS](/packages/liveecommerce-mundiapi/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

FORK DA MUNDIPAGG API, POIS O ESTAGIÁRIO DEIXOU PRIVADO O REPOSITÓRIO DA EMPRESA
================================================================================

[](#fork-da-mundipagg-api-pois-o-estagiário-deixou-privado-o-repositório-da-empresa)

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)

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

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

[](#-subscriptionscontroller)

### Get singleton instance

[](#get-singleton-instance)

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

[](#-getincrementbyid)

> TODO: Add a method description

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

#### Parameters

[](#parameters)

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

[](#example-usage)

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

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

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

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

[](#example-usage-1)

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

$result = $subscriptions->updateSubscriptionStartAt($subscriptionId, $request, $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-2)

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

[](#example-usage-2)

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

$result = $subscriptions->updateSubscriptionCard($subscriptionId, $request, $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-3)

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

[](#example-usage-3)

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

[](#-createusage)

> Creates a usage

```
function createUsage(
        $subscriptionId,
        $itemId,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-4)

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

[](#example-usage-4)

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

[](#-getsubscription)

> Gets a subscription

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

#### Parameters

[](#parameters-5)

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

[](#example-usage-5)

```
$subscriptionId = 'subscription_id';

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

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

[](#-updatesubscriptionpaymentmethod)

> Updates the payment method from a subscription

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

#### Parameters

[](#parameters-6)

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

[](#example-usage-6)

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

$result = $subscriptions->updateSubscriptionPaymentMethod($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-7)

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

[](#example-usage-7)

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

$result = $subscriptions->createSubscription($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-8)

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

[](#example-usage-8)

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

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

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

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

[](#example-usage-9)

```
$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-10)

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

[](#example-usage-10)

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

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

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

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

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

$result = $subscriptions->updateSubscriptionAffiliationId($subscriptionId, $request, $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-12)

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

[](#example-usage-12)

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

$result = $subscriptions->createAnUsage($subscriptionId, $itemId, $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-13)

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

```
$page = 202;
$size = 202;
$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.updateSubscriptionMetadata")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSubscriptionMetadata

[](#-updatesubscriptionmetadata)

> Updates the metadata from a subscription

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

#### Parameters

[](#parameters-14)

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

[](#example-usage-14)

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

$result = $subscriptions->updateSubscriptionMetadata($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-15)

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

[](#example-usage-15)

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

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

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

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

[](#example-usage-16)

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

[](#-deletediscount)

> Deletes a discount

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

#### Parameters

[](#parameters-17)

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

[](#example-usage-17)

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

$result = $subscriptions->deleteDiscount($subscriptionId, $discountId, $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-18)

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

[](#example-usage-18)

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

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

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

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

[](#example-usage-19)

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

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

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

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

[](#example-usage-20)

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

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

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

[](#example-usage-21)

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

$result = $subscriptions->createIncrement($subscriptionId, $request, $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-22)

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

[](#example-usage-22)

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

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

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

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

[](#example-usage-23)

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

$result = $subscriptions->deleteIncrement($subscriptionId, $incrementId, $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-24)

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

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

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

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

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

```
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$page = 202;
$size = 202;
$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.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-26)

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

```
$subscriptionId = 'subscription_id';
$page = 202;
$size = 202;
$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.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-27)

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

[](#example-usage-27)

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

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

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

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

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

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

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

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

[](#example-usage-29)

```
$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-30)

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

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

$result = $subscriptions->updateLatestPeriodEndAt($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-31)

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

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

$subscriptions->updateCurrentCycleStatus($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-32)

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

[](#example-usage-32)

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

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

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

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

[](#example-usage-33)

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

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

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

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

[](#example-usage-34)

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

$result = $subscriptions->renewSubscription($subscriptionId, $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-35)

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

[](#example-usage-35)

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

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

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

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

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

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

[](#-getorder)

> Gets an order

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

#### Parameters

[](#parameters-36)

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

[](#example-usage-36)

```
$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-37)

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

[](#example-usage-37)

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

$result = $orders->createOrder($body, $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-38)

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

```
$page = 202;
$size = 202;
$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.updateOrderMetadata")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateOrderMetadata

[](#-updateordermetadata)

> Updates the metadata from an order

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

#### Parameters

[](#parameters-39)

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

[](#example-usage-39)

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

$result = $orders->updateOrderMetadata($orderId, $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-40)

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

[](#example-usage-40)

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

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

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

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

[](#example-usage-41)

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

$result = $orders->updateOrderItem($orderId, $itemId, $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-42)

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

[](#example-usage-42)

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

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

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

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

[](#example-usage-43)

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

$result = $orders->createOrderItem($orderId, $request, $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-44)

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

[](#example-usage-44)

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

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

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

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

[](#example-usage-45)

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

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

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

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

[](#-createplanitem)

> Adds a new item to a plan

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

#### Parameters

[](#parameters-46)

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

[](#example-usage-46)

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

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

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

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

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

[](#-getplan)

> Gets a plan

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

#### Parameters

[](#parameters-48)

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

[](#example-usage-48)

```
$planId = 'plan_id';

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

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

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

[](#example-usage-49)

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

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

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

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

[](#example-usage-50)

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

$result = $plans->updatePlan($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-51)

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

[](#example-usage-51)

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

$result = $plans->createPlan($body, $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-52)

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

```
$page = 202;
$size = 202;
$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.updatePlanMetadata")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updatePlanMetadata

[](#-updateplanmetadata)

> Updates the metadata from a plan

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

#### Parameters

[](#parameters-53)

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

[](#example-usage-53)

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

$result = $plans->updatePlanMetadata($planId, $request, $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-54)

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

[](#example-usage-54)

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

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

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

[](#-deleteplanitem)

> Removes an item from a plan

```
function deletePlanItem(
        $planId,
        $planItemId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-55)

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

[](#example-usage-55)

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

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

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

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

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

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

[](#-cancelinvoice)

> Cancels an invoice

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

#### Parameters

[](#parameters-56)

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

[](#example-usage-56)

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

$result = $invoices->cancelInvoice($invoiceId, $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-57)

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

[](#example-usage-57)

```
$invoiceId = 'invoice_id';

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

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

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

[](#example-usage-58)

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

[](#-updateinvoicestatus)

> Updates the status from an invoice

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

#### Parameters

[](#parameters-59)

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

[](#example-usage-59)

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

$result = $invoices->updateInvoiceStatus($invoiceId, $request, $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)
```

#### Parameters

[](#parameters-60)

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 range#### Example Usage

[](#example-usage-60)

```
$page = 39;
$size = 39;
$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");

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

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

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

[](#example-usage-61)

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

$result = $invoices->updateInvoiceMetadata($invoiceId, $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-62)

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

[](#example-usage-62)

```
$subscriptionId = 'subscription_id';

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

[Back to List of Controllers](#list_of_controllers)

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

[](#-customerscontroller)

### Get singleton instance

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

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

[](#-updatecard)

> Updates a card

```
function updateCard(
        $customerId,
        $cardId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-63)

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

[](#example-usage-63)

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

[](#-updateaddress)

> Updates an address

```
function updateAddress(
        $customerId,
        $addressId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-64)

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

[](#example-usage-64)

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

[](#-getcustomer)

> Get a customer

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

#### Parameters

[](#parameters-65)

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

[](#example-usage-65)

```
$customerId = 'customer_id';

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

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

[](#-getaccesstokens)

> Get all access tokens from a customer

```
function getAccessTokens(
        $customerId,
        $page = null,
        $size = null)
```

#### Parameters

[](#parameters-66)

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

[](#example-usage-66)

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

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

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

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

[](#example-usage-67)

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

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

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

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

[](#example-usage-68)

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

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

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

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

[](#example-usage-69)

```
$customerId = 'customer_id';

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

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

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

[](#example-usage-70)

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

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

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

[](#-createaccesstoken)

> Creates a access token for a customer

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

#### Parameters

[](#parameters-71)

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

[](#example-usage-71)

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

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

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

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

[](#example-usage-72)

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

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

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

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

[](#example-usage-73)

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

$result = $customers->updateCustomerMetadata($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-74)

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

[](#example-usage-74)

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

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

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

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

[](#example-usage-75)

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

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

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

[](#-deleteaddress)

> Delete a Customer's address

```
function deleteAddress(
        $customerId,
        $addressId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-76)

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

[](#example-usage-76)

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

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

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

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

[](#example-usage-77)

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

$result = $customers->deleteCard($customerId, $cardId, $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-78)

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

[](#example-usage-78)

```
$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-79)

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

[](#example-usage-79)

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

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

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

[](#-createcard)

> Creates a new card for a customer

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

#### Parameters

[](#parameters-80)

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

[](#example-usage-80)

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

$result = $customers->createCard($customerId, $request, $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-81)

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

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

[](#-renewcard)

> Renew a card

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

#### Parameters

[](#parameters-82)

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

[](#example-usage-82)

```
$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-83)

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

[](#example-usage-83)

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

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

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

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

[](#-updatechargecard)

> Updates the card from a charge

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

#### Parameters

[](#parameters-84)

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

[](#example-usage-84)

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

$result = $charges->updateChargeCard($chargeId, $request, $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-85)

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

[](#example-usage-85)

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

$result = $charges->updateChargePaymentMethod($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-86)

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

[](#example-usage-86)

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

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

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

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

[](#example-usage-87)

```
$chargeId = 'charge_id';

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

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

[](#-retrycharge)

> Retries a charge

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

#### Parameters

[](#parameters-88)

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

[](#example-usage-88)

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

$result = $charges->retryCharge($chargeId, $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-89)

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

```
$page = 39;
$size = 39;
$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.updateChargeMetadata")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateChargeMetadata

[](#-updatechargemetadata)

> Updates the metadata from a charge

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

#### Parameters

[](#parameters-90)

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

[](#example-usage-90)

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

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

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

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

[](#example-usage-91)

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

$result = $charges->cancelCharge($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-92)

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

[](#example-usage-92)

```
$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-93)

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

[](#example-usage-93)

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

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

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

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

[](#example-usage-94)

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

$result = $charges->confirmPayment($chargeId, $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-95)

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

[](#example-usage-95)

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

$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-96)

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

[](#example-usage-96)

```
$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-6)

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

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

[](#example-usage-97)

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

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

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

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

[](#example-usage-98)

```
$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-99)

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

```
$recipientId = 'recipient_id';
$page = 39;
$size = 39;
$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.createAnticipation")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createAnticipation

[](#-createanticipation)

> Creates an anticipation

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

#### Parameters

[](#parameters-100)

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

[](#example-usage-100)

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

$result = $recipients->createAnticipation($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-101)

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

[](#example-usage-101)

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

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

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

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

[](#example-usage-102)

```
$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.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-103)

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

```
$recipientId = 'recipient_id';
$page = 39;
$size = 39;
$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.updateRecipient")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateRecipient

[](#-updaterecipient)

> Updates a recipient

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

#### Parameters

[](#parameters-104)

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

[](#example-usage-104)

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

$result = $recipients->updateRecipient($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-105)

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

[](#example-usage-105)

```
$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-106)

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

[](#example-usage-106)

```
$recipientId = 'recipient_id';

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

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

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

[](#example-usage-107)

```
$page = 130;
$size = 130;

$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-108)

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

[](#example-usage-108)

```
$recipientId = 'recipient_id';

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

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

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

[](#example-usage-109)

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

$result = $recipients->createTransfer($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-110)

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

[](#example-usage-110)

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

$result = $recipients->createRecipient($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-111)

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

[](#example-usage-111)

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

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

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

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

[](#example-usage-112)

```
$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-113)

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

[](#example-usage-113)

```
$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-114)

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

```
$recipientId = 'recipient_id';
$page = 130;
$size = 130;
$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-115)

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

[](#example-usage-115)

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

$result = $recipients->updateAutomaticAnticipationSettings($recipientId, $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-7)

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

[](#-gettoken)

> *Tags:* `Skips Authentication`

> Gets a token from its id

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

#### Parameters

[](#parameters-116)

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

[](#example-usage-116)

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

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

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

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

[](#example-usage-117)

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

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

[Back to List of Controllers](#list_of_controllers)

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

[](#-sellerscontroller)

### Get singleton instance

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

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

```
$sellers = $client->getSellers();
```

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

[](#-getsellerbyid)

> TODO: Add a method description

```
function getSellerById($id)
```

#### Parameters

[](#parameters-118)

ParameterTagsDescriptionid`Required`Seller Id#### Example Usage

[](#example-usage-118)

```
$id = 'id';

$result = $sellers->getSellerById($id);
```

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

[](#-deleteseller)

> TODO: Add a method description

```
function deleteSeller(
        $sellerId,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-119)

ParameterTagsDescriptionsellerId`Required`Seller IdidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-119)

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

$result = $sellers->deleteSeller($sellerId, $idempotencyKey);
```

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

[](#-createseller)

> TODO: Add a method description

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

#### Parameters

[](#parameters-120)

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

[](#example-usage-120)

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

$result = $sellers->createSeller($request, $idempotencyKey);
```

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

[](#-getsellers)

> TODO: Add a method description

```
function getSellers(
        $page = null,
        $size = null,
        $name = null,
        $document = null,
        $code = null,
        $status = null,
        $type = null,
        $createdSince = null,
        $createdUntil = null)
```

#### Parameters

[](#parameters-121)

ParameterTagsDescriptionpage`Optional`Page numbersize`Optional`Page sizename`Optional`TODO: Add a parameter descriptiondocument`Optional`TODO: Add a parameter descriptioncode`Optional`TODO: Add a parameter descriptionstatus`Optional`TODO: Add a parameter descriptiontype`Optional`TODO: Add a parameter descriptioncreatedSince`Optional`TODO: Add a parameter descriptioncreatedUntil`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-121)

```
$page = 130;
$size = 130;
$name = 'name';
$document = 'document';
$code = 'code';
$status = 'status';
$type = 'type';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");

$result = $sellers->getSellers($page, $size, $name, $document, $code, $status, $type, $createdSince, $createdUntil);
```

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

[](#-updateseller)

> TODO: Add a method description

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

#### Parameters

[](#parameters-122)

ParameterTagsDescriptionid`Required`TODO: Add a parameter descriptionrequest`Required`Update Seller modelidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-122)

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

$result = $sellers->updateSeller($id, $request, $idempotencyKey);
```

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

[](#-updatesellermetadata)

> TODO: Add a method description

```
function updateSellerMetadata(
        $sellerId,
        $request,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-123)

ParameterTagsDescriptionsellerId`Required`Seller Idrequest`Required`Request for updating the charge metadataidempotencyKey`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-123)

```
$sellerId = 'seller_id';
$request = new UpdateMetadataRequest();
$idempotencyKey = 'idempotency-key';

$result = $sellers->updateSellerMetadata($sellerId, $request, $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-9)

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

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

[](#example-usage-124)

```
$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-10)

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

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

[](#example-usage-125)

```
$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-126)

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

[](#example-usage-126)

```
$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-127)

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

[Back to List of Controllers](#list_of_controllers)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1717d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d9f529a8742282fdaa98c35e8ef65394e69d2c6471ae27c1a6706b0a133a862?d=identicon)[felipeantoniolli](/maintainers/felipeantoniolli)

![](https://www.gravatar.com/avatar/cc1f8c98f6086d4ad38be6ab2e155912a966760dd877e2f7fa3bce9caa9f9bc6?d=identicon)[feijao](/maintainers/feijao)

---

Top Contributors

[![felipeantoniolli](https://avatars.githubusercontent.com/u/40534681?v=4)](https://github.com/felipeantoniolli "felipeantoniolli (1 commits)")

---

Tags

apisdkMundiAPI

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[square/square

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

793.4M21](/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)
