paymint / paymint-php
There is no license information available for the latest version (v1.0.1) of this package.
The official Core PHP SDK for PayMint Africa
v1.0.1
2026-06-26 11:21 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0
README
The official PHP SDK for PayMint Africa. This SDK allows you to easily integrate PayMint's powerful virtual accounts and secure webhooks into any core PHP application.
Installation
Install the package via Composer:
composer require paymint/paymint-php
Requirements
- PHP 8.1 or higher
- Composer
Usage
Initialize the PayMintClient with your PayMint Secret Key.
require 'vendor/autoload.php'; use PayMint\PayMintClient; // 1. Initialize the SDK $paymint = new PayMintClient('sk_live_your_secret_key'); // 2. Create a Virtual Account $response = $paymint->virtualAccounts()->create([ 'name' => 'John Doe', 'email' => 'john@example.com', 'phone' => '08012345678', 'bvn' => '12345678901' // Optional depending on your strict compliance settings ]); print_r($response);
Webhook Signature Verification
When receiving webhooks (like when a customer transfers money to a virtual account), you must verify the signature to ensure the request actually came from PayMint and wasn't spoofed by a hacker.
The SDK makes this effortless:
$payload = file_get_contents('php://input'); $signature = $_SERVER['HTTP_X_PAYMINT_SIGNATURE'] ?? ''; // Verify the signature securely if (!$paymint->webhooks()->verifySignature($payload, $signature)) { http_response_code(401); die('Invalid signature detected.'); } // Process webhook safely! echo "Webhook verified successfully!";
License
MIT License