Getting started
Mundipagg API, (*1)
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 https://getcomposer.org/download/ 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., (*2)
- 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.
, (*3)
[For Windows Users Only] Configuring CURL Certificate Path in php.ini
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:, (*4)
- Download the certificate bundle (.pem file) from https://curl.haxx.se/docs/caextract.html on to your system.
- 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
The following section explains how to use the MundiAPI library in a new project., (*5)
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., (*6)
, (*7)
Click on Open
in PhpStorm to browse to your generated SDK directory and then click OK
., (*8)
, (*9)
2. Add a new Test Project
Create a new directory by right clicking on the solution name as shown below:, (*10)
, (*11)
Name the directory as "test", (*12)
, (*13)
Add a PHP file to this project, (*14)
, (*15)
Name it "testSDK", (*16)
, (*17)
Depending on your project setup, you might need to include composer's autoloader in your PHP code to enable auto loading of classes., (*18)
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., (*19)
, (*20)
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., (*21)
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., (*22)
Open Settings
from File
menu., (*23)
, (*24)
Select PHP
from within Languages & Frameworks
, (*25)
, (*26)
Browse for Interpreters near the Interpreter
option and choose your interpreter., (*27)
, (*28)
Once the interpreter is selected, click OK
, (*29)
, (*30)
To run your project, right click on your PHP file inside your Test project and click on Run
, (*31)
, (*32)
How to Test
Unit tests in this SDK can be run using PHPUnit., (*33)
- First install the dependencies using composer including the
require-dev
dependencies.
- 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., (*34)
Initialization
Authentication
In order to setup authentication and initialization of the API client, you need the following information., (*35)
Parameter |
Description |
serviceRefererName |
TODO: add a description |
basicAuthUserName |
The username to use with basic authentication |
basicAuthPassword |
The password to use with basic authentication |
API client can be initialized as following., (*36)
$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
List of Controllers
SubscriptionsController
Get singleton instance
The singleton instance of the SubscriptionsController
class can be accessed from the API Client., (*37)
$subscriptions = $client->getSubscriptions();
createDiscount
Creates a discount, (*38)
function createDiscount(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
body |
Required |
Request for creating a discount |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsDiscountsRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->createDiscount($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getSubscriptionItem
Get Subscription Item, (*39)
function getSubscriptionItem(
$subscriptionId,
$itemId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
itemId |
Required |
Item id |
Example Usage
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$result = $subscriptions->getSubscriptionItem($subscriptionId, $itemId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionItem
Updates a subscription item, (*40)
function updateSubscriptionItem(
$subscriptionId,
$itemId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
itemId |
Required |
Item id |
body |
Required |
Request for updating a subscription item |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$body = new SubscriptionsItemsRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionItem($subscriptionId, $itemId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteUsage
Deletes a usage, (*41)
function deleteUsage(
$subscriptionId,
$itemId,
$usageId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
itemId |
Required |
The subscription item id |
usageId |
Required |
The usage id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$usageId = 'usage_id';
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->deleteUsage($subscriptionId, $itemId, $usageId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
cancelSubscription
Cancels a subscription, (*42)
function cancelSubscription(
$subscriptionId,
$idempotencyKey = null,
$body = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
body |
Optional |
Request for cancelling a subscription |
Example Usage
$subscriptionId = 'subscription_id';
$idempotencyKey = 'idempotency-key';
$body = new SubscriptionsRequest();
$result = $subscriptions->cancelSubscription($subscriptionId, $idempotencyKey, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getSubscription
Gets a subscription, (*43)
function getSubscription($subscriptionId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
Example Usage
$subscriptionId = 'subscription_id';
$result = $subscriptions->getSubscription($subscriptionId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteIncrement
Deletes a increment, (*44)
function deleteIncrement(
$subscriptionId,
$incrementId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
incrementId |
Required |
Increment id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$incrementId = 'increment_id';
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->deleteIncrement($subscriptionId, $incrementId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getIncrementById
GetIncrementById, (*45)
function getIncrementById(
$subscriptionId,
$incrementId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription Id |
incrementId |
Required |
The increment Id |
Example Usage
$subscriptionId = 'subscription_id';
$incrementId = 'increment_id';
$result = $subscriptions->getIncrementById($subscriptionId, $incrementId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getSubscriptionCycleById
GetSubscriptionCycleById, (*46)
function getSubscriptionCycleById(
$subscriptionId,
$cycleId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
cycleId |
Required |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$cycleId = 'cycleId';
$result = $subscriptions->getSubscriptionCycleById($subscriptionId, $cycleId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionStartAt
Updates the start at date from a subscription, (*47)
function updateSubscriptionStartAt(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
body |
Required |
Request for updating the subscription start date |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsStartAtRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionStartAt($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionPaymentMethod
Updates the payment method from a subscription, (*48)
function updateSubscriptionPaymentMethod(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
body |
Required |
Request for updating the paymentmethod from a subscription |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsPaymentMethodRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionPaymentMethod($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateCurrentCycleStatus
UpdateCurrentCycleStatus, (*49)
function updateCurrentCycleStatus(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
body |
Required |
Request for updating the end date of the subscription current status |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new UpdateCurrentCycleStatusRequest();
$idempotencyKey = 'idempotency-key';
$subscriptions->updateCurrentCycleStatus($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createSubscription
Creates a new subscription, (*50)
function createSubscription(
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
body |
Required |
Request for creating a subscription |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$body = new SubscriptionsRequest1();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->createSubscription($body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getSubscriptions
Gets all subscriptions, (*51)
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
Parameter |
Tags |
Description |
page |
Optional |
Page number |
size |
Optional |
Page size |
code |
Optional |
Filter for subscription's code |
billingType |
Optional |
Filter for subscription's billing type |
customerId |
Optional |
Filter for subscription's customer id |
planId |
Optional |
Filter for subscription's plan id |
cardId |
Optional |
Filter for subscription's card id |
status |
Optional |
Filter for subscription's status |
nextBillingSince |
Optional |
Filter for subscription's next billing date start range |
nextBillingUntil |
Optional |
Filter for subscription's next billing date end range |
createdSince |
Optional |
Filter for subscription's creation date start range |
createdUntil |
Optional |
Filter for subscriptions creation date end range |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getUsagesDetails
GetUsagesDetails, (*52)
function getUsagesDetails(
$subscriptionId,
$cycleId = null,
$size = null,
$page = null,
$itemId = null,
$group = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Identifier |
cycleId |
Optional |
Cycle id |
size |
Optional |
Page size |
page |
Optional |
Page number |
itemId |
Optional |
Identificador do item |
group |
Optional |
identificador da loja (account) de cada item |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
renewSubscription
RenewSubscription, (*53)
function renewSubscription(
$subscriptionId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
TODO: Add a parameter description |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->renewSubscription($subscriptionId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getSubscriptionCycles
GetSubscriptionCycles, (*54)
function getSubscriptionCycles(
$subscriptionId,
$page,
$size)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
page |
Required |
Page number |
size |
Required |
Page size |
Example Usage
$subscriptionId = 'subscription_id';
$page = 'page';
$size = 'size';
$result = $subscriptions->getSubscriptionCycles($subscriptionId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createAnUsage
Create Usage, (*55)
function createAnUsage(
$subscriptionId,
$itemId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
itemId |
Required |
Item id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->createAnUsage($subscriptionId, $itemId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getUsages
Lists all usages from a subscription item, (*56)
function getUsages(
$subscriptionId,
$itemId,
$page = null,
$size = null,
$code = null,
$group = null,
$usedSince = null,
$usedUntil = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
itemId |
Required |
The subscription item id |
page |
Optional |
Page number |
size |
Optional |
Page size |
code |
Optional |
Identification code in the client system |
group |
Optional |
Identification group in the client system |
usedSince |
Optional |
TODO: Add a parameter description |
usedUntil |
Optional |
TODO: Add a parameter description |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteDiscount
Deletes a discount, (*57)
function deleteDiscount(
$subscriptionId,
$discountId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
discountId |
Required |
Discount Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$discountId = 'discount_id';
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->deleteDiscount($subscriptionId, $discountId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getIncrements
GetIncrements, (*58)
function getIncrements(
$subscriptionId,
$page = null,
$size = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
page |
Optional |
Page number |
size |
Optional |
Page size |
Example Usage
$subscriptionId = 'subscription_id';
$page = 83;
$size = 83;
$result = $subscriptions->getIncrements($subscriptionId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createSubscriptionItem
Creates a new Subscription item, (*59)
function createSubscriptionItem(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
body |
Required |
Request for creating a subscription item |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsItemsRequest1();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->createSubscriptionItem($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getSubscriptionItems
Get Subscription Items, (*60)
function getSubscriptionItems(
$subscriptionId,
$page = null,
$size = null,
$name = null,
$code = null,
$status = null,
$description = null,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
page |
Optional |
Page number |
size |
Optional |
Page size |
name |
Optional |
The item name |
code |
Optional |
Identification code in the client system |
status |
Optional |
The item statis |
description |
Optional |
The item description |
createdSince |
Optional |
Filter for item's creation date start range |
createdUntil |
Optional |
Filter for item's creation date end range |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionBillingDate
Updates the billing date from a subscription, (*61)
function updateSubscriptionBillingDate(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
body |
Required |
Request for updating the subscription billing date |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsBillingDateRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionBillingDate($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateLatestPeriodEndAt
UpdateLatestPeriodEndAt, (*62)
function updateLatestPeriodEndAt(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
TODO: Add a parameter description |
body |
Required |
Request for updating the end date of the current signature cycle |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsPeriodsLatestEndAtRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateLatestPeriodEndAt($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionAffiliationId
UpdateSubscriptionAffiliationId, (*63)
function updateSubscriptionAffiliationId(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
TODO: Add a parameter description |
body |
Required |
Request for updating a subscription affiliation id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsGatewayAffiliationIdRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionAffiliationId($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteSubscriptionItem
Deletes a subscription item, (*64)
function deleteSubscriptionItem(
$subscriptionId,
$subscriptionItemId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
subscriptionItemId |
Required |
Subscription item id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$subscriptionItemId = 'subscription_item_id';
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->deleteSubscriptionItem($subscriptionId, $subscriptionItemId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionCard
Updates the credit card from a subscription, (*65)
function updateSubscriptionCard(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
body |
Required |
Request for updating a card |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsCardRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionCard($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Updates the metadata from a subscription, (*66)
function updateSubscriptionMetadata(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
body |
Required |
Request for updating the subscrption metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionMetadata($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionDueDays
Updates the boleto due days from a subscription, (*67)
function updateSubscriptionDueDays(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
body |
Required |
TODO: Add a parameter description |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new UpdateSubscriptionDueDaysRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionDueDays($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getDiscounts
GetDiscounts, (*68)
function getDiscounts(
$subscriptionId,
$page,
$size)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
page |
Required |
Page number |
size |
Required |
Page size |
Example Usage
$subscriptionId = 'subscription_id';
$page = 83;
$size = 83;
$result = $subscriptions->getDiscounts($subscriptionId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createIncrement
Creates a increment, (*69)
function createIncrement(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription id |
body |
Required |
Request for creating a increment |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsIncrementsRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->createIncrement($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getDiscountById
GetDiscountById, (*70)
function getDiscountById(
$subscriptionId,
$discountId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription id |
discountId |
Required |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$discountId = 'discountId';
$result = $subscriptions->getDiscountById($subscriptionId, $discountId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSubscriptionMiniumPrice
Atualização do valor mínimo da assinatura, (*71)
function updateSubscriptionMiniumPrice(
$subscriptionId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
body |
Required |
Request da requisição com o valor mínimo que será configurado |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$body = new SubscriptionsMinimumPriceRequest();
$idempotencyKey = 'idempotency-key';
$result = $subscriptions->updateSubscriptionMiniumPrice($subscriptionId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getUsageReport
GetUsageReport, (*72)
function getUsageReport(
$subscriptionId,
$periodId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
The subscription Id |
periodId |
Required |
The period Id |
Example Usage
$subscriptionId = 'subscription_id';
$periodId = 'period_id';
$result = $subscriptions->getUsageReport($subscriptionId, $periodId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateSplitSubscription
UpdateSplitSubscription, (*73)
function updateSplitSubscription(
$id,
$body)
Parameters
Parameter |
Tags |
Description |
id |
Required |
Subscription's id |
body |
Required |
TODO: Add a parameter description |
Example Usage
$id = 'id';
$body = new UpdateSubscriptionSplitRequest();
$result = $subscriptions->updateSplitSubscription($id, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*74)
OrdersController
Get singleton instance
The singleton instance of the OrdersController
class can be accessed from the API Client., (*75)
$orders = $client->getOrders();
updateOrderStatus
UpdateOrderStatus, (*76)
function updateOrderStatus(
$id,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
id |
Required |
Order Id |
body |
Required |
Update Order Model |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$id = 'id';
$body = new UpdateOrderStatusRequest();
$idempotencyKey = 'idempotency-key';
$result = $orders->updateOrderStatus($id, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteAllOrderItems
DeleteAllOrderItems, (*77)
function deleteAllOrderItems(
$orderId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
Order Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$orderId = 'orderId';
$idempotencyKey = 'idempotency-key';
$result = $orders->deleteAllOrderItems($orderId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createOrderItem
CreateOrderItem, (*78)
function createOrderItem(
$orderId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
Order Id |
body |
Required |
Order Item Model |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$orderId = 'orderId';
$body = new OrdersItemsRequest();
$idempotencyKey = 'idempotency-key';
$result = $orders->createOrderItem($orderId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Updates the metadata from an order, (*79)
function updateOrderMetadata(
$orderId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
The order id |
body |
Required |
Request for updating the order metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$orderId = 'order_id';
$body = new OrdersMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $orders->updateOrderMetadata($orderId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getOrders
Gets all orders, (*80)
function getOrders(
$page = null,
$size = null,
$code = null,
$status = null,
$createdSince = null,
$createdUntil = null,
$customerId = null)
Parameters
Parameter |
Tags |
Description |
page |
Optional |
Page number |
size |
Optional |
Page size |
code |
Optional |
Filter for order's code |
status |
Optional |
Filter for order's status |
createdSince |
Optional |
Filter for order's creation date start range |
createdUntil |
Optional |
Filter for order's creation date end range |
customerId |
Optional |
Filter for order's customer id |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createOrder
Creates a new Order, (*81)
function createOrder(
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
body |
Required |
Request for creating an order |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$body = new OrdersRequest();
$idempotencyKey = 'idempotency-key';
$result = $orders->createOrder($body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteOrderItem
DeleteOrderItem, (*82)
function deleteOrderItem(
$orderId,
$itemId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
Order Id |
itemId |
Required |
Item Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$orderId = 'orderId';
$itemId = 'itemId';
$idempotencyKey = 'idempotency-key';
$result = $orders->deleteOrderItem($orderId, $itemId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getOrderItem
GetOrderItem, (*83)
function getOrderItem(
$orderId,
$itemId)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
Order Id |
itemId |
Required |
Item Id |
Example Usage
$orderId = 'orderId';
$itemId = 'itemId';
$result = $orders->getOrderItem($orderId, $itemId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateOrderItem
UpdateOrderItem, (*84)
function updateOrderItem(
$orderId,
$itemId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
Order Id |
itemId |
Required |
Item Id |
body |
Required |
Item Model |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$orderId = 'orderId';
$itemId = 'itemId';
$body = new OrdersItemsRequest1();
$idempotencyKey = 'idempotency-key';
$result = $orders->updateOrderItem($orderId, $itemId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getOrder
Gets an order, (*85)
function getOrder($orderId)
Parameters
Parameter |
Tags |
Description |
orderId |
Required |
Order id |
Example Usage
$orderId = 'order_id';
$result = $orders->getOrder($orderId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*86)
PlansController
Get singleton instance
The singleton instance of the PlansController
class can be accessed from the API Client., (*87)
$plans = $client->getPlans();
updatePlanItem
Updates a plan item, (*88)
function updatePlanItem(
$planId,
$planItemId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
planItemId |
Required |
Plan item id |
body |
Required |
Request for updating the plan item |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$planId = 'plan_id';
$planItemId = 'plan_item_id';
$body = new PlansItemsRequest();
$idempotencyKey = 'idempotency-key';
$result = $plans->updatePlanItem($planId, $planItemId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deletePlanItem
Removes an item from a plan, (*89)
function deletePlanItem(
$planId,
$planItemId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
planItemId |
Required |
Plan item id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$planId = 'plan_id';
$planItemId = 'plan_item_id';
$idempotencyKey = 'idempotency-key';
$result = $plans->deletePlanItem($planId, $planItemId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getPlanItem
Gets a plan item, (*90)
function getPlanItem(
$planId,
$planItemId)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
planItemId |
Required |
Plan item id |
Example Usage
$planId = 'plan_id';
$planItemId = 'plan_item_id';
$result = $plans->getPlanItem($planId, $planItemId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createPlanItem
Adds a new item to a plan, (*91)
function createPlanItem(
$planId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
body |
Required |
Request for creating a plan item |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$planId = 'plan_id';
$body = new PlansItemsRequest1();
$idempotencyKey = 'idempotency-key';
$result = $plans->createPlanItem($planId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getPlans
Gets all plans, (*92)
function getPlans(
$page = null,
$size = null,
$name = null,
$status = null,
$billingType = null,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
page |
Optional |
Page number |
size |
Optional |
Page size |
name |
Optional |
Filter for Plan's name |
status |
Optional |
Filter for Plan's status |
billingType |
Optional |
Filter for plan's billing type |
createdSince |
Optional |
Filter for plan's creation date start range |
createdUntil |
Optional |
Filter for plan's creation date end range |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createPlan
Creates a new plan, (*93)
function createPlan(
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
body |
Required |
Request for creating a plan |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$body = new PlansRequest();
$idempotencyKey = 'idempotency-key';
$result = $plans->createPlan($body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getPlan
Gets a plan, (*94)
function getPlan($planId)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
Example Usage
$planId = 'plan_id';
$result = $plans->getPlan($planId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updatePlan
Updates a plan, (*95)
function updatePlan(
$planId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
body |
Required |
Request for updating a plan |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$planId = 'plan_id';
$body = new PlansRequest1();
$idempotencyKey = 'idempotency-key';
$result = $plans->updatePlan($planId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deletePlan
Deletes a plan, (*96)
function deletePlan(
$planId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
Plan id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$planId = 'plan_id';
$idempotencyKey = 'idempotency-key';
$result = $plans->deletePlan($planId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Updates the metadata from a plan, (*97)
function updatePlanMetadata(
$planId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
planId |
Required |
The plan id |
body |
Required |
Request for updating the plan metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$planId = 'plan_id';
$body = new PlansMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $plans->updatePlanMetadata($planId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*98)
InvoicesController
Get singleton instance
The singleton instance of the InvoicesController
class can be accessed from the API Client., (*99)
$invoices = $client->getInvoices();
createInvoice
Create an Invoice, (*100)
function createInvoice(
$subscriptionId,
$cycleId,
$idempotencyKey = null,
$body = null)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
cycleId |
Required |
Cycle Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
body |
Optional |
TODO: Add a parameter description |
Example Usage
$subscriptionId = 'subscription_id';
$cycleId = 'cycle_id';
$idempotencyKey = 'idempotency-key';
$body = new SubscriptionsCyclesPayRequest();
$result = $invoices->createInvoice($subscriptionId, $cycleId, $idempotencyKey, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getPartialInvoice
GetPartialInvoice, (*101)
function getPartialInvoice($subscriptionId)
Parameters
Parameter |
Tags |
Description |
subscriptionId |
Required |
Subscription Id |
Example Usage
$subscriptionId = 'subscription_id';
$result = $invoices->getPartialInvoice($subscriptionId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateInvoiceStatus
Updates the status from an invoice, (*102)
function updateInvoiceStatus(
$invoiceId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
invoiceId |
Required |
Invoice Id |
body |
Required |
Request for updating an invoice's status |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$invoiceId = 'invoice_id';
$body = new UpdateCurrentCycleStatusRequest();
$idempotencyKey = 'idempotency-key';
$result = $invoices->updateInvoiceStatus($invoiceId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getInvoice
Gets an invoice, (*103)
function getInvoice($invoiceId)
Parameters
Parameter |
Tags |
Description |
invoiceId |
Required |
Invoice Id |
Example Usage
$invoiceId = 'invoice_id';
$result = $invoices->getInvoice($invoiceId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
cancelInvoice
Cancels an invoice, (*104)
function cancelInvoice(
$invoiceId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
invoiceId |
Required |
Invoice id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$invoiceId = 'invoice_id';
$idempotencyKey = 'idempotency-key';
$result = $invoices->cancelInvoice($invoiceId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Updates the metadata from an invoice, (*105)
function updateInvoiceMetadata(
$invoiceId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
invoiceId |
Required |
The invoice id |
body |
Required |
Request for updating the invoice metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$invoiceId = 'invoice_id';
$body = new InvoicesMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $invoices->updateInvoiceMetadata($invoiceId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getInvoices
Gets all invoices, (*106)
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
Parameter |
Tags |
Description |
page |
Optional |
Page number |
size |
Optional |
Page size |
code |
Optional |
Filter for Invoice's code |
customerId |
Optional |
Filter for Invoice's customer id |
subscriptionId |
Optional |
Filter for Invoice's subscription id |
createdSince |
Optional |
Filter for Invoice's creation date start range |
createdUntil |
Optional |
Filter for Invoices creation date end range |
status |
Optional |
Filter for Invoice's status |
dueSince |
Optional |
Filter for Invoice's due date start range |
dueUntil |
Optional |
Filter for Invoice's due date end range |
customerDocument |
Optional |
Fillter for invoice's document |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*107)
CustomersController
Get singleton instance
The singleton instance of the CustomersController
class can be accessed from the API Client., (*108)
$customers = $client->getCustomers();
createAccessToken
Creates a access token for a customer, (*109)
function createAccessToken(
$customerId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
body |
Required |
Request for creating a access token |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$body = new CustomersAccessTokensRequest();
$idempotencyKey = 'idempotency-key';
$result = $customers->createAccessToken($customerId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAccessTokens
Get all access tokens from a customer, (*110)
function getAccessTokens(
$customerId,
$page = null,
$size = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
page |
Optional |
Page number |
size |
Optional |
Page size |
Example Usage
$customerId = 'customer_id';
$page = 11;
$size = 11;
$result = $customers->getAccessTokens($customerId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateCustomer
Updates a customer, (*111)
function updateCustomer(
$customerId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer id |
body |
Required |
Request for updating a customer |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$body = new CustomersRequest();
$idempotencyKey = 'idempotency-key';
$result = $customers->updateCustomer($customerId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getCustomer
Get a customer, (*112)
function getCustomer($customerId)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
Example Usage
$customerId = 'customer_id';
$result = $customers->getCustomer($customerId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteAccessTokens
Delete a Customer's access tokens, (*113)
function deleteAccessTokens($customerId)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
Example Usage
$customerId = 'customer_id';
$result = $customers->deleteAccessTokens($customerId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAddresses
Gets all adressess from a customer, (*114)
function getAddresses(
$customerId,
$page = null,
$size = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer id |
page |
Optional |
Page number |
size |
Optional |
Page size |
Example Usage
$customerId = 'customer_id';
$page = 11;
$size = 11;
$result = $customers->getAddresses($customerId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createAddress
Creates a new address for a customer, (*115)
function createAddress(
$customerId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
body |
Required |
Request for creating an address |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$body = new CustomersAddressesRequest();
$idempotencyKey = 'idempotency-key';
$result = $customers->createAddress($customerId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAccessToken
Get a Customer's access token, (*116)
function getAccessToken(
$customerId,
$tokenId)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
tokenId |
Required |
Token Id |
Example Usage
$customerId = 'customer_id';
$tokenId = 'token_id';
$result = $customers->getAccessToken($customerId, $tokenId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteAccessToken
Delete a customer's access token, (*117)
function deleteAccessToken(
$customerId,
$tokenId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
tokenId |
Required |
Token Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$tokenId = 'token_id';
$idempotencyKey = 'idempotency-key';
$result = $customers->deleteAccessToken($customerId, $tokenId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAddress
Get a customer's address, (*118)
function getAddress(
$customerId,
$addressId)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer id |
addressId |
Required |
Address Id |
Example Usage
$customerId = 'customer_id';
$addressId = 'address_id';
$result = $customers->getAddress($customerId, $addressId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateAddress
Updates an address, (*119)
function updateAddress(
$customerId,
$addressId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
addressId |
Required |
Address Id |
body |
Required |
Request for updating an address |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$addressId = 'address_id';
$body = new CustomersAddressesRequest1();
$idempotencyKey = 'idempotency-key';
$result = $customers->updateAddress($customerId, $addressId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteAddress
Delete a Customer's address, (*120)
function deleteAddress(
$customerId,
$addressId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
addressId |
Required |
Address Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$addressId = 'address_id';
$idempotencyKey = 'idempotency-key';
$result = $customers->deleteAddress($customerId, $addressId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createCard
Creates a new card for a customer, (*121)
function createCard(
$customerId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer id |
body |
Required |
Request for creating a card |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$body = new CustomersCardsRequest();
$idempotencyKey = 'idempotency-key';
$result = $customers->createCard($customerId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getCards
Get all cards from a customer, (*122)
function getCards(
$customerId,
$page = null,
$size = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
page |
Optional |
Page number |
size |
Optional |
Page size |
Example Usage
$customerId = 'customer_id';
$page = 225;
$size = 225;
$result = $customers->getCards($customerId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
renewCard
Renew a card, (*123)
function renewCard(
$customerId,
$cardId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer id |
cardId |
Required |
Card Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$cardId = 'card_id';
$idempotencyKey = 'idempotency-key';
$result = $customers->renewCard($customerId, $cardId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createCustomer
Creates a new customer, (*124)
function createCustomer(
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
body |
Required |
Request for creating a customer |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$body = new CustomersRequest1();
$idempotencyKey = 'idempotency-key';
$result = $customers->createCustomer($body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getCustomers
Get all Customers, (*125)
function getCustomers(
$name = null,
$document = null,
$page = 1,
$size = 10,
$email = null,
$code = null)
Parameters
Parameter |
Tags |
Description |
name |
Optional |
Name of the Customer |
document |
Optional |
Document of the Customer |
page |
Optional DefaultValue
|
Current page the the search |
size |
Optional DefaultValue
|
Quantity pages of the search |
email |
Optional |
Customer's email |
code |
Optional |
Customer's code |
Example Usage
$name = 'name';
$document = 'document';
$page = 1;
$size = 10;
$email = 'email';
$code = 'Code';
$result = $customers->getCustomers($name, $document, $page, $size, $email, $code);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Updates the metadata a customer, (*126)
function updateCustomerMetadata(
$customerId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
The customer id |
body |
Required |
Request for updating the customer metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$body = new CustomersMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $customers->updateCustomerMetadata($customerId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateCard
Updates a card, (*127)
function updateCard(
$customerId,
$cardId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
cardId |
Required |
Card id |
body |
Required |
Request for updating a card |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$cardId = 'card_id';
$body = new CustomersCardsRequest1();
$idempotencyKey = 'idempotency-key';
$result = $customers->updateCard($customerId, $cardId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
deleteCard
Delete a customer's card, (*128)
function deleteCard(
$customerId,
$cardId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer Id |
cardId |
Required |
Card Id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$customerId = 'customer_id';
$cardId = 'card_id';
$idempotencyKey = 'idempotency-key';
$result = $customers->deleteCard($customerId, $cardId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getCard
Get a customer's card, (*129)
function getCard(
$customerId,
$cardId)
Parameters
Parameter |
Tags |
Description |
customerId |
Required |
Customer id |
cardId |
Required |
Card id |
Example Usage
$customerId = 'customer_id';
$cardId = 'card_id';
$result = $customers->getCard($customerId, $cardId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*130)
ChargesController
Get singleton instance
The singleton instance of the ChargesController
class can be accessed from the API Client., (*131)
$charges = $client->getCharges();
getCharge
Get a charge from its id, (*132)
function getCharge($chargeId)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge id |
Example Usage
$chargeId = 'charge_id';
$result = $charges->getCharge($chargeId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
cancelCharge
Cancel a charge, (*133)
function cancelCharge(
$chargeId,
$idempotencyKey = null,
$body = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
body |
Optional |
Request for cancelling a charge |
Example Usage
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';
$body = new ChargesRequest();
$result = $charges->cancelCharge($chargeId, $idempotencyKey, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
confirmPayment
ConfirmPayment, (*134)
function confirmPayment(
$chargeId,
$idempotencyKey = null,
$body = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
TODO: Add a parameter description |
idempotencyKey |
Optional |
TODO: Add a parameter description |
body |
Optional |
Request for confirm payment |
Example Usage
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';
$body = new CreateConfirmPaymentRequest();
$result = $charges->confirmPayment($chargeId, $idempotencyKey, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateChargeCard
Updates the card from a charge, (*135)
function updateChargeCard(
$chargeId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge id |
body |
Required |
Request for updating a charge's card |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$chargeId = 'charge_id';
$body = new ChargesCardRequest();
$idempotencyKey = 'idempotency-key';
$result = $charges->updateChargeCard($chargeId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getCharges
Lists all charges, (*136)
function getCharges(
$page = null,
$size = null,
$code = null,
$status = null,
$paymentMethod = null,
$customerId = null,
$orderId = null,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
page |
Optional |
Page number |
size |
Optional |
Page size |
code |
Optional |
Filter for charge's code |
status |
Optional |
Filter for charge's status |
paymentMethod |
Optional |
Filter for charge's payment method |
customerId |
Optional |
Filter for charge's customer id |
orderId |
Optional |
Filter for charge's order id |
createdSince |
Optional |
Filter for the beginning of the range for charge's creation |
createdUntil |
Optional |
Filter for the end of the range for charge's creation |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
retryCharge
Retries a charge, (*137)
function retryCharge(
$chargeId,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';
$result = $charges->retryCharge($chargeId, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateChargePaymentMethod
Updates a charge's payment method, (*138)
function updateChargePaymentMethod(
$chargeId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge id |
body |
Required |
Request for updating the payment method from a charge |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$chargeId = 'charge_id';
$body = new ChargesPaymentMethodRequest();
$idempotencyKey = 'idempotency-key';
$result = $charges->updateChargePaymentMethod($chargeId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Updates the metadata from a charge, (*139)
function updateChargeMetadata(
$chargeId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
The charge id |
body |
Required |
Request for updating the charge metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$chargeId = 'charge_id';
$body = new ChargesMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $charges->updateChargeMetadata($chargeId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
captureCharge
Captures a charge, (*140)
function captureCharge(
$chargeId,
$idempotencyKey = null,
$body = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge id |
idempotencyKey |
Optional |
TODO: Add a parameter description |
body |
Optional |
Request for capturing a charge |
Example Usage
$chargeId = 'charge_id';
$idempotencyKey = 'idempotency-key';
$body = new ChargesCaptureRequest();
$result = $charges->captureCharge($chargeId, $idempotencyKey, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateChargeDueDate
Updates the due date from a charge, (*141)
function updateChargeDueDate(
$chargeId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge Id |
body |
Required |
Request for updating the due date |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$chargeId = 'charge_id';
$body = new ChargesDueDateRequest();
$idempotencyKey = 'idempotency-key';
$result = $charges->updateChargeDueDate($chargeId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createCharge
Creates a new charge, (*142)
function createCharge(
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
body |
Required |
Request for creating a charge |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$body = new ChargesRequest1();
$idempotencyKey = 'idempotency-key';
$result = $charges->createCharge($body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getChargeTransactions
GetChargeTransactions, (*143)
function getChargeTransactions(
$chargeId,
$page = null,
$size = null)
Parameters
Parameter |
Tags |
Description |
chargeId |
Required |
Charge Id |
page |
Optional |
Page number |
size |
Optional |
Page size |
Example Usage
$chargeId = 'charge_id';
$page = 61;
$size = 61;
$result = $charges->getChargeTransactions($chargeId, $page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getChargesSummary
GetChargesSummary, (*144)
function getChargesSummary(
$status,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
status |
Required |
TODO: Add a parameter description |
createdSince |
Optional |
TODO: Add a parameter description |
createdUntil |
Optional |
TODO: Add a parameter description |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*145)
RecipientsController
Get singleton instance
The singleton instance of the RecipientsController
class can be accessed from the API Client., (*146)
$recipients = $client->getRecipients();
Updates recipient metadata, (*147)
function updateRecipientMetadata(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
body |
Required |
Metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new RecipientsMetadataRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->updateRecipientMetadata($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateRecipientTransferSettings
UpdateRecipientTransferSettings, (*148)
function updateRecipientTransferSettings(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient Identificator |
body |
Required |
TODO: Add a parameter description |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new UpdateTransferSettingsRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->updateRecipientTransferSettings($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAnticipation
Gets an anticipation, (*149)
function getAnticipation(
$recipientId,
$anticipationId)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
anticipationId |
Required |
Anticipation id |
Example Usage
$recipientId = 'recipient_id';
$anticipationId = 'anticipation_id';
$result = $recipients->getAnticipation($recipientId, $anticipationId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getRecipients
Retrieves paginated recipients information, (*150)
function getRecipients(
$page = null,
$size = null)
Parameters
Parameter |
Tags |
Description |
page |
Optional |
Page number |
size |
Optional |
Page size |
Example Usage
$page = 61;
$size = 61;
$result = $recipients->getRecipients($page, $size);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createRecipient
Creates a new recipient, (*151)
function createRecipient(
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
body |
Required |
Recipient data |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$body = new RecipientsRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->createRecipient($body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getBalance
Get balance information for a recipient, (*152)
function getBalance($recipientId)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
Example Usage
$recipientId = 'recipient_id';
$result = $recipients->getBalance($recipientId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAnticipations
Retrieves a paginated list of anticipations from a recipient, (*153)
function getAnticipations(
$recipientId,
$page = null,
$size = null,
$status = null,
$timeframe = null,
$paymentDateSince = null,
$paymentDateUntil = null,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
page |
Optional |
Page number |
size |
Optional |
Page size |
status |
Optional |
Filter for anticipation status |
timeframe |
Optional |
Filter for anticipation timeframe |
paymentDateSince |
Optional |
Filter for start range for anticipation payment date |
paymentDateUntil |
Optional |
Filter for end range for anticipation payment date |
createdSince |
Optional |
Filter for start range for anticipation creation date |
createdUntil |
Optional |
Filter for end range for anticipation creation date |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createAnticipation
Creates an anticipation, (*154)
function createAnticipation(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
body |
Required |
Anticipation data |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new RecipientsAnticipationsRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->createAnticipation($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateRecipientDefaultBankAccount
Updates the default bank account from a recipient, (*155)
function updateRecipientDefaultBankAccount(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
body |
Required |
Bank account data |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new RecipientsDefaultBankAccountRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->updateRecipientDefaultBankAccount($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getRecipient
Retrieves recipient information, (*156)
function getRecipient($recipientId)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipiend id |
Example Usage
$recipientId = 'recipient_id';
$result = $recipients->getRecipient($recipientId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateRecipient
Updates a recipient, (*157)
function updateRecipient(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
body |
Required |
Recipient data |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new RecipientsRequest1();
$idempotencyKey = 'idempotency-key';
$result = $recipients->updateRecipient($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getTransfer
Gets a transfer, (*158)
function getTransfer(
$recipientId,
$transferId)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
transferId |
Required |
Transfer id |
Example Usage
$recipientId = 'recipient_id';
$transferId = 'transfer_id';
$result = $recipients->getTransfer($recipientId, $transferId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getTransfers
Gets a paginated list of transfers for the recipient, (*159)
function getTransfers(
$recipientId,
$page = null,
$size = null,
$status = null,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
page |
Optional |
Page number |
size |
Optional |
Page size |
status |
Optional |
Filter for transfer status |
createdSince |
Optional |
Filter for start range of transfer creation date |
createdUntil |
Optional |
Filter for end range of transfer creation date |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createTransfer
Creates a transfer for a recipient, (*160)
function createTransfer(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient Id |
body |
Required |
Transfer data |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new RecipientsTransfersRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->createTransfer($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getAnticipationLimits
Gets the anticipation limits for a recipient, (*161)
function getAnticipationLimits(
$recipientId,
$timeframe,
$paymentDate)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
timeframe |
Required |
Timeframe |
paymentDate |
Required |
Anticipation payment date |
Example Usage
$recipientId = 'recipient_id';
$timeframe = 'timeframe';
$paymentDate = date("D M d, Y G:i");
$result = $recipients->getAnticipationLimits($recipientId, $timeframe, $paymentDate);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
createWithdraw
CreateWithdraw, (*162)
function createWithdraw(
$recipientId,
$body)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
TODO: Add a parameter description |
body |
Required |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new CreateWithdrawRequest();
$result = $recipients->createWithdraw($recipientId, $body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getWithdrawals
Gets a paginated list of transfers for the recipient, (*163)
function getWithdrawals(
$recipientId,
$page = null,
$size = null,
$status = null,
$createdSince = null,
$createdUntil = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
TODO: Add a parameter description |
page |
Optional |
TODO: Add a parameter description |
size |
Optional |
TODO: Add a parameter description |
status |
Optional |
TODO: Add a parameter description |
createdSince |
Optional |
TODO: Add a parameter description |
createdUntil |
Optional |
TODO: Add a parameter description |
Example Usage
$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
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getWithdrawById
GetWithdrawById, (*164)
function getWithdrawById(
$recipientId,
$withdrawalId)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
TODO: Add a parameter description |
withdrawalId |
Required |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$withdrawalId = 'withdrawal_id';
$result = $recipients->getWithdrawById($recipientId, $withdrawalId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
updateAutomaticAnticipationSettings
Updates recipient metadata, (*165)
function updateAutomaticAnticipationSettings(
$recipientId,
$body,
$idempotencyKey = null)
Parameters
Parameter |
Tags |
Description |
recipientId |
Required |
Recipient id |
body |
Required |
Metadata |
idempotencyKey |
Optional |
TODO: Add a parameter description |
Example Usage
$recipientId = 'recipient_id';
$body = new UpdateAutomaticAnticipationSettingsRequest();
$idempotencyKey = 'idempotency-key';
$result = $recipients->updateAutomaticAnticipationSettings($recipientId, $body, $idempotencyKey);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getRecipientByCode
Retrieves recipient information, (*166)
function getRecipientByCode($code)
Parameters
Parameter |
Tags |
Description |
code |
Required |
Recipient code |
Example Usage
$code = 'code';
$result = $recipients->getRecipientByCode($code);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*167)
TokensController
Get singleton instance
The singleton instance of the TokensController
class can be accessed from the API Client., (*168)
$tokens = $client->getTokens();
createToken
Tags: Skips Authentication
, (*169)
CreateToken, (*170)
function createToken(
$publicKey,
$body,
$idempotencyKey = null,
$appId = null)
Parameters
Parameter |
Tags |
Description |
publicKey |
Required |
Public key |
body |
Required |
Request for creating a token |
idempotencyKey |
Optional |
TODO: Add a parameter description |
appId |
Optional |
TODO: Add a parameter description |
Example Usage
$publicKey = 'public_key';
$body = new TokensRequest();
$idempotencyKey = 'idempotency-key';
$appId = 'appId';
$result = $tokens->createToken($publicKey, $body, $idempotencyKey, $appId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getToken
Tags: Skips Authentication
, (*171)
Gets a token from its id, (*172)
function getToken(
$id,
$publicKey,
$appId = null)
Parameters
Parameter |
Tags |
Description |
id |
Required |
Token id |
publicKey |
Required |
Public key |
appId |
Optional |
TODO: Add a parameter description |
Example Usage
$id = 'id';
$publicKey = 'public_key';
$appId = 'appId';
$result = $tokens->getToken($id, $publicKey, $appId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*173)
TransactionsController
Get singleton instance
The singleton instance of the TransactionsController
class can be accessed from the API Client., (*174)
$transactions = $client->getTransactions();
getTransaction
GetTransaction, (*175)
function getTransaction($transactionId)
Parameters
Parameter |
Tags |
Description |
transactionId |
Required |
TODO: Add a parameter description |
Example Usage
$transactionId = 'transaction_id';
$result = $transactions->getTransaction($transactionId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*176)
TransfersController
Get singleton instance
The singleton instance of the TransfersController
class can be accessed from the API Client., (*177)
$transfers = $client->getTransfers();
postCreateTransfer
CreateTransfer, (*178)
function postCreateTransfer($body)
Parameters
Parameter |
Tags |
Description |
body |
Required |
TODO: Add a parameter description |
Example Usage
$body = new CreateTransfer();
$result = $transfers->postCreateTransfer($body);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getTransferById
GetTransferById, (*179)
function getTransferById($transferId)
Parameters
Parameter |
Tags |
Description |
transferId |
Required |
TODO: Add a parameter description |
Example Usage
$transferId = 'transfer_id';
$result = $transfers->getTransferById($transferId);
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
getTransfers1
Gets all transfers, (*180)
function getTransfers1()
Example Usage
$result = $transfers->getTransfers1();
Errors
Error Code |
Error Description |
400 |
Invalid request |
401 |
Invalid API key |
404 |
An informed resource was not found |
412 |
Business validation error |
422 |
Contract validation error |
500 |
Internal server error |
Back to List of Controllers, (*181)