Download the PHP package dawilly/laravel-clickpesa without Composer
On this page you can find all versions of the php package dawilly/laravel-clickpesa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dawilly/laravel-clickpesa
More information about dawilly/laravel-clickpesa
Files in dawilly/laravel-clickpesa
Package laravel-clickpesa
Short Description Laravel payment integration for Clickpesa
License MIT
Informations about the package laravel-clickpesa
Laravel Clickpesa Payment Integration
A comprehensive Laravel package for integrating Clickpesa payment gateway and disbursement services. Support for USSD Push payments, card payments, mobile money payouts, and bank transfers.
Features
- ✅ Payments: USSD Push, Card Payments
- ✅ Disbursements: Mobile Money Payouts, Bank Transfers (ACH/RTGS)
- ✅ Authentication: JWT token management with auto-refresh
- ✅ Payment Status: Query and track payment status
- ✅ Payout Status: Track disbursement transactions
- ✅ Sandbox & Live: Full support for both environments
- ✅ Error Handling: Comprehensive error documentation
- ✅ Facades: Clean, Laravel-style API
Installation
Configuration
Publishing Package Assets
The package provides the following publishable assets:
1. Publish Configuration File
Publishes config/clickpesa.php to your application's config directory.
2. Publish Database Migrations
Publishes database migrations to your database/migrations/ directory.
3. Publish All Assets
Publishes all package assets (config + migrations) at once.
Running Migrations
After publishing the migrations, run:
This creates the clickpesa_transactions and clickpesa_webhooks tables in your database.
Environment Configuration
Add to your .env:
Usage
1. Payment Operations
USSD Push Payments
Card Payments
Query Payment Status
2. Disbursement Operations
Mobile Money Payouts
Bank Payouts
Query Payout Status
Payment Callback
The package provides a callback endpoint at /clickpesa/callback. Configure this URL in your Clickpesa dashboard.
The callback dispatches a PaymentReceived event:
Status Values
Payment Status
PROCESSING- Payment initiated, awaiting customer confirmationSUCCESS- Payment completed successfullyFAILED- Payment failedSETTLED- Payment settled
Payout Status
AUTHORIZED- Payout authorized, processingSUCCESS- Payout completed successfullyREVERSED- Payout was reversed
Error Handling
All methods return consistent error responses:
Common Error Messages
Unauthorized- Invalid or expired tokenInvalid request parameters- Missing or invalid parametersOrder reference already used- Order reference must be uniqueInvalid Order Reference, should only contain alphanumeric characters- Order ref format invalidAccount has no payment collection methods- No payment methods configuredInvalid bank BIC code- Invalid bank BIC provided
Testing
Or with Laravel:
Requirements
- PHP ^8.0
- Laravel ^9.0|^10.0|^11.0
- GuzzleHTTP ^7.0
- Orchestra Testbench ^7.0|^8.0|^9.0 (for development)
License
MIT License. See LICENSE file for details.
Author
Dawilly gene
Support
For issues or feature requests, please visit the GitHub repository.
Refer to Clickpesa API Documentation for more details on the API specifications.
All versions of laravel-clickpesa with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0