Download the PHP package dominservice/laravel-stripe without Composer

On this page you can find all versions of the php package dominservice/laravel-stripe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-stripe

Laravel Stripe

Laravel Stripe integrates Checkout Sessions, refunds, webhook signature verification and Stripe Connect onboarding into Laravel applications.

Developed by Mateusz Domin at Domin Software. The current release line is used in the DominPress stack.

Packagist Latest Version Total Downloads

Key Features

Requirements

Current 2.x compatibility target: Laravel 13.32+ on PHP 8.3+. Laravel 10–12 and Stripe PHP SDK 13 remain available through the previous 1.x release line.

Stripe PHP SDK 21 pins a newer Stripe API version. Test checkout, subscriptions, invoice previews and webhooks in Stripe test mode before deploying this major upgrade.

SDK 21 replaced the upcoming-invoice endpoints with invoice previews. Use $stripe->invoices()->preview() and previewLines(). The old upcoming() and upcomingLines() package methods remain as deprecated aliases so existing DominPress code can be migrated without a flag day.

Installation

For local testing, add your Stripe test credentials and the signing secret for your test endpoint to .env.

Publish config:

Publish migrations:

Run migrations:

Quick Start

Create a Price in Stripe test mode and copy its ID. Replace the example URLs with routes in your application.

The URL opens Stripe's hosted test checkout. Use the verified webhook to confirm payment status in your application.

Configuration

Main configuration file:

Important sections:

Allowed currencies

If your application only supports specific currencies, list them in:

If a currency is not declared there, helper validation will reject it.

User model mapping

Check whether the package config matches your project:

Webhooks

Attach the middleware stripe.verify:{name} to routes that receive Stripe webhook calls.

Example:

{name} maps to:

Basic Usage

Create a customer

Create a product with price

Create a Checkout Session

Stripe Checkout Support

The package allows passing Stripe Checkout parameters such as:

These are handled in the Checkout Session repository and forwarded to Stripe if valid.

Currency Helpers

Currency normalization uses Data Locale Parser.

Normalize currency code

Validate and normalize amount

The helper:

Payment Methods by Country

The package contains a helper that can build manual payment_method_types for Stripe Checkout.

Another example:

What the helper currently does

It:

Current optional third argument

Supported context keys:

This third argument is optional. If you do not pass it, older integrations keep working as before.

Payment Method Policies

The policy layer is configured in:

It is optional by design. If you leave it empty, the helper falls back to country + currency only.

1. Allowed methods for project / business type

If your project prefers business_type naming, the package also supports:

2. Forbidden methods for project / business type

The same alias exists for:

3. Forbidden methods for customer type

By default the package excludes klarna for:

because Klarna does not support B2B flows in the same way as private consumer checkout.

4. Forbidden MCC by payment method

The package now ships with a default MCC restriction map for p24, based on the current Stripe documentation.

This matters especially for projects in categories such as:

The restriction list is configurable, so the host project can override or extend it.

5. Forbidden methods by MCC / branch

If the host project prefers a category-first policy view instead of the method-first forbidden_mcc_by_method, it can also define:

Both policy styles can coexist. The helper merges them.

Backward compatibility

All policy layers are optional:

This keeps older integrations working without forced refactors.

Stripe Connect

The package supports the base repositories required for Stripe Connect onboarding:

Typical platform flow:

For marketplace split payments handled on the platform account, create Checkout Sessions with:

Notes for DominPress-family Projects

This package is already useful for:

For projects with strongly regulated payment availability, the host application should pass:

That gives the helper enough context to avoid showing methods that should not be available.

Recommended Host-Project Strategy

For Checkout-based implementations:

  1. collect billing country in the public form,
  2. determine presentment currency before session creation,
  3. pass customer_type if the checkout distinguishes private vs company,
  4. pass mcc or project_type if the business has method restrictions,
  5. build payment_method_types through PaymentHelper::getPaymentMethodsByCountry(...).

This is especially relevant when a single codebase serves:

Support

Report package issues on GitHub.

If this package helps you, you can buy me a coffee to support its maintenance.

Buy me a coffee on Ko-fi

License

MIT


All versions of laravel-stripe with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
dominservice/data_locale_parser Version ^3.0.3|^4.0
illuminate/console Version ^13.32
illuminate/contracts Version ^13.32
illuminate/database Version ^13.32
illuminate/http Version ^13.32
illuminate/queue Version ^13.32
illuminate/routing Version ^13.32
illuminate/support Version ^13.32
psr/log Version ^3.0
stripe/stripe-php Version ^21.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dominservice/laravel-stripe contains the following files

Loading the files please wait ...