Download the PHP package statum/statum-php-sdk without Composer

On this page you can find all versions of the php package statum/statum-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package statum-php-sdk

Statum PHP SDK (SMS, Airtime, & Accounts)

PHP Version Latest Stable Version License

Official PHP SDK for Statum APIs. Built for secure, production-grade enterprise usage with strict typing, immutable DTOs, and framework-agnostic Guzzle HTTP integrations. Easily send SMS alerts, automate airtime disbursements, and query real-time account balances.


Table of Contents


Features


Getting Started

  1. Sign up for a Statum account: app.statum.co.ke
  2. Get your API credentials: Retrieve your Consumer Key and Consumer Secret from the Statum Dashboard.
  3. Read the full API documentation: docs.statum.co.ke
  4. Install the SDK: Follow the Installation guidelines below.

Installation

Install the package via Composer:


Quick Start in 2 Minutes

Ensure your credentials are saved in your .env or system environment:

1. Plain PHP Setup

2. Laravel Setup

The SDK supports package auto-discovery in Laravel. To configure it, publish the configuration file:

This will create a config/statum.php file. You can configure your credentials via your .env file:

Now type-hint StatumClient in any controller or job to inject the initialized client:


Core Integration Examples

Account Details

Fetch organization profile, available balances, and service configuration:

Sending SMS

Send transactional or promotional SMS alerts to a recipient phone number:

Disbursing Airtime

Disburse airtime rewards or incentives (supports amounts from KES 5 to KES 10,000):


Error & Exception Handling

The SDK maps HTTP responses to concrete exception classes that inherit from Statum\Sdk\Exceptions\ApiException.


API JSON Payload Specifications

Here are the wire-level JSON schemas transmitted and returned by the APIs under the hood:

1. SMS API

JSON Request
JSON Response (Success - 200)

2. Airtime API

JSON Request
JSON Response (Success - 200)

3. Account Details API

JSON Response (Success - 200)

Integration Guidelines & Gotchas

  1. Sender ID Approval: SMS requests will throw an HTTP 422 ValidationException if the senderId is not registered and approved under your Statum account profile.
  2. Phone Number Formatting: Ensure phone numbers are passed in the international format (with or without + prefix), e.g. 254721553678 or +254721553678.
  3. Airtime Limits: Airtime amounts must be passed as strings (e.g. '100') and must fall strictly within the KES 5 to KES 10,000 range per transaction.

Running Tests

Ensure PHPUnit is configured and run:


License

This project is licensed under the MIT License. See LICENSE for details.


All versions of statum-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package statum/statum-php-sdk contains the following files

Loading the files please wait ...