devhotsales/pagarme-core-api-php-privado

1.0.0 2024-10-31 20:35 UTC

This package is not auto-updated.

Last update: 2024-10-31 23:51:18 UTC


README

Pagarme API

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.

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

Building SDK - Step 1

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

  1. Download the certificate bundle (.pem file) from https://curl.haxx.se/docs/caextract.html on to your system.
  2. Add curl.cainfo = "PATH_TO/cacert.pem" to your php.ini file located in your php installation. “PATH_TO” must be an absolute path containing the .pem file.
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =

How to Use

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

1. Open Project in an IDE

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

Open project in PHPStorm - Step 1

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

Open project in PHPStorm - Step 2

2. Add a new Test Project

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

Add a new project in PHPStorm - Step 1

Name the directory as "test"

Add a new project in PHPStorm - Step 2

Add a PHP file to this project

Add a new project in PHPStorm - Step 3

Name it "testSDK"

Add a new project in PHPStorm - Step 4

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

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

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

Add a new project in PHPStorm - Step 4

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

3. Run the Test Project

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

Open Settings from File menu.

Run Test Project - Step 1

Select PHP from within Languages & Frameworks

Run Test Project - Step 2

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

Run Test Project - Step 3

Once the interpreter is selected, click OK

Run Test Project - Step 4

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

Run Test Project - Step 5

How to Test

Unit tests in this SDK can be run using PHPUnit.

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

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

Initialization

Authentication

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

API client can be initialized as following.

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

$client = new PagarmeCoreApiLib\PagarmeCoreApiClient($serviceRefererName, $basicAuthUserName, $basicAuthPassword);

Class Reference

List of Controllers

Class: SubscriptionsController

Get singleton instance

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

$subscriptions = $client->getSubscriptions();

Method: updateSubscriptionCard

Updates the credit card from a subscription

