A fully-featured PHP SDK for the Macropay API.

Quickstart

Terminal
composer require macropay/sdk
declare(strict_types=1);

require 'vendor/autoload.php';

use Macropay;

$sdk = Macropay\Macropay::builder()
    ->setSecurity('<YOUR_BEARER_TOKEN_HERE>')
    ->build();

$responses = $sdk->organizations->list(
    page: 1,
    limit: 10
);

foreach ($responses as $response) {
    if ($response->statusCode === 200) {
        // handle response
    }
}
Read more

Sandbox Environment

You can configure the SDK so it hits the sandbox environment instead of the production one. You just need to set the server when building the client:
$sdk = Macropay\Macropay::builder()
    ->setServer('sandbox')
    ->setSecurity('<YOUR_BEARER_TOKEN_HERE>')
    ->build();