Salami Gateway

API Documentation
Back to Dashboard

SDK Reference

Salami Gateway includes standalone PHP SDKs for each payment provider. These SDKs handle authentication, HTTP communication, and API operations independently of Laravel, making them reusable across projects.

Architecture

[Standalone SDK]                [laravel-payments Driver]         [Salami Module]
packages/mpesa/MpesaClient  --> Drivers/Mpesa/Ke/*/Driver.php --> modules/payments
packages/coop/CoopClient    --> Drivers/Coop/Ke/*/Driver.php  --> (config, views, routes)
packages/jenga/JengaClient  --> Drivers/EquityBank/Ke/*/Driver
packages/airtel/AirtelClient -> Drivers/Airtel/Ke/*/Driver

Each SDK follows the same pattern:

Component Purpose
Client Facade class with methods for each API operation
Config Reads from Laravel config or accepts raw arrays
Authenticator OAuth2 / JWT token management with in-memory caching
HttpClient cURL-based HTTP (no Guzzle dependency)
Operations/ One class per API endpoint
Exceptions/ Typed exceptions for auth, validation, API errors
ServiceProvider Laravel auto-discovery, config publishing

Available SDKs

Package Namespace Provider Operations
deadangroup/mpesa DGL\Mpesa Safaricom M-Pesa (DARAJA) 9
deadangroup/coop DGL\Coop Co-operative Bank of Kenya 12
deadangroup/jenga DGL\Jenga Equity Bank (Jenga HQ) 30+
deadangroup/airtel DGL\Airtel Airtel Money Kenya 7

Quick Start

All SDKs work the same way:

use DGL\Coop\CoopClient;

// Pass config directly (standalone usage)
$client = new CoopClient([
    'consumer_key' => '...',
    'consumer_secret' => '...',
    'account_number' => '...',
    'is_sandbox' => true,
]);

// Or let it read from Laravel config('coop')
$client = new CoopClient();

// Call operations
$response = $client->stkPush([
    'PhoneNumber' => '254712345678',
    'Amount' => 1000,
]);

Common Headers & Auth

SDK Auth Method Token Lifetime
M-Pesa Basic Auth -> Bearer token ~3600s
Co-op Bank Basic Auth -> Bearer token ~3500s
Jenga (Equity) Merchant code + API key -> JWT ~3500s
Airtel Money client_credentials -> Bearer token 180s

Signature Requirements


Need help? Contact us at support@dgl.co.ke
© 2026 Deadan Group Limited. All rights reserved.
⚡ API Explorer
LIVE
// Response will appear here...