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

AbandonedLibrary[API Development](/categories/api)

mundipagg/mundiapi
==================

Mundipagg API

4.5.3(2y ago)0258.4k↓22.2%[4 issues](https://github.com/mundipagg/MundiAPI-PHP/issues)[1 PRs](https://github.com/mundipagg/MundiAPI-PHP/pulls)3MITPHPPHP &gt;=5.4.0CI passing

Since Nov 9Pushed 2y ago4 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (51)Used By (3)

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.

ParameterDescriptionserviceRefererNameTODO: add a descriptionbasicAuthUserNameThe username to use with basic authenticationbasicAuthPasswordThe password to use with basic authenticationAPI client can be initialized as following.

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

$client = new MundiAPILib\MundiAPIClient($serviceRefererName, $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)
- [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.createDiscount")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createDiscount

[](#-creatediscount)

> Creates a discount

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

#### Parameters

[](#parameters)

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

[](#example-usage)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsDiscountsRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-1)

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

[](#example-usage-1)

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

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

#### Errors

[](#errors-1)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-2)

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

[](#example-usage-2)

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

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

#### Errors

[](#errors-2)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-3)

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

[](#example-usage-3)

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

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

#### Errors

[](#errors-3)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.cancelSubscription")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelSubscription

[](#-cancelsubscription)

> Cancels a subscription

```
function cancelSubscription(
        $subscriptionId,
        $idempotencyKey = null,
        $body = null)
```

#### Parameters

[](#parameters-4)

ParameterTagsDescriptionsubscriptionId`Required`Subscription ididempotencyKey`Optional`TODO: Add a parameter descriptionbody`Optional`Request for cancelling a subscription#### Example Usage

[](#example-usage-4)

```
$subscriptionId = 'subscription_id';
$idempotencyKey = 'idempotency-key';
$body = new SubscriptionsRequest();

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

#### Errors

[](#errors-4)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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);
```

#### Errors

[](#errors-5)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-6)

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

[](#example-usage-6)

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

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

#### Errors

[](#errors-6)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getIncrementById")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getIncrementById

[](#-getincrementbyid)

> GetIncrementById

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

#### Parameters

[](#parameters-7)

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

[](#example-usage-7)

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

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

#### Errors

[](#errors-7)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getSubscriptionCycleById")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSubscriptionCycleById

[](#-getsubscriptioncyclebyid)

> GetSubscriptionCycleById

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

#### Parameters

[](#parameters-8)

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

[](#example-usage-8)

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

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

#### Errors

[](#errors-8)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-9)

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

[](#example-usage-9)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsStartAtRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-9)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-10)

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

[](#example-usage-10)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsPaymentMethodRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-10)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateCurrentCycleStatus")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateCurrentCycleStatus

[](#-updatecurrentcyclestatus)

> UpdateCurrentCycleStatus

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

#### Parameters

[](#parameters-11)

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

[](#example-usage-11)

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

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

#### Errors

[](#errors-11)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-12)

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

[](#example-usage-12)

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

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

#### Errors

[](#errors-12)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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 = 83;
$size = 83;
$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);
```

#### Errors

[](#errors-13)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getUsagesDetails")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getUsagesDetails

[](#-getusagesdetails)

> GetUsagesDetails

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

#### Parameters

[](#parameters-14)

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

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

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

#### Errors

[](#errors-14)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.renewSubscription")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) renewSubscription

[](#-renewsubscription)

> RenewSubscription

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

#### Parameters

[](#parameters-15)

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

[](#example-usage-15)

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

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

#### Errors

[](#errors-15)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getSubscriptionCycles")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getSubscriptionCycles

[](#-getsubscriptioncycles)

> GetSubscriptionCycles

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

#### Parameters

[](#parameters-16)

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

[](#example-usage-16)

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

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

#### Errors

[](#errors-16)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-17)

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

[](#example-usage-17)

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

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

#### Errors

[](#errors-17)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-18)

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

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

#### Errors

[](#errors-18)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-19)

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

[](#example-usage-19)

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

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

#### Errors

[](#errors-19)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getIncrements")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getIncrements

[](#-getincrements)

> GetIncrements

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

#### Parameters

[](#parameters-20)

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

[](#example-usage-20)

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

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

#### Errors

[](#errors-20)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-21)

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

[](#example-usage-21)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsItemsRequest1();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-21)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-22)

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

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

#### Errors

[](#errors-22)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-23)

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

[](#example-usage-23)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsBillingDateRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-23)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateLatestPeriodEndAt")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateLatestPeriodEndAt

[](#-updatelatestperiodendat)

> UpdateLatestPeriodEndAt

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

#### Parameters

[](#parameters-24)

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

[](#example-usage-24)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsPeriodsLatestEndAtRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-24)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateSubscriptionAffiliationId")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSubscriptionAffiliationId

[](#-updatesubscriptionaffiliationid)

> UpdateSubscriptionAffiliationId

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

#### Parameters

[](#parameters-25)

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

[](#example-usage-25)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsGatewayAffiliationIdRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-25)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-26)

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

[](#example-usage-26)

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

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

#### Errors

[](#errors-26)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-27)

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

[](#example-usage-27)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsCardRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-27)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-28)

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

[](#example-usage-28)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-28)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-29)

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

[](#example-usage-29)

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

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

#### Errors

[](#errors-29)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getDiscounts")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getDiscounts

[](#-getdiscounts)

> GetDiscounts

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

#### Parameters

[](#parameters-30)

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

[](#example-usage-30)

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

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

#### Errors

[](#errors-30)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.createIncrement")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createIncrement

[](#-createincrement)

> Creates a increment

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

#### Parameters

[](#parameters-31)

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

[](#example-usage-31)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsIncrementsRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-31)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getDiscountById")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getDiscountById

[](#-getdiscountbyid)

> GetDiscountById

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

#### Parameters

[](#parameters-32)

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

[](#example-usage-32)

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

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

#### Errors

[](#errors-32)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-33)

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

[](#example-usage-33)

```
$subscriptionId = 'subscription_id';
$body = new SubscriptionsMinimumPriceRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-33)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.getUsageReport")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getUsageReport

[](#-getusagereport)

> GetUsageReport

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

#### Parameters

[](#parameters-34)

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

[](#example-usage-34)

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

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

#### Errors

[](#errors-34)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".SubscriptionsController.updateSplitSubscription")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateSplitSubscription

[](#-updatesplitsubscription)

> UpdateSplitSubscription

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

#### Parameters

[](#parameters-35)

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

[](#example-usage-35)

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

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

#### Errors

[](#errors-35)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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.updateOrderStatus")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateOrderStatus

[](#-updateorderstatus)

> UpdateOrderStatus

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

#### Parameters

[](#parameters-36)

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

[](#example-usage-36)

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

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

#### Errors

[](#errors-36)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.deleteAllOrderItems")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteAllOrderItems

[](#-deleteallorderitems)

> DeleteAllOrderItems

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

#### Parameters

[](#parameters-37)

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

[](#example-usage-37)

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

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

#### Errors

[](#errors-37)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.createOrderItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createOrderItem

[](#-createorderitem)

> CreateOrderItem

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

#### Parameters

[](#parameters-38)

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

[](#example-usage-38)

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

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

#### Errors

[](#errors-38)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-39)

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

[](#example-usage-39)

```
$orderId = 'order_id';
$body = new OrdersMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-39)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-40)

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

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

#### Errors

[](#errors-40)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-41)

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

[](#example-usage-41)

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

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

#### Errors

[](#errors-41)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.deleteOrderItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) deleteOrderItem

[](#-deleteorderitem)

> DeleteOrderItem

```
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);
```

#### Errors

[](#errors-42)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.getOrderItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getOrderItem

[](#-getorderitem)

> GetOrderItem

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

#### Parameters

[](#parameters-43)

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

[](#example-usage-43)

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

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

#### Errors

[](#errors-43)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".OrdersController.updateOrderItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateOrderItem

[](#-updateorderitem)

> UpdateOrderItem

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

#### Parameters

[](#parameters-44)

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

[](#example-usage-44)

```
$orderId = 'orderId';
$itemId = 'itemId';
$body = new OrdersItemsRequest1();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-44)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-45)

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

[](#example-usage-45)

```
$orderId = 'order_id';

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

#### Errors

[](#errors-45)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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.updatePlanItem")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updatePlanItem

[](#-updateplanitem)

> Updates a plan item

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

#### Parameters

[](#parameters-46)

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

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

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

#### Errors

[](#errors-46)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-47)

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

[](#example-usage-47)

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

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

#### Errors

[](#errors-47)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-48)

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

[](#example-usage-48)

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

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

#### Errors

[](#errors-48)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-49)

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

[](#example-usage-49)

```
$planId = 'plan_id';
$body = new PlansItemsRequest1();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-49)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-50)

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

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

#### Errors

[](#errors-50)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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 PlansRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-51)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-52)

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

[](#example-usage-52)

```
$planId = 'plan_id';

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

#### Errors

[](#errors-52)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".PlansController.updatePlan")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updatePlan

[](#-updateplan)

> Updates a plan

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

#### Parameters

[](#parameters-53)

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

[](#example-usage-53)

```
$planId = 'plan_id';
$body = new PlansRequest1();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-53)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-54)

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

[](#example-usage-54)

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

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

#### Errors

[](#errors-54)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-55)

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

[](#example-usage-55)

```
$planId = 'plan_id';
$body = new PlansMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-55)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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.createInvoice")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createInvoice

[](#-createinvoice)

> Create an Invoice

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

#### Parameters

[](#parameters-56)

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

[](#example-usage-56)

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

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

#### Errors

[](#errors-56)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".InvoicesController.getPartialInvoice")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getPartialInvoice

[](#-getpartialinvoice)

> GetPartialInvoice

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

#### Parameters

[](#parameters-57)

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

[](#example-usage-57)

```
$subscriptionId = 'subscription_id';

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

#### Errors

[](#errors-57)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-58)

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

[](#example-usage-58)

```
$invoiceId = 'invoice_id';
$body = new UpdateCurrentCycleStatusRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-58)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-59)

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

[](#example-usage-59)

```
$invoiceId = 'invoice_id';

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

#### Errors

[](#errors-59)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-60)

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

[](#example-usage-60)

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

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

#### Errors

[](#errors-60)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-61)

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

[](#example-usage-61)

```
$invoiceId = 'invoice_id';
$body = new InvoicesMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-61)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".InvoicesController.getInvoices")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getInvoices

[](#-getinvoices)

> Gets all invoices

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

#### Parameters

[](#parameters-62)

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

[](#example-usage-62)

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

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

#### Errors

[](#errors-62)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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.createAccessToken")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createAccessToken

[](#-createaccesstoken)

> Creates a access token for a customer

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

#### Parameters

[](#parameters-63)

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

[](#example-usage-63)

```
$customerId = 'customer_id';
$body = new CustomersAccessTokensRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-63)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-64)

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

[](#example-usage-64)

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

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

#### Errors

[](#errors-64)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.updateCustomer")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateCustomer

[](#-updatecustomer)

> Updates a customer

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

#### Parameters

[](#parameters-65)

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

[](#example-usage-65)

```
$customerId = 'customer_id';
$body = new CustomersRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-65)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-66)

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

[](#example-usage-66)

```
$customerId = 'customer_id';

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

#### Errors

[](#errors-66)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-67)

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

[](#example-usage-67)

```
$customerId = 'customer_id';

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

#### Errors

[](#errors-67)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-68)

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

[](#example-usage-68)

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

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

#### Errors

[](#errors-68)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-69)

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

[](#example-usage-69)

```
$customerId = 'customer_id';
$body = new CustomersAddressesRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-69)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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);
```

#### Errors

[](#errors-70)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-71)

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

[](#example-usage-71)

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

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

#### Errors

[](#errors-71)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-72)

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

[](#example-usage-72)

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

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

#### Errors

[](#errors-72)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.updateAddress")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateAddress

[](#-updateaddress)

> Updates an address

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

#### Parameters

[](#parameters-73)

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

[](#example-usage-73)

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

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

#### Errors

[](#errors-73)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-74)

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

[](#example-usage-74)

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

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

#### Errors

[](#errors-74)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-75)

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

[](#example-usage-75)

```
$customerId = 'customer_id';
$body = new CustomersCardsRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-75)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-76)

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

[](#example-usage-76)

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

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

#### Errors

[](#errors-76)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-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->renewCard($customerId, $cardId, $idempotencyKey);
```

#### Errors

[](#errors-77)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.createCustomer")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createCustomer

[](#-createcustomer)

> Creates a new customer

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

#### Parameters

[](#parameters-78)

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

[](#example-usage-78)

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

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

#### Errors

[](#errors-78)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-79)

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

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

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

#### Errors

[](#errors-79)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-80)

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

[](#example-usage-80)

```
$customerId = 'customer_id';
$body = new CustomersMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-80)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".CustomersController.updateCard")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateCard

[](#-updatecard)

> Updates a card

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

#### Parameters

[](#parameters-81)

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

[](#example-usage-81)

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

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

#### Errors

[](#errors-81)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-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->deleteCard($customerId, $cardId, $idempotencyKey);
```

#### Errors

[](#errors-82)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-83)

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

[](#example-usage-83)

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

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

#### Errors

[](#errors-83)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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.getCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getCharge

[](#-getcharge)

> Get a charge from its id

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

#### Parameters

[](#parameters-84)

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

[](#example-usage-84)

```
$chargeId = 'charge_id';

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

#### Errors

[](#errors-84)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.cancelCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cancelCharge

[](#-cancelcharge)

> Cancel a charge

```
function cancelCharge(
        $chargeId,
        $idempotencyKey = null,
        $body = null)
```

#### Parameters

[](#parameters-85)

ParameterTagsDescriptionchargeId`Required`Charge ididempotencyKey`Optional`TODO: Add a parameter descriptionbody`Optional`Request for cancelling a charge#### Example Usage

[](#example-usage-85)

```
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';
$body = new ChargesRequest();

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

#### Errors

[](#errors-85)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.confirmPayment")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) confirmPayment

[](#-confirmpayment)

> ConfirmPayment

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

#### Parameters

[](#parameters-86)

ParameterTagsDescriptionchargeId`Required`TODO: Add a parameter descriptionidempotencyKey`Optional`TODO: Add a parameter descriptionbody`Optional`Request for confirm payment#### Example Usage

[](#example-usage-86)

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

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

#### Errors

[](#errors-86)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-87)

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

[](#example-usage-87)

```
$chargeId = 'charge_id';
$body = new ChargesCardRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-87)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-88)

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

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

#### Errors

[](#errors-88)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-89)

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

[](#example-usage-89)

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

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

#### Errors

[](#errors-89)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-90)

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

[](#example-usage-90)

```
$chargeId = 'charge_id';
$body = new ChargesPaymentMethodRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-90)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-91)

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

[](#example-usage-91)

```
$chargeId = 'charge_id';
$body = new ChargesMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-91)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.captureCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) captureCharge

[](#-capturecharge)

> Captures a charge

```
function captureCharge(
        $chargeId,
        $idempotencyKey = null,
        $body = null)
```

#### Parameters

[](#parameters-92)

ParameterTagsDescriptionchargeId`Required`Charge ididempotencyKey`Optional`TODO: Add a parameter descriptionbody`Optional`Request for capturing a charge#### Example Usage

[](#example-usage-92)

```
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';
$body = new ChargesCaptureRequest();

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

#### Errors

[](#errors-92)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-93)

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

[](#example-usage-93)

```
$chargeId = 'charge_id';
$body = new ChargesDueDateRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-93)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.createCharge")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createCharge

[](#-createcharge)

> Creates a new charge

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

#### Parameters

[](#parameters-94)

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

[](#example-usage-94)

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

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

#### Errors

[](#errors-94)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.getChargeTransactions")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getChargeTransactions

[](#-getchargetransactions)

> GetChargeTransactions

```
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 = 61;
$size = 61;

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

#### Errors

[](#errors-95)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".ChargesController.getChargesSummary")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getChargesSummary

[](#-getchargessummary)

> GetChargesSummary

```
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);
```

#### Errors

[](#errors-96)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-97)

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

[](#example-usage-97)

```
$recipientId = 'recipient_id';
$body = new RecipientsMetadataRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-97)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.updateRecipientTransferSettings")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateRecipientTransferSettings

[](#-updaterecipienttransfersettings)

> UpdateRecipientTransferSettings

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

#### Parameters

[](#parameters-98)

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

[](#example-usage-98)

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

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

#### Errors

[](#errors-98)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-99)

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

[](#example-usage-99)

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

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

#### Errors

[](#errors-99)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-100)

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

[](#example-usage-100)

```
$page = 61;
$size = 61;

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

#### Errors

[](#errors-100)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.createRecipient")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createRecipient

[](#-createrecipient)

> Creates a new recipient

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

#### Parameters

[](#parameters-101)

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

[](#example-usage-101)

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

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

#### Errors

[](#errors-101)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-102)

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

[](#example-usage-102)

```
$recipientId = 'recipient_id';

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

#### Errors

[](#errors-102)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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 = 153;
$size = 153;
$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);
```

#### Errors

[](#errors-103)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.createAnticipation")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createAnticipation

[](#-createanticipation)

> Creates an anticipation

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

#### Parameters

[](#parameters-104)

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

[](#example-usage-104)

```
$recipientId = 'recipient_id';
$body = new RecipientsAnticipationsRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-104)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-105)

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

[](#example-usage-105)

```
$recipientId = 'recipient_id';
$body = new RecipientsDefaultBankAccountRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-105)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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);
```

#### Errors

[](#errors-106)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.updateRecipient")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateRecipient

[](#-updaterecipient)

> Updates a recipient

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

#### Parameters

[](#parameters-107)

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

[](#example-usage-107)

```
$recipientId = 'recipient_id';
$body = new RecipientsRequest1();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-107)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-108)

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

[](#example-usage-108)

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

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

#### Errors

[](#errors-108)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-109)

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

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

#### Errors

[](#errors-109)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $body,
        $idempotencyKey = null)
```

#### Parameters

[](#parameters-110)

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

[](#example-usage-110)

```
$recipientId = 'recipient_id';
$body = new RecipientsTransfersRequest();
$idempotencyKey = 'idempotency-key';

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

#### Errors

[](#errors-110)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-111)

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

[](#example-usage-111)

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

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

#### Errors

[](#errors-111)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.createWithdraw")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createWithdraw

[](#-createwithdraw)

> CreateWithdraw

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

#### Parameters

[](#parameters-112)

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

[](#example-usage-112)

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

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

#### Errors

[](#errors-112)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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-113)

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

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

#### Errors

[](#errors-113)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.getWithdrawById")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getWithdrawById

[](#-getwithdrawbyid)

> GetWithdrawById

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

#### Parameters

[](#parameters-114)

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

[](#example-usage-114)

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

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

#### Errors

[](#errors-114)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.updateAutomaticAnticipationSettings")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) updateAutomaticAnticipationSettings

[](#-updateautomaticanticipationsettings)

> Updates recipient metadata

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

#### Parameters

[](#parameters-115)

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

[](#example-usage-115)

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

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

#### Errors

[](#errors-115)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".RecipientsController.getRecipientByCode")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getRecipientByCode

[](#-getrecipientbycode)

> Retrieves recipient information

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

#### Parameters

[](#parameters-116)

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

[](#example-usage-116)

```
$code = 'code';

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

#### Errors

[](#errors-116)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[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.createToken")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) createToken

[](#-createtoken)

> *Tags:* `Skips Authentication`

> CreateToken

```
function createToken(
        $publicKey,
        $body,
        $idempotencyKey = null,
        $appId = null)
```

#### Parameters

[](#parameters-117)

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

[](#example-usage-117)

```
$publicKey = 'public_key';
$body = new TokensRequest();
$idempotencyKey = 'idempotency-key';
$appId = 'appId';

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

#### Errors

[](#errors-117)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![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,
        $appId = null)
```

#### Parameters

[](#parameters-118)

ParameterTagsDescriptionid`Required`Token idpublicKey`Required`Public keyappId`Optional`TODO: Add a parameter description#### Example Usage

[](#example-usage-118)

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

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

#### Errors

[](#errors-118)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[Back to List of Controllers](#list_of_controllers)

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

[](#-transactionscontroller)

### Get singleton instance

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

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

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

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

[](#-gettransaction)

> GetTransaction

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

#### Parameters

[](#parameters-119)

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

[](#example-usage-119)

```
$transactionId = 'transaction_id';

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

#### Errors

[](#errors-119)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[Back to List of Controllers](#list_of_controllers)

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

[](#-transferscontroller)

### Get singleton instance

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

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

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

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

[](#-postcreatetransfer)

> CreateTransfer

```
function postCreateTransfer($body)
```

#### Parameters

[](#parameters-120)

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

[](#example-usage-120)

```
$body = new CreateTransfer();

$result = $transfers->postCreateTransfer($body);
```

#### Errors

[](#errors-120)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".TransfersController.getTransferById")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getTransferById

[](#-gettransferbyid)

> GetTransferById

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

#### Parameters

[](#parameters-121)

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

[](#example-usage-121)

```
$transferId = 'transfer_id';

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

#### Errors

[](#errors-121)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".TransfersController.getTransfers1")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getTransfers1

[](#-gettransfers1)

> Gets all transfers

```
function getTransfers1()
```

#### Example Usage

[](#example-usage-122)

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

#### Errors

[](#errors-122)

Error CodeError Description400Invalid request401Invalid API key404An informed resource was not found412Business validation error422Contract validation error500Internal server error[Back to List of Controllers](#list_of_controllers)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 53.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Recently: every ~23 days

Total

48

Last Release

1064d ago

Major Versions

1.0.0 → 2.0.02017-12-07

2.0.1 → 3.0.02017-12-20

3.1.20 → 4.0.02021-06-10

3.2.0 → 4.4.02022-11-18

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

3.2.0.x-devPHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

apisdkMundiAPI

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/mundipagg-mundiapi/health.svg)](https://phpackages.com/packages/mundipagg-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)
