Back to Top

Guide for Laravel eCommerce Stripe Payment Gateway

Updated 4 December 2025

Laravel eCommerce Stripe Payment Gateway module allows the customer to integrate Stripe payment gateway to their Laravel eCommerce Store. The customers can make payments through the card.

The admin can easily link the Bagisto store with Stripe payment gateway.

Customers can add their credit card details directly at checkout without leaving your site, creating a smoother experience for them and helping you achieve higher conversions.

Please Note – Before buying this module, you have to check whether this payment gateway is available for your country and currencies or not.

Check a brief overview of the plugin –  

Start your headless eCommerce
now.
Find out More
1MpuYQtPAyI

Features

  • The admin can Enable or Disable the extension.
  • The admin can set the Custom Description and Title for the payment method.
  • Select the Stripe payment method on the checkout page.
  • Provide a Secure payment method for the customer.
  • Admin can set the test key which will be used to test the payment gateway.
  • Admin can make a partial or a full refund.
  • Refund can also be created through stripe dashboard.
  • Accepts all the cards that stripe supports.
  • 3-D Secure.
  • PCI compliance.
  • Supports Refund for all product types.

Installation – Laravel eCommerce Stripe Payment Gateway

Unzip the respective extension zip and then merge “packages” and “public” folder into project root directory.

stripe module installation

Goto config/app.php file and add following line under ‘providers’.

Webkul\Stripe\Providers\StripeConnectServiceProvider::class,

Next, goto composer.json file and add following line under ‘psr-4’

"Webkul\\Stripe\\": "packages/Webkul/Stripe/src"

Goto app/Http/Middleware/VerifyCsrfToken.php file and add following line under ‘$except‘ variables

$except = [
    'stripe/*',
];

To set up an IPN (webhook) in Stripe, follow these steps:

  1. Go to the Stripe Dashboard and log in.
  2. Navigate to Developers → Webhooks.
  3. Click Add endpoint.
  4. Select the event – Charge → charge.refunded
  5. Click Continue
  6. Enter your webhook endpoint URL in the given below format and click Create endpoint
{your-domain}\stripe\webhook

select charged.refunded

To install the Stripe php library run the command below:

composer require stripe/stripe-php:16.2

Run the command below to install the laravel cashier:

composer require laravel/cashier

Run these commands below to complete the setup:

composer dump-autoload
php artisan stripe:install

Initial Configuration – Settings

Once you successfully execute the commands, you will see the Stripe Payment by navigating through Configure->Payment Methods->Stripe Payment.

stripe-configurations-1
stripe-configurations-2

Here, the store admin will be able to configure the initial settings –

  • Status:- Enable or disable this module by using the toggle button.
  • Title:- Set the title which will be displayed on the front end for the payment method at checkout.
  • Description:- Enter the description which they want to show on the checkout page for the stripe payment method.
  • Choose Logo :- Add logo for the stripe payment gateway.
  • Debug:- Choose the debug mode as – Sandbox or production for testing purposes.
  • API Secret Key:- Before set up your API keys,make sure you’ve set up your webhook endpoint.Then, go to the Stripe Dashboard (Live) where you’ll find your Publishable Key and Secret Key.Copy the Secret Key and add it under “API Key”.
  • API Publishable Key:- Similarly, copy the API Publishable Key paste it under API Publishable Key.
  • Test Publishable Key:- Set the API Test Publishable(development) key so that this module will be used for Testing.Before set up your API keys,make sure you’ve set up your webhook endpoint.Then, go to the Stripe Dashboard (Test) where you’ll find your Test Publishable Key and Test Secret Key.Copy the Test Publishable Key and add it under “API Test Publishable Key“.
  • API Test Secret Key:- Simalarly copy the API Test Secret key (development) so that this module will be used for Testing.
  • Sort Order:- Set the sort order so that the payment method will appear on the payment page according to the entered sort order.

After setting all configuration, click on Save button.

Storefront Workflow – Laravel eCommerce Stripe Payment Gateway

Once you have successfully added the product in your cart, tap the Continue to Checkout button.

stripe-checkout-1

Now, select the shipping address and tap Confirm button.

stripe-checkout-2

After that, select the Stripe payment method under the payment methods section, and tap the confirm button.

stripe-checkout-3

After selecting the Stripe payment method, the customer can click on the Placed Order button.

Then the customer will be redirected to the stripe payment page, here they have to fill in their card detail and click on Pay Now.

stripe-checkout-4

On the other hand, customers save the card details for future payments with the saved cards.

card-deatils

After successful payment, they will get the order ID.

Order-successful

Also, If you want to display a personalized checkout message with their Order ID on the checkout page to your customers then you can check Larvel Order Checkout AI Message.

The customers can check order status and the selected payment gateway in their order history.

customer-order-section

Customers can also check the selected payment method in their order invoice.

invoice details

Order Details – Admin Backend

The admin can view the respective orders and can see the chosen payment method for the orders.

admin-order-section

Apart from that, the admin can see the selected payment gateway for an order by opening the same.

customer-order-details-section

Refund Process

From the Bagisto admin panel the admin can navigate to the respective order and tap the Refund button at the top.

admin-order-completion

After that, the admin will have to select the quantity for each product in order for return, and tap Refund button thereafter.

admin-refunding

The refund gets created successfully.

admin-refund-list

After the refund is done by the admin, customer can view the refund details for the respective order.

customer-refund-details

The admin can also log in to the stripe dashboard and view the refund details.

refund details on stripe dashboard.

The admin can also, view the payments for the orders done via stripe payment gateway on the Strip dashboard.

new payment details

Here, on the stripe dashboard, the admin can also generate a refund for the order payment.

stripe dashboard payment refund

Support

That’s all for the Laravel eCommerce Stripe Payment Gateway, still, have any issue feel free to add a ticket and let us know your views to make the module better at bagisto.uvdesk.com

Current Product Version - 2.2.2

Supported Framework Version - Bagisto 2.2.2

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


3 comments

  • Jaswinder Singh
    • saurav pathak (Moderator)
    • saurav pathak (Moderator)
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Guide for Laravel eCommerce Stripe Payment Gateway