andriichuk / laravel-billing-bluesnap
Official BlueSnap driver for andriichuk/laravel-billing.
Package info
github.com/andriichuk/laravel-billing-bluesnap
pkg:composer/andriichuk/laravel-billing-bluesnap
Requires
- php: ^8.5
- ext-json: *
- andriichuk/bluesnap-php-sdk: ^0.2
- andriichuk/laravel-billing: ^0.2
- illuminate/config: ^13.0
- illuminate/console: ^13.0
- illuminate/contracts: ^13.0
- illuminate/support: ^13.0
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nyholm/psr7: ^1.8
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-28 14:42:45 UTC
README
The official BlueSnap driver for andriichuk/laravel-billing, powered by the framework-agnostic andriichuk/bluesnap-php-sdk.
Requirements
- PHP 8.5+
- Laravel 13
- A PSR-18 HTTP client and PSR-17 request/stream factories bound in Laravel's container
- BlueSnap API credentials and a webhook security-header secret
- A BlueSnap merchant ID when using Hosted Payment Page checkout
Installation
composer require andriichuk/laravel-billing-bluesnap php artisan vendor:publish --tag=billing-bluesnap-config
Select the driver in config/billing.php:
'default' => env('BILLING_DRIVER', 'bluesnap'), 'drivers' => [ 'bluesnap' => config('billing-bluesnap'), ],
The package does not force an HTTP implementation. Bind your application's PSR-18 client and PSR-17 factories to Psr\Http\Client\ClientInterface, Psr\Http\Message\RequestFactoryInterface, and Psr\Http\Message\StreamFactoryInterface.
Credentials are validated only when the bluesnap driver is resolved, so discovery, route listing, and configuration caching remain usable without live secrets.
Usage
All portable operations use the core contracts. BlueSnap-only features are exposed by BlueSnapDriver:
use Andriichuk\LaravelBilling\Billing; use Andriichuk\LaravelBillingBlueSnap\BlueSnapDriver; $driver = Billing::driver('bluesnap'); assert($driver instanceof BlueSnapDriver); $token = $driver->hostedFields()->createToken(); $paymentMethod = $token->toPaymentMethodReference(); $checkoutUrl = $driver->hostedCheckoutUrl([ 'plan_id' => 3173219, 'return_url' => route('billing.bluesnap.return'), 'merchant_transaction_id' => 'subscription-42', 'email' => 'ada@example.com', ]);
The driver supports vaulted shoppers, subscriptions and trials, Hosted Payment Page checkout, plan and quantity changes, cancellation modes, transactions, refunds, payment-method updates, signed webhooks, subscription sweep reconciliation, and targeted reconciliation. It intentionally does not advertise pausing, usage billing, provider-independent proration, invoices, automatic tax, or metered billing.
See the configuration, customers, subscriptions, Hosted Payment Pages, payment sources, webhooks, reconciliation, and migration guide.
Quality
composer check
License
MIT