function updateSubscriptionCard(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: deleteUsage

Deletes a usage

function deleteUsage(
        $subscriptionId,
        $itemId,
        $usageId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: createDiscount

Creates a discount

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

Parameters

Example Usage

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

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

Errors

Method: createAnUsage

Create Usage

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

Parameters

Example Usage

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

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

Errors

Method: getUsages

Lists all usages from a subscription item

function getUsages(
        $subscriptionId,
        $itemId,
        $page = null,
        $size = null,
        $code = null,
        $group = null,
        $usedSince = null,
        $usedUntil = null)

Parameters

Example Usage

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

Method: updateCurrentCycleStatus

UpdateCurrentCycleStatus

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

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionPaymentMethod

Updates the payment method from a subscription

function updateSubscriptionPaymentMethod(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: deleteDiscount

Deletes a discount

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

Parameters

Example Usage

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

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

Errors

Method: getSubscriptionItems

Get Subscription Items

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

Parameters

Example Usage

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

Method: createSubscriptionItem

Creates a new Subscription item

function createSubscriptionItem(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getSubscriptionItem

Get Subscription Item

function getSubscriptionItem(
        $subscriptionId,
        $itemId)

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionItem

Updates a subscription item

function updateSubscriptionItem(
        $subscriptionId,
        $itemId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getSubscriptions

Gets all subscriptions

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

Parameters

Example Usage

$page = 160;
$size = 160;
$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

Method: createSubscription

Creates a new subscription

function createSubscription(
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: cancelSubscription

Cancels a subscription

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

Parameters

Example Usage

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

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

Errors

Method: getSubscription

Gets a subscription

function getSubscription($subscriptionId)

Parameters

Example Usage

$subscriptionId = 'subscription_id';

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

Errors

Method: createIncrement

Creates a increment

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

Parameters

Example Usage

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

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

Errors

Method: getDiscountById

GetDiscountById

function getDiscountById(
        $subscriptionId,
        $discountId)

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionAffiliationId

UpdateSubscriptionAffiliationId

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

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionMetadata

Updates the metadata from a subscription

function updateSubscriptionMetadata(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: deleteIncrement

Deletes a increment

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

Parameters

Example Usage

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

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

Errors

Method: getIncrementById

GetIncrementById

function getIncrementById(
        $subscriptionId,
        $incrementId)

Parameters

Example Usage

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

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

Errors

Method: getSubscriptionCycles

GetSubscriptionCycles

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

Parameters

Example Usage

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

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

Errors

Method: renewSubscription

RenewSubscription

function renewSubscription(
        $subscriptionId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getDiscounts

GetDiscounts

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

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionBillingDate

Updates the billing date from a subscription

function updateSubscriptionBillingDate(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: deleteSubscriptionItem

Deletes a subscription item

function deleteSubscriptionItem(
        $subscriptionId,
        $subscriptionItemId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getIncrements

GetIncrements

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

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionDueDays

Updates the boleto due days from a subscription

function updateSubscriptionDueDays(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionStartAt

Updates the start at date from a subscription

function updateSubscriptionStartAt(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: updateLatestPeriodEndAt

UpdateLatestPeriodEndAt

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

Parameters

Example Usage

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

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

Errors

Method: updateSubscriptionMiniumPrice

Atualização do valor mínimo da assinatura

function updateSubscriptionMiniumPrice(
        $subscriptionId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getSubscriptionCycleById

GetSubscriptionCycleById

function getSubscriptionCycleById(
        $subscriptionId,
        $cycleId)

Parameters

Example Usage

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

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

Errors

Method: getUsageReport

GetUsageReport

function getUsageReport(
        $subscriptionId,
        $periodId)

Parameters

Example Usage

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

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

Errors

Method: updateSplitSubscription

UpdateSplitSubscription

function updateSplitSubscription(
        $id,
        $body)

Parameters

Example Usage

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

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

Errors

Back to List of Controllers

Class: OrdersController

Get singleton instance

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

$orders = $client->getOrders();

Method: getOrders

Gets all orders

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

Parameters

Example Usage

$page = 160;
$size = 160;
$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

Method: createOrder

Creates a new Order

function createOrder(
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: deleteAllOrderItems

DeleteAllOrderItems

function deleteAllOrderItems(
        $orderId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: createOrderItem

CreateOrderItem

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

Parameters

Example Usage

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

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

Errors

Method: updateOrderItem

UpdateOrderItem

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

Parameters

Example Usage

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

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

Errors

Method: deleteOrderItem

DeleteOrderItem

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

Parameters

Example Usage

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

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

Errors

Method: getOrderItem

GetOrderItem

function getOrderItem(
        $orderId,
        $itemId)

Parameters

Example Usage

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

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

Errors

Method: closeOrder

CloseOrder

function closeOrder(
        $id,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: updateOrderMetadata

Updates the metadata from an order

function updateOrderMetadata(
        $orderId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getOrder

Gets an order

function getOrder($orderId)

Parameters

Example Usage

$orderId = 'order_id';

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

Errors

Back to List of Controllers

Class: PlansController

Get singleton instance

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

$plans = $client->getPlans();

Method: getPlan

Gets a plan

function getPlan($planId)

Parameters

Example Usage

$planId = 'plan_id';

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

Errors

Method: updatePlan

Updates a plan

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

Parameters

Example Usage

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

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

Errors

Method: deletePlan

Deletes a plan

function deletePlan(
        $planId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: updatePlanMetadata

Updates the metadata from a plan

function updatePlanMetadata(
        $planId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: updatePlanItem

Updates a plan item

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

Parameters

Example Usage

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

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

Errors

Method: getPlanItem

Gets a plan item

function getPlanItem(
        $planId,
        $planItemId)

Parameters

Example Usage

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

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

Errors

Method: deletePlanItem

Removes an item from a plan

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

Parameters

Example Usage

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

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

Errors

Method: createPlanItem

Adds a new item to a plan

function createPlanItem(
        $planId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: createPlan

Creates a new plan

function createPlan(
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getPlans

Gets all plans

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

Parameters

Example Usage

$page = 160;
$size = 160;
$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

Back to List of Controllers

Class: InvoicesController

Get singleton instance

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

$invoices = $client->getInvoices();

Method: getPartialInvoice

GetPartialInvoice

function getPartialInvoice($subscriptionId)

Parameters

Example Usage

$subscriptionId = 'subscription_id';

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

Errors

Method: cancelInvoice

Cancels an invoice

function cancelInvoice(
        $invoiceId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getInvoice

Gets an invoice

function getInvoice($invoiceId)

Parameters

Example Usage

$invoiceId = 'invoice_id';

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

Errors

Method: createInvoice

Create an Invoice

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

Parameters

Example Usage

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

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

Errors

Method: updateInvoiceMetadata

Updates the metadata from an invoice

function updateInvoiceMetadata(
        $invoiceId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getInvoices

Gets all invoices

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

Parameters

Example Usage

$page = 252;
$size = 252;
$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

Method: updateInvoiceStatus

Updates the status from an invoice

function updateInvoiceStatus(
        $invoiceId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Back to List of Controllers

Class: CustomersController

Get singleton instance

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

$customers = $client->getCustomers();

Method: updateCard

Updates a card

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

Parameters

Example Usage

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

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

Errors

Method: deleteCard

Delete a customer's card

function deleteCard(
        $customerId,
        $cardId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getCard

Get a customer's card

function getCard(
        $customerId,
        $cardId)

Parameters

Example Usage

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

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

Errors

Method: updateAddress

Updates an address

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

Parameters

Example Usage

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

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

Errors

Method: getAddress

Get a customer's address

function getAddress(
        $customerId,
        $addressId)

Parameters

Example Usage

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

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

Errors

Method: deleteAddress

Delete a Customer's address

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

Parameters

Example Usage

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

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

Errors

Method: deleteAccessToken

Delete a customer's access token

function deleteAccessToken(
        $customerId,
        $tokenId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getAccessToken

Get a Customer's access token

function getAccessToken(
        $customerId,
        $tokenId)

Parameters

Example Usage

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

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

Errors

Method: createAccessToken

Creates a access token for a customer

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

Parameters

Example Usage

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

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

Errors

Method: getAccessTokens

Get all access tokens from a customer

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

Parameters

Example Usage

$customerId = 'customer_id';
$page = 252;
$size = 252;

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

Errors

Method: createAddress

Creates a new address for a customer

function createAddress(
        $customerId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getAddresses

Gets all adressess from a customer

function getAddresses(
        $customerId,
        $page = null,
        $size = null)

Parameters

Example Usage

$customerId = 'customer_id';
$page = 252;
$size = 252;

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

Errors

Method: createCustomer

Creates a new customer

function createCustomer(
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getCustomers

Get all Customers

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

Parameters

Example Usage

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

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

Errors

Method: deleteAccessTokens

Delete a Customer's access tokens

function deleteAccessTokens($customerId)

Parameters

Example Usage

$customerId = 'customer_id';

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

Errors

Method: createCard

Creates a new card for a customer

function createCard(
        $customerId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getCards

Get all cards from a customer

function getCards(
        $customerId,
        $page = null,
        $size = null)

Parameters

Example Usage

$customerId = 'customer_id';
$page = 252;
$size = 252;

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

Errors

Method: updateCustomer

Updates a customer

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

Parameters

Example Usage

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

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

Errors

Method: getCustomer

Get a customer

function getCustomer($customerId)

Parameters

Example Usage

$customerId = 'customer_id';

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

Errors

Method: renewCard

Renew a card

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

Parameters

Example Usage

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

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

Errors

Method: updateCustomerMetadata

Updates the metadata a customer

function updateCustomerMetadata(
        $customerId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Back to List of Controllers

Class: ChargesController

Get singleton instance

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

$charges = $client->getCharges();

Method: updateChargeMetadata

Updates the metadata from a charge

function updateChargeMetadata(
        $chargeId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: captureCharge

Captures a charge

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

Parameters

Example Usage

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

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

Errors

Method: updateChargePaymentMethod

Updates a charge's payment method

function updateChargePaymentMethod(
        $chargeId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getChargeTransactions

GetChargeTransactions

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

Parameters

Example Usage

$chargeId = 'charge_id';
$page = 252;
$size = 252;

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

Errors

Method: updateChargeDueDate

Updates the due date from a charge

function updateChargeDueDate(
        $chargeId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getCharges

Lists all charges

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

Parameters

Example Usage

$page = 252;
$size = 252;
$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

Method: updateChargeCard

Updates the card from a charge

function updateChargeCard(
        $chargeId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getCharge

Get a charge from its id

function getCharge($chargeId)

Parameters

Example Usage

$chargeId = 'charge_id';

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

Errors

Method: cancelCharge

Cancel a charge

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

Parameters

Example Usage

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

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

Errors

Method: getChargesSummary

GetChargesSummary

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

Parameters

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

Method: retryCharge

Retries a charge

function retryCharge(
        $chargeId,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: createCharge

Creates a new charge

function createCharge(
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: confirmPayment

ConfirmPayment

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

Parameters

Example Usage

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

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

Errors

Back to List of Controllers

Class: RecipientsController

Get singleton instance

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

$recipients = $client->getRecipients();

Method: getTransfer

Gets a transfer

function getTransfer(
        $recipientId,
        $transferId)

Parameters

Example Usage

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

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

Errors

Method: updateRecipient

Updates a recipient

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

Parameters

Example Usage

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

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

Errors

Method: getRecipient

Retrieves recipient information

function getRecipient($recipientId)

Parameters

Example Usage

$recipientId = 'recipient_id';

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

Errors

Method: createAnticipation

Creates an anticipation

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

Parameters

Example Usage

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

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

Errors

Method: getAnticipations

Retrieves a paginated list of anticipations from a recipient

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

Parameters

Example Usage

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

Method: getAnticipationLimits

Gets the anticipation limits for a recipient

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

Parameters

Example Usage

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

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

Errors

Method: getRecipients

Retrieves paginated recipients information

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

Parameters

Example Usage

$page = 252;
$size = 252;

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

Errors

Method: createRecipient

Creates a new recipient

function createRecipient(
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getWithdrawById

GetWithdrawById

function getWithdrawById(
        $recipientId,
        $withdrawalId)

Parameters

Example Usage

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

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

Errors

Method: updateRecipientDefaultBankAccount

Updates the default bank account from a recipient

function updateRecipientDefaultBankAccount(
        $recipientId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: updateRecipientMetadata

Updates recipient metadata

function updateRecipientMetadata(
        $recipientId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: getTransfers

Gets a paginated list of transfers for the recipient

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

Parameters

Example Usage

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

Method: createTransfer

Creates a transfer for a recipient

function createTransfer(
        $recipientId,
        $body,
        $idempotencyKey = null)

Parameters

Example Usage

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

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

Errors

Method: createWithdraw

CreateWithdraw

function createWithdraw(
        $recipientId,
        $body)

Parameters

Example Usage

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

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

Errors

Method: getWithdrawals

Gets a paginated list of transfers for the recipient

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

Parameters

Example Usage

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

Method: updateAutomaticAnticipationSettings

Updates recipient metadata

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

Parameters

Example Usage

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

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

Errors

Method: getAnticipation

Gets an anticipation

function getAnticipation(
        $recipientId,
        $anticipationId)

Parameters

Example Usage

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

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

Errors

Method: updateRecipientTransferSettings

UpdateRecipientTransferSettings

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

Parameters

Example Usage

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

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

Errors

Method: getBalance

Get balance information for a recipient

function getBalance($recipientId)

Parameters

Example Usage

$recipientId = 'recipient_id';

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

Errors

Method: getRecipientByCode

Retrieves recipient information

function getRecipientByCode($code)

Parameters

Example Usage

$code = 'code';

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

Errors

Method: getDefaultRecipient

GetDefaultRecipient

function getDefaultRecipient()

Example Usage

$result = $recipients->getDefaultRecipient();

Errors

Back to List of Controllers

Class: TokensController

Get singleton instance

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

$tokens = $client->getTokens();

Method: createToken

Tags: Skips Authentication

CreateToken

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

Parameters

Example Usage

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

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

Errors

Method: getToken

Tags: Skips Authentication

Gets a token from its id

function getToken(
        $id,
        $publicKey,
        $appId = null)

Parameters

Example Usage

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

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

Errors

Back to List of Controllers

Class: TransactionsController

Get singleton instance

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

$transactions = $client->getTransactions();

Method: getTransaction

GetTransaction

function getTransaction($transactionId)

Parameters

Example Usage

$transactionId = 'transaction_id';

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

Errors

Back to List of Controllers

Class: TransfersController

Get singleton instance

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

$transfers = $client->getTransfers();

Method: getTransferById

GetTransferById

function getTransferById($transferId)

Parameters

Example Usage

$transferId = 'transfer_id';

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

Errors

Method: postCreateTransfer

CreateTransfer

function postCreateTransfer($body)

Parameters

Example Usage

$body = new CreateTransfer();

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

Errors

Method: getTransfers1

Gets all transfers

function getTransfers1()

Example Usage

$result = $transfers->getTransfers1();

Errors

Back to List of Controllers