PHPackages                             kwhorne/wirement-vipps - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. kwhorne/wirement-vipps

ActiveLibrary[Payment Processing](/categories/payments)

kwhorne/wirement-vipps
======================

Laravel package for Vipps/MobilePay payment integration

v1.0.0(10mo ago)1541[4 PRs](https://github.com/kwhorne/wirement-vipps/pulls)MITPHPPHP ^8.1CI passing

Since Jul 6Pushed 1mo agoCompare

[ Source](https://github.com/kwhorne/wirement-vipps)[ Packagist](https://packagist.org/packages/kwhorne/wirement-vipps)[ Docs](https://github.com/kwhorne/wirement-vipps)[ GitHub Sponsors](https://github.com/:vendor_name)[ RSS](/packages/kwhorne-wirement-vipps/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (5)Used By (0)

Wirement Vipps
==============

[](#wirement-vipps)

[![Latest Version on Packagist](https://camo.githubusercontent.com/68cbd617ad19770ecee899ed6c19de4f12239e5655d533787a0cba9f68c25da0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b77686f726e652f776972656d656e742d76697070732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwhorne/wirement-vipps)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7d6d37143fa271a36760a27000c2776befb53f6480157eabe4aa386f550c11a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b77686f726e652f776972656d656e742d76697070732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kwhorne/wirement-vipps/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2d7d99fb3e7f7cbaf4776dfbd025651bf08be1a5168f820118c7baabc643a8d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b77686f726e652f776972656d656e742d76697070732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/kwhorne/wirement-vipps/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/12b94c45f999a8272e57737c39d4a54bbbc260eb549f42be49d2159090ddcd91/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b77686f726e652f776972656d656e742d76697070732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwhorne/wirement-vipps)

A Laravel package for Vipps/MobilePay payment integration designed for Laravel applications using Flux UI, Livewire, TailwindCSS, and Filament. This package provides a seamless integration with Vipps and MobilePay payment services.

Features
--------

[](#features)

- 🚀 **Easy Setup**: Simple configuration and installation
- 💳 **Payment Creation**: Create Vipps payments with ease
- 🔐 **Token Management**: Automatic token refresh and caching
- 📡 **Webhook Support**: Easy webhook setup with Artisan command
- 🏗️ **Laravel Integration**: Full Laravel ecosystem support
- ⚡ **Flux UI Compatible**: Designed for Laravel Flux projects
- 🔴 **Livewire Ready**: Includes Livewire component examples
- 📊 **Filament Integration**: Ready-to-use Filament resources
- 🏛️ **Modern Architecture**: Clean, service-oriented design
- ⚙️ **Comprehensive Config**: All options in one config file

Requirements
------------

[](#requirements)

- PHP ^8.1
- Laravel ^10.0||^11.0||^12.0
- GuzzleHttp ^7.0
- Carbon ^2.0||^3.0

Configuration
-------------

[](#configuration)

Add the following variables to your `.env` file:

```
VIPPS_CLIENT_ID=your_client_id
VIPPS_CLIENT_SECRET=your_client_secret
VIPPS_MERCHANT_SERIAL_NUMBER=your_merchant_serial_number
VIPPS_SUBSCRIPTION_KEY=your_subscription_key
VIPPS_CURRENCY=NOK
VIPPS_API_URL=https://apitest.vipps.no # For testing
# VIPPS_API_URL=https://api.vipps.no # For production
VIPPS_RETURN_URL=https://your-site.com/payment/callback
VIPPS_WEBHOOK_ID=your_webhook_id
VIPPS_WEBHOOK_SECRET=your_webhook_secret
```

### Create Webhook

[](#create-webhook)

To create a webhook, use the Artisan command:

```
php artisan vipps:webhook
```

This will guide you through the webhook creation process and provide you with the webhook ID and secret to add to your `.env` file.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kwhorne/wirement-vipps
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="wirement-vipps-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="wirement-vipps-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="wirement-vipps-views"
```

Usage
-----

[](#usage)

### Basic Payment Creation

[](#basic-payment-creation)

```
use Wirement\Vipps\Services\PaymentService;

// Create a payment using the service
$paymentService = new PaymentService();
$paymentUrl = $paymentService->generatePaymentLink(
    10000, // Amount in øre (100 NOK)
    'order-123' // Invoice/Order number
);

// Redirect user to payment URL
return redirect()->to($paymentUrl);
```

### Payment with Order Lines

[](#payment-with-order-lines)

```
use Wirement\Vipps\Services\PaymentService;

$orderlines = [
    [
        'id' => '1',
        'name' => 'Product name',
        'quantity' => 1,
        'price' => 100, // Price in NOK
        'vat' => 0.25, // 25% VAT
    ],
];

$paymentService = new PaymentService();
$paymentUrl = $paymentService->generatePaymentLink(
    10000, // Amount in øre
    'order-123', // Invoice number
    $orderlines // Optional order lines
);
```

### Using with Livewire

[](#using-with-livewire)

```
use Livewire\Component;
use Wirement\Vipps\Services\PaymentService;

class PaymentComponent extends Component
{
    public function createPayment()
    {
        $paymentService = new PaymentService();
        $paymentUrl = $paymentService->generatePaymentLink(
            5000, // 50 NOK in øre
            'order-' . time() // Invoice number
        );

        return redirect()->to($paymentUrl);
    }
}
```

### Using with Filament

[](#using-with-filament)

```
use Filament\Resources\Resource;
use Wirement\Vipps\Services\PaymentService;

// In your Filament resource
Tables\Actions\Action::make('create_payment')
    ->label('Create Vipps Payment')
    ->action(function ($record) {
        $paymentService = new PaymentService();
        $paymentUrl = $paymentService->generatePaymentLink(
            $record->total * 100, // Convert to øre
            (string) $record->id // Invoice number
        );

        $record->update(['vipps_url' => $paymentUrl]);
    })
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Knut Horne](https://github.com/kwhorne)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance75

Regular maintenance activity

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/362afbebb94f0b56f0c5c8aec9c578ef696104621bf24733b89ede9ab670bc2a?d=identicon)[gets](/maintainers/gets)

---

Top Contributors

[![kwhorne](https://avatars.githubusercontent.com/u/11035264?v=4)](https://github.com/kwhorne "kwhorne (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![vfineide](https://avatars.githubusercontent.com/u/12016164?v=4)](https://github.com/vfineide "vfineide (1 commits)")

---

Tags

laravelpaymentintegrationvippsmobilepaywirement

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kwhorne-wirement-vipps/health.svg)

```
[![Health](https://phpackages.com/badges/kwhorne-wirement-vipps/health.svg)](https://phpackages.com/packages/kwhorne-wirement-vipps)
```

###  Alternatives

[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[codebar-ag/laravel-flysystem-cloudinary

Cloudinary Flysystem v1 integration with Laravel

1224.9k2](/packages/codebar-ag-laravel-flysystem-cloudinary)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
