Download the PHP package binkode/laravel-paystack without Composer
On this page you can find all versions of the php package binkode/laravel-paystack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-paystack
Laravel Paystack
Laravel wrapper for the Paystack API, built for direct use in controllers, services, and queued jobs.
Features
- Covers a broad set of Paystack endpoints (transactions, customers, transfers, plans, subscriptions, disputes, refunds, and more).
- Optional built-in HTTP routes for quick API proxying from your Laravel app.
- Built-in webhook route with signature validation and event dispatching.
- Compatible with Laravel
10,11, and12.
Installation
Laravel package auto-discovery will register the service provider and facade alias automatically.
Configuration
Publish config:
Set your credentials in .env:
Default config (config/paystack.php):
Quick Usage
Call support classes directly:
Available Support Classes
ApplePayBulkChargeChargeControlPanelCustomerDedicatedVirtualAccountDisputeInvoiceMiscellaneousPagePlanProductRecipientRefundSettlementSplitSubAccountSubscriptionTransactionTransferTransferControlVerification
See class methods in src/Support/*.
Built-In Routes
The package registers route definitions from src/routes.php. By default, API routes are disabled through the paystack_route_disabled middleware.
To enable built-in routes, remove paystack_route_disabled from paystack.route.middleware in config/paystack.php.
Default route prefix is api, so endpoints resolve like:
POST /api/transaction/initializeGET /api/transaction/verify/{reference}POST /api/customer
Webhooks
Webhook endpoint:
POST /api/hooks(route is registered asRoute::any, but Paystack should call it withPOST)
Incoming webhook requests are validated by the validate_paystack_hook middleware using your PAYSTACK_SECRET_KEY.
Each valid incoming webhook dispatches the Binkode\Paystack\Events\Hook event.
Create a listener:
Example listener:
Testing
Useful Links
Contributing
Please read CONTRIBUTING.md.
Security
If you discover any security-related issues, email [email protected] instead of opening a public issue.
License
Released under the MIT License.