Introduction to MassPay PHP SDK

MassPay's PHP SDK is a library that allows you to easily integrate MassPay Global Payout Services into your PHP applications. With MassPay's PHP SDK, you can build custom Payout solutions that meet your specific needs, whether it's for e-commerce, online marketplaces, or any other type of application that requires payout orchestration / payout processing.

The MassPay PHP SDK offers a wide range of features, including support for various payout methods, flexible payout options, and advanced security features. You can use the SDK to create custom integrations that work seamlessly with your existing applications.

Getting started with MassPay PHP SDK is easy. The SDK comes with detailed documentation and sample code that can help developers quickly get up to speed.

👍

You can find the SDK here.

📘

Additionally, the MassPay developer portal provides access to comprehensive documentation, support, and resources to help developers build and deploy your global payout solutions.


Prerequisites

  • Basic knowledge of PHP: To use the MassPay PHP SDK, you should have a basic understanding of PHP programming language and its syntax.
  • API credentials: To use the MassPay PHP SDK, you will need to obtain API credentials from your MassPay account. You can find the API credentials in the MassPay Developer Portal.
  • PHP version: You should have PHP version 8.0 or later installed on your system.
  • Composer: You will need to have Composer installed on your system to manage the dependencies required by the MassPay PHP SDK. You can download and install Composer from the official website.

Composer Installation

  1. To install the MassPay PHP SDK with Composer, simply add the following line to your composer.json file:
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/masspayio/masspay-php-sdk.git"
    }
  ],
  "require": {
    "masspayio/masspay-php-sdk": "^3.0.0"
  }
}

  1. Then run composer install command.

Authentication

Before you can use the MassPay PHP SDK, you will need to obtain your MassPay API credentials, which include your API key. You can find your API credentials in your MassPay account settings.


Usage

Once you've installed and authenticated yourself in the SDK, you're ready to start using it to make MassPay API requests. Here's an example of how to use the SDK to get an account balance request:

<?php

require_once(__DIR__ . '/vendor/autoload.php');

use MasspaySdk\Client;
use MasspaySdk\Config\ApiConfig;

$config = new ApiConfig();
$config->bearer_token = 'YOUR_BEARER_TOKEN';

$client = new Client($config);
try {
  $result = $client->account->getAccountBalance();
  var_dump($result);
} catch (Exception $e) {
  var_dump($e);
}

🚧

Make sure your Authentication credentials are filled in correctly.


More?

In conclusion, the MassPay PHP SDK provides a simple and powerful way to integrate MassPay's payout services into your PHP applications. With the SDK, you can easily send payouts to multiple recipients across various payout methods, all with just a few lines of code.

👍

If you are missing the SDK in another language or have any other questions, please don't hesitate to contact us for assistance. We are here to help you!