YourMembership API PHP Library

0.2.2 2017-01-30 18:39 UTC

This package is not auto-updated.

Last update: 2020-07-11 04:58:42 UTC


Scrutinizer Code Quality Build Status Code Coverage

Your Membership API Client for PHP

This package in a work in progress, we currently use this package for development of an integration with YourMembership.

This package implements a PHP wrapper to work with

Laravel Installation (5.1+)

No Support for Versions below 5.1 (5.0 Untested)

Require this package with composer by adding the following to your composer file:

"require": {
    "phone2action/ym-api": "dev-master"
"repositories": [

            "type": "vcs",
            "url": ""

After updating composer, add the service provider to the providers array in config/app.php


You can publish the config file for this package

php artisan vendor:publish --provider="P2A\YourMembership\YourMembershipServiceProvider"



$client = app(P2A\YourMembership\YourMembershipClient::class,[$apiKey,$saPasscode]);


Instantiate the client

$guzzleClient = new \GuzzleHttp\Client();
$client = new P2A\YourMembership\YourMembershipClient($guzzleClient, $apiKey, $saPasscode)

Make API calls using this client

$response = $client->makeCall('Session.Create')->toArray();
echo $response['SessionID'];

$response = $client->makeCall('Session.Create')->toObject();
echo $response->SessionID;