PHPackages                             yamanhacioglu/omnipay-billwerk - 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. yamanhacioglu/omnipay-billwerk

ActiveLibrary[Payment Processing](/categories/payments)

yamanhacioglu/omnipay-billwerk
==============================

Billwerk (Reepay) gateway for Omnipay payment processing library

08PHP

Since Feb 4Pushed 5mo agoCompare

[ Source](https://github.com/yamanhacioglu/omnipay-billwerk)[ Packagist](https://packagist.org/packages/yamanhacioglu/omnipay-billwerk)[ RSS](/packages/yamanhacioglu-omnipay-billwerk/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay: Billwerk
=================

[](#omnipay-billwerk)

**Billwerk (Reepay) driver for the Omnipay PHP payment processing library**

[![Latest Stable Version](https://camo.githubusercontent.com/e259154e71d88064f69678974603e7fbce2f938eaa6901b7858e3cf64a367dd1/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f62696c6c7765726b2f76657273696f6e2e706e67)](https://packagist.org/packages/omnipay/billwerk)[![Total Downloads](https://camo.githubusercontent.com/987d3e6f12c0e8c451c85a0fe5a0373b78cc2ef246695beb43f3c9a3a14dc8a0/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f62696c6c7765726b2f642f746f74616c2e706e67)](https://packagist.org/packages/omnipay/billwerk)

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Billwerk (Reepay) support for Omnipay.

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "omnipay/billwerk": "^1.0"
    }
}
```

And run composer to update your dependencies:

```
composer update

```

Or you can simply run:

```
composer require omnipay/billwerk

```

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

[](#requirements)

- PHP 8.2 or higher
- Omnipay ^3.0
- Billwerk PHP SDK

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- Billwerk (Reepay)

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

Code Examples
-------------

[](#code-examples)

### Initialize Gateway

[](#initialize-gateway)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Billwerk');

$gateway->initialize([
    'apiKey' => 'your-private-api-key',
    'testMode' => true, // Set to false for production
]);
```

### Create a Purchase (One-time Charge)

[](#create-a-purchase-one-time-charge)

```
$response = $gateway->purchase([
    'amount' => '10.00',
    'currency' => 'EUR',
    'description' => 'Order #1234',
    'transactionId' => 'order_12345',
    'returnUrl' => 'https://example.com/return',
    'cancelUrl' => 'https://example.com/cancel',
    'card' => [
        'email' => 'customer@example.com',
        'firstName' => 'John',
        'lastName' => 'Doe',
    ]
])->send();

if ($response->isRedirect()) {
    // Redirect to Billwerk checkout page
    $response->redirect();
}
```

### Complete a Purchase

[](#complete-a-purchase)

```
$response = $gateway->completePurchase([
    'transactionReference' => $_GET['invoice']
])->send();

if ($response->isSuccessful()) {
    echo "Payment successful! Transaction: " . $response->getTransactionReference();
} else {
    echo "Payment failed: " . $response->getMessage();
}
```

### Authorize a Payment

[](#authorize-a-payment)

```
$response = $gateway->authorize([
    'amount' => '10.00',
    'currency' => 'EUR',
    'customerReference' => 'customer_123',
    'cardReference' => 'ca_xxxxx', // Saved card token
])->send();

if ($response->isSuccessful()) {
    $transactionRef = $response->getTransactionReference();
    echo "Payment authorized: " . $transactionRef;
}
```

### Capture an Authorized Payment

[](#capture-an-authorized-payment)

```
$response = $gateway->capture([
    'transactionReference' => 'charge_handle',
    'amount' => '10.00', // Optional: partial capture
])->send();

if ($response->isSuccessful()) {
    echo "Payment captured successfully!";
}
```

### Refund a Payment

[](#refund-a-payment)

```
$response = $gateway->refund([
    'transactionReference' => 'invoice_id',
    'amount' => '5.00', // Optional: partial refund
    'description' => 'Refund reason',
])->send();

if ($response->isSuccessful()) {
    echo "Refund processed successfully!";
}
```

### Void/Cancel a Payment

[](#voidcancel-a-payment)

```
$response = $gateway->void([
    'transactionReference' => 'charge_handle',
])->send();

if ($response->isSuccessful()) {
    echo "Payment cancelled successfully!";
}
```

### Create a Customer

[](#create-a-customer)

```
$response = $gateway->createCustomer([
    'customerReference' => 'customer_123',
    'card' => [
        'email' => 'customer@example.com',
        'firstName' => 'John',
        'lastName' => 'Doe',
        'phone' => '+1234567890',
        'address1' => '123 Main St',
        'city' => 'Copenhagen',
        'postcode' => '1234',
        'country' => 'DK',
    ]
])->send();

if ($response->isSuccessful()) {
    $customerRef = $response->getCustomerReference();
    echo "Customer created: " . $customerRef;
}
```

### Create a Payment Method (Card)

[](#create-a-payment-method-card)

```
$response = $gateway->createCard([
    'customerReference' => 'customer_123',
    'returnUrl' => 'https://example.com/card/return',
    'cancelUrl' => 'https://example.com/card/cancel',
])->send();

if ($response->isRedirect()) {
    // Redirect to Billwerk to add payment method
    $response->redirect();
}
```

### Create a Subscription

[](#create-a-subscription)

```
$response = $gateway->createSubscription([
    'customerReference' => 'customer_123',
    'plan' => 'plan_basic',
    'subscriptionReference' => 'sub_123',
    'cardReference' => 'ca_xxxxx', // Optional: use saved card
])->send();

if ($response->isSuccessful()) {
    $subscriptionRef = $response->getSubscriptionReference();
    echo "Subscription created: " . $subscriptionRef;
}
```

### Cancel a Subscription

[](#cancel-a-subscription)

```
$response = $gateway->cancelSubscription([
    'subscriptionReference' => 'sub_123',
])->send();

if ($response->isSuccessful()) {
    echo "Subscription cancelled successfully!";
}
```

Laravel Integration
-------------------

[](#laravel-integration)

### Installation

[](#installation-1)

The package includes a Laravel service provider. If you're using Laravel 5.5+, the service provider will be automatically discovered.

For older versions of Laravel, add the service provider to your `config/app.php`:

```
'providers' => [
    // ...
    Omnipay\Billwerk\BillwerkServiceProvider::class,
],
```

### Configuration

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Omnipay\Billwerk\BillwerkServiceProvider"
```

Then edit `config/billwerk.php` or add to your `.env` file:

```
BILLWERK_API_KEY=your-private-api-key
BILLWERK_TEST_MODE=true
```

### Usage in Laravel

[](#usage-in-laravel)

```
use Omnipay\Omnipay;

class PaymentController extends Controller
{
    public function checkout()
    {
        $gateway = Omnipay::create('Billwerk');
        $gateway->initialize(config('billwerk'));

        $response = $gateway->purchase([
            'amount' => '10.00',
            'currency' => 'EUR',
            'returnUrl' => route('payment.return'),
            'cancelUrl' => route('payment.cancel'),
        ])->send();

        if ($response->isRedirect()) {
            return $response->redirect();
        }

        return back()->with('error', $response->getMessage());
    }
}
```

Or inject via service container:

```
public function checkout()
{
    $gateway = app('omnipay.billwerk');

    // Use gateway...
}
```

Webhook Handling
----------------

[](#webhook-handling)

To handle webhooks from Billwerk, you need to implement a webhook endpoint that verifies and processes incoming events:

```
use Illuminate\Http\Request;

public function webhook(Request $request)
{
    $payload = $request->getContent();
    $signature = $request->header('Reepay-Signature');

    // Verify signature (implement your verification logic)

    $event = json_decode($payload, true);

    switch ($event['event_type']) {
        case 'invoice_settled':
            // Handle successful payment
            break;
        case 'invoice_authorized':
            // Handle authorization
            break;
        case 'subscription_created':
            // Handle subscription creation
            break;
        // Add more event types as needed
    }

    return response()->json(['success' => true]);
}
```

Supported Operations
--------------------

[](#supported-operations)

- **purchase** - Create a one-time charge session
- **completePurchase** - Verify and complete a purchase
- **authorize** - Authorize a payment
- **completeAuthorize** - Complete an authorization
- **capture** - Capture an authorized payment
- **refund** - Refund a payment
- **void** - Cancel/void an authorized payment
- **createCard** - Create a payment method session
- **deleteCard** - Delete/inactivate a payment method
- **fetchTransaction** - Fetch transaction details
- **createCustomer** - Create a customer
- **updateCustomer** - Update customer details
- **fetchCustomer** - Fetch customer details
- **createSubscription** - Create a subscription
- **cancelSubscription** - Cancel a subscription

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/thephpleague/omnipay-billwerk/issues), or better yet, fork the library and submit a pull request.

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Links
-----

[](#links)

- [Billwerk Documentation](https://reference.reepay.com/api/)
- [Omnipay Documentation](https://github.com/thephpleague/omnipay)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance50

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59294991?v=4)[Yaman HACIOĞLU](/maintainers/yamanhacioglu)[@yamanhacioglu](https://github.com/yamanhacioglu)

---

Top Contributors

[![yamanhacioglu](https://avatars.githubusercontent.com/u/59294991?v=4)](https://github.com/yamanhacioglu "yamanhacioglu (1 commits)")

### Embed Badge

![Health badge](/badges/yamanhacioglu-omnipay-billwerk/health.svg)

```
[![Health](https://phpackages.com/badges/yamanhacioglu-omnipay-billwerk/health.svg)](https://phpackages.com/packages/yamanhacioglu-omnipay-billwerk)
```

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)[binkode/laravel-paystack

A description for laravel-paystack.

112.1k](/packages/binkode-laravel-paystack)

PHPackages © 2026

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