Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
135 lines (97 sloc) 4.54 KB

Latest Version on Packagist Build Status Quality Score GitHub license Total Downloads

# Paystack Lite - Use Paystack Checkout Form on the go. Paystack Lite creates a blade directive you can include in your views. This is the easiest integration of paystack checkout form for Laravel applications.


  1. Install PaystackLite with composer
composer require stephenjude/paystack-lite
  1. if you are using Laravel less than 5.4 Add Stephenjude\PaystackLite\PaystackLiteServiceProvider::class to the providers array in your config/app.php.

  2. Open your .env file and add your public key, secret key, customer default email and payment url like so:



Paystack-lite make use of blade directive to abstract away all javascript configurations for setting up paystack checkout forms.

Paystack Popup Example

Include the Blade Directive (@paystack) somewhere in your template before your main application JavaScript is loaded.

The @paystack blade directive creates payWithPaystack(amount, email, meta, onPaymentCompleted, onPaymentCancelled) JavaScript helper which takes five parameters. the amount, customer email, meta data, callback for payment completed and callback when checkout form is closed.

    var amount = 1000;
    var email = '';
    var meta = {
        custom_fields: [
                display_name: "Name",
                variable_name: "name",
                value: "My Customer"

    document.getElementById('paymentBtn').onclick = function() {
        //display checkout form
        payWithPaystack(amount, email, meta, onPaymentCompleted, onPaymentCancelled);

    function onPaymentCompleted(response) {
        alert('payment completed!');

    function onPaymentCancelled() {
        alert('payment cancelled!');

Paystack Emebeded Example

Include the paystack embeded blade directive inside of your html container

        @paystackEmbeded(1000, 'onPaymentCompleted', '')

Add your javascript callback function

    function onPaymentCompleted(response) {
        alert('payment completed!');

Paystack Fluent APIs

This package makes use of bosunski/lpaystack package. So you can use all paystack fluent APIs provided in the package.


    use Stephenjude\PaystackLite\Facades\PaystackLite;

     * This gets all your transactions
     * This verifies a transaction with transaction reference passed as parameter

     * This  gets all your paystack customers.

     * This  gets all the plans that you have registered on Paystack

See the supported Paystack APIs here.


Please see CHANGELOG for more information what has changed recently.


If you discover any security related issues, please email instead of using the issue tracker.


The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.