Search by

spanu18 / laravel-pay

Multi-gateway payment processing for Laravel — Stripe, SumUp, Adyen, PayPal, Mollie, Klarna and more.

Maintainers

Package info

github.com/Spanu18/laravel-pay

pkg:composer/spanu18/laravel-pay

Transparency log

Fund package maintenance!

laravel-pay

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v0.1.0 2026-09-06 16:14 UTC

This package is auto-updated.

Last update: 2026-09-06 16:16:34 UTC


README

Laravel Pay

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

Multi-gateway payment processing for Laravel. Laravel Pay provides a uniform interface over a large set of payment gateways so you can accept payments without rewriting your integration for each provider.

Installation

You can install the package via Composer:

composer require spanu18/laravel-pay

You may publish all of the package's resources at once:

php artisan vendor:publish --tag="laravel-pay"

Or, you may publish each resource individually:

Publishing the Configuration File

php artisan vendor:publish --tag="laravel-pay-config"

Publishing and Running the Migrations

php artisan vendor:publish --tag="laravel-pay-migrations"
php artisan migrate

Publishing the Views

php artisan vendor:publish --tag="laravel-pay-views"

Publishing the Translations

php artisan vendor:publish --tag="laravel-pay-lang"

Publishing the Public Assets

php artisan vendor:publish --tag="laravel-pay-assets"

Usage

Laravel Pay exposes a uniform contract over all supported gateways. Each gateway is a service in the container and implements PaymentGatewayInterface, so the calling code barely changes from gateway to gateway.

Resolve a gateway

use LaravelPay\LaravelPay\Gateways\Stripe;
use LaravelPay\LaravelPay\Gateways\Sumup;

// Gateway instances are resolved through the container/DI.
$stripe = app(Stripe::class);
$sumup  = app(Sumup::class);

Create a payment

use LaravelPay\LaravelPay\DTO\MerchantAccount;
use LaravelPay\LaravelPay\DTO\PayerContact;
use LaravelPay\LaravelPay\DTO\PaymentRequest;

$payment = new PaymentRequest(
    amount: 49.00,
    currency: 'EUR',
    to: new MerchantAccount(
        credentials: ['access_token' => '...'],   // gateway-specific
        merchantId: 'acct_...',                    // gateway-specific
    ),
    locale: 'it-IT',
    purchaseCountry: 'IT',
    from: new PayerContact(name: 'Mario', email: 'mario@example.com'),
    orderRef: 42,
);

$result = $sumup->createPayment($payment);

if ($result->success) {
    // $result->clientSecret is a hosted checkout URL / client secret to
    // send to your front-end to redirect the payer.
    return redirect($result->clientSecret);
}

Refund and inspect a checkout

$sumup->refundPayment($result->transactionId, $credentials, 49.00);

$checkout = $sumup->getCheckout($result->transactionId, $credentials);
if ($checkout && $checkout->status === 'paid') {
    // fulfill the order
}

Configure gateways

Gateways read their credentials from the package config, which you publish and edit:

php artisan vendor:publish --tag="laravel-pay-config"
# edit config/laravel-pay.php and set the env vars / keys for each gateway

Supported gateways

Adyen, Axerve, Binance Pay, Braintree, Coinbase, Edenred, Klarna, Mollie, Nexi, PayPal, Pluxee, Revolut, Satispay, Scalapay, Stripe, SumUp.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Laravel Pay! Please review our contributing guide to get started.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Laravel Pay is open-sourced software licensed under the MIT license.