PHPackages                             netbums/laravel-quickpay - 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. netbums/laravel-quickpay

ActiveLibrary[Payment Processing](/categories/payments)

netbums/laravel-quickpay
========================

A fluent api around the quickpay api for Laravel applications

v0.2.0-alpha(1y ago)22643[3 PRs](https://github.com/mortenebak/laravel-quickpay/pulls)MITPHPPHP ^8.2CI passing

Since Jan 11Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/mortenebak/laravel-quickpay)[ Packagist](https://packagist.org/packages/netbums/laravel-quickpay)[ Docs](https://github.com/netbums/laravel-quickpay)[ GitHub Sponsors](https://github.com/Netbums)[ RSS](/packages/netbums-laravel-quickpay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (12)Versions (12)Used By (0)

A fluent api around the quickpay api for Laravel applications
=============================================================

[](#a-fluent-api-around-the-quickpay-api-for-laravel-applications)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4ffa1df74b13ffae19692f8f701b98cdb0c2480ab65ef5a8e93d0f080f486932/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657462756d732f6c61726176656c2d717569636b7061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/netbums/laravel-quickpay)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7163a1c3915a3950d644af6ea670723988396c9d682e2e23ca3ad76a28508b42/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f7274656e6562616b2f6c61726176656c2d717569636b7061792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mortenebak/laravel-quickpay/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c1d7bc18ef6b7334de3ec117743a2f52ff25c9b43524b887f12b381c3fa82d29/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f7274656e6562616b2f6c61726176656c2d717569636b7061792f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mortenebak/laravel-quickpay/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9eca9bf077b1ffb14cafc54e219e20eb82794d4449b985e8e530896c5fa17f40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e657462756d732f6c61726176656c2d717569636b7061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/netbums/laravel-quickpay)

This laravel package will help you utilize the Quickpay API Client, without knowing too much about the endpoints. It provides a fluent api for using the API. See examples below.

Support me
----------

[](#support-me)

[Consider supporting me by sponsoring my work](https://github.com/sponsors/mortenebak/)

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

[](#installation)

1. You can install the package via composer:

```
composer require netbums/laravel-quickpay
```

2. Publish the config file with:

```
php artisan vendor:publish
```

Search for "quickpay", and publish both the **config** and `Netbums\Quickpay\QuickpayServiceProvider`

This is the contents of the published config file:

```
// config/quickpay.php
return [
    'api_key' => env('QUICKPAY_API_KEY'),
    'login' => env('QUICKPAY_LOGIN'),
    'password' => env('QUICKPAY_PASSWORD'),
    'merchant_id' => env('QUICKPAY_MERCHANT_ID'),
];
```

3. Add the environment variables to your `.env` file:

```
QUICKPAY_API_KEY=
```

And alternatively, you can add the following environment variables to your `.env` file instead of the `QUICKPAY_API_KEY`:

```
QUICKPAY_LOGIN=
QUICKPAY_PASSWORD=
QUICKPAY_MERCHANT_ID=
```

---

Usage
-----

[](#usage)

### Payments

[](#payments)

#### Get all payments

[](#get-all-payments)

```
use \Netbums\Quickpay\Facades\Quickpay;

$payments = Quickpay::payments()->all();
```

#### Get a payment

[](#get-a-payment)

Getting a single payment by id

```
use \Netbums\Quickpay\Facades\Quickpay;

$payment = Quickpay::payments()->find($paymentId);
```

#### Create a payment

[](#create-a-payment)

First create a basket with items, and then create a payment with the basket and a unique order id.

```
use \Netbums\Quickpay\DataObjects\Basket;
use \Netbums\Quickpay\DataObjects\BasketItem;
use \Netbums\Quickpay\DataObjects\Payment;
use \Netbums\Quickpay\Facades\Quickpay;

$basket = new Basket(
    items: [
        new BasketItem(
            qty: 1,
            item_name: 'Test item',
            item_no: 'sku-1234',
            item_price: 100, // in smallest currency unit
            vat_rate: 0.25, // 25%
        )
    ]
);

$paymentData = new Payment(
    currency: 'DKK',
    order_id: '1234',
    basket:  $basket,
);

$createdPayment = Quickpay::payments()->create(
    payment: $paymentData
);
```

After a payment is created you can create a payment link for it, and redirect the user to the payment link.

#### Create a payment link

[](#create-a-payment-link)

```
use \Netbums\Quickpay\Facades\Quickpay;
use \Netbums\Quickpay\DataObjects\PaymentLink;

$paymentLinkData = new PaymentLink(
    id: $createdPayment['id'],
    amount: 100
);

$paymentLink = Quickpay::payments()->createLink($paymentLinkData);
```

This will return a URL, that you can redirect the user to.

#### Update a payment

[](#update-a-payment)

```
```

#### Capture a payment

[](#capture-a-payment)

Capture a payment. This will capture the amount of the payment specified.

```
use \Netbums\Quickpay\Facades\Quickpay;

$payment = Quickpay::payments()->capture(
    id: $paymentId,
    amount: 100, // in smallest currency unit
);
```

#### Refund a payment

[](#refund-a-payment)

Refund a payment. This will refund the amount of the payment specified.

```
use \Netbums\Quickpay\Facades\Quickpay;

$payment = Quickpay::payments()->refund(
    id: $paymentId,
    amount: 100, // in smallest currency unit
);
```

#### Authorize a payment

[](#authorize-a-payment)

Authorize a payment. This will reserve the amount on the card, but not capture it.

```
use \Netbums\Quickpay\Facades\Quickpay;

$payment = Quickpay::payments()->authorize(
    id: $paymentId,
    amount: 100, // in smallest currency unit
);
```

#### Renew authorization of a payment

[](#renew-authorization-of-a-payment)

Renew the authorization of a payment. This will reserve the amount on the card, but not capture it.

```
use \Netbums\Quickpay\Facades\Quickpay;

$payment = Quickpay::payments()->renew(
    id: $paymentId,
);
```

#### Cancel a payment

[](#cancel-a-payment)

Cancel a payment. This will cancel the payment, and release the reserved amount on the card.

```
use \Netbums\Quickpay\Facades\Quickpay;

$payment = Quickpay::payments()->cancel(
    id: $paymentId,
);
```

#### Create a payment link

[](#create-a-payment-link-1)

Create a payment link for a payment. Optional parameters are: `language`, `continue_url`, `cancel_url`, `callback_url`:

```
use \Netbums\Quickpay\Facades\Quickpay;
use \Netbums\Quickpay\DataObjects\PaymentLink;

$paymentLinkData = new PaymentLink(
    id: $paymentId,
    amount: 100, // in smallest currency unit
    language: 'da',
    continue_url: 'https://example.com/continue',
    cancel_url: 'https://example.com/cancel',
    callback_url: 'https://example.com/callback',
);

$paymentLink = Quickpay::payments()->createPaymentLink(
    paymentLink: $paymentLinkData,
);
```

#### Create a payment session

[](#create-a-payment-session)

```
use \Netbums\Quickpay\Facades\Quickpay;

$session = Quickpay::payments()->session(
    id: $paymentId,
    amount: 100, // in smallest currency unit
);
```

#### Create Fraud Report

[](#create-fraud-report)

Create a fraud report for a payment. Optional parameters are: `description`:

```
use \Netbums\Quickpay\Facades\Quickpay;

$fraudReport = Quickpay::payments()->createFraudReport(
    id: $paymentId,
    description: 'Fraudulent payment',
);
```

Subscriptions
-------------

[](#subscriptions)

The `Quickpay::subscriptions()` facade provides a fluent API for interacting with Quickpay Subscription endpoints.

#### Get all subscriptions

[](#get-all-subscriptions)

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptions = Quickpay::subscriptions()->all();
```

#### Get a subscription

[](#get-a-subscription)

Get a single subscription by id.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
$subscription = Quickpay::subscriptions()->find($subscriptionId);
```

#### Create a subscription link

[](#create-a-subscription-link)

Create a payment link for a subscription. Requires a `SubscriptionLink` DataObject.

```
use \Netbums\Quickpay\Facades\Quickpay;
use \Netbums\Quickpay\DataObjects\SubscriptionLink;

$subscriptionLinkData = new SubscriptionLink(
    id: $createdSubscription['id'],
    amount: 100, // in smallest currency unit
    order_id: 'link_'.uniqid(),
    language: 'en',
    continue_url: 'https://example.com/continue',
    cancel_url: 'https://example.com/cancel',
    callback_url: 'https://example.com/callback' // API
);

$subscriptionLink = Quickpay::subscriptions()->createSubscriptionLink($subscriptionLinkData);
```

#### Delete a subscription payment link

[](#delete-a-subscription-payment-link)

Delete the payment link for a subscription.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
Quickpay::subscriptions()->deletePaymentLink($subscriptionId);
```

#### Create a subscription

[](#create-a-subscription)

Create a new subscription. Requires a `Subscription` DataObject.

```
use \Netbums\Quickpay\Facades\Quickpay;
use \Netbums\Quickpay\DataObjects\Subscription;

$subscriptionData = new Subscription(
    currency: 'DKK',
    order_id: 'order_'.uniqid(),
    description: 'Subscription description', // Example description
    // Add other relevant Subscription properties based on Quickpay docs if known
    // e.g., frequency: 30
);

$createdSubscription = Quickpay::subscriptions()->create($subscriptionData);
```

#### Update a subscription

[](#update-a-subscription)

Update a subscription. Requires the subscription ID and an array of data.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
$updateData = [
    'state' => 'active',
    // ... other update properties
];
$updatedSubscription = Quickpay::subscriptions()->update($subscriptionId, $updateData);
```

#### Authorize a subscription

[](#authorize-a-subscription)

Authorize a subscription.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
$authorizedSubscription = Quickpay::subscriptions()->authorize($subscriptionId);
```

#### Cancel a subscription

[](#cancel-a-subscription)

Cancel a subscription.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
$canceledSubscription = Quickpay::subscriptions()->cancel($subscriptionId);
```

#### Create a recurring payment

[](#create-a-recurring-payment)

Create a recurring payment for a subscription.

```
use \Netbums\Quickpay\Facades\Quickpay;
use \Netbums\Quickpay\DataObjects\SubscriptionRecurring;

$subscriptionRecurringData = new SubscriptionRecurring(
    id: $subscriptionId,
    amount: 100 // in smallest currency unit
    // ... other SubscriptionRecurring properties
);

$recurringPayment = Quickpay::subscriptions()->createRecurring($subscriptionRecurringData);
```

#### Create a fraud report

[](#create-a-fraud-report)

Create a fraud report for a subscription.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
$fraudReport = Quickpay::subscriptions()->fraudReport($subscriptionId);
```

#### Get subscription payments

[](#get-subscription-payments)

Get payments associated with a subscription.

```
use \Netbums\Quickpay\Facades\Quickpay;

$subscriptionId = 'your_subscription_id';
$payments = Quickpay::subscriptions()->getPayments($subscriptionId);
```

### Exception Handling

[](#exception-handling)

Dedicated exception classes are provided for handling errors during subscription operations. These include:

- `FetchSubscriptionFailed`
- `FetchSubscriptionsFailed`
- `CreateRecurringFailed`
- `CreateSubscriptionFailed`
- `CreateSubscriptionLinkFailed`
- `DeletePaymentLinkFailed`
- `UpdateSubscriptionFailed`
- `AuthorizeSubscriptionFailed`
- `CancelSubscriptionFailed`
- `FraudReportSubscriptionFailed`
- `GetSubscriptionPaymentsFailed`

You should wrap your Quickpay subscription calls in try-catch blocks to handle these specific exceptions.

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)

- [Morten Bak](https://github.com/mortenebak)
- [Anders Grønborg](https://latego.dk)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance77

Regular maintenance activity

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.9% 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

Every ~67 days

Recently: every ~58 days

Total

8

Last Release

381d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/859aa2d7d18b4b4acb44db371de0cc291f6db7ae287fd89a0465c277b1626fd9?d=identicon)[MortenBak](/maintainers/MortenBak)

---

Top Contributors

[![mortenebak](https://avatars.githubusercontent.com/u/9462269?v=4)](https://github.com/mortenebak "mortenebak (42 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")

---

Tags

laravel-packagequickpay-apisubscription-apilaravelNetbumslaravel-quickpay

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/netbums-laravel-quickpay/health.svg)

```
[![Health](https://phpackages.com/badges/netbums-laravel-quickpay/health.svg)](https://phpackages.com/packages/netbums-laravel-quickpay)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[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)[creagia/laravel-redsys

Laravel Redsys Payments Gateway

2013.6k](/packages/creagia-laravel-redsys)

PHPackages © 2026

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