PHPackages                             shela/omnipay-btcpayserver - 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. shela/omnipay-btcpayserver

ActiveLibrary[Payment Processing](/categories/payments)

shela/omnipay-btcpayserver
==========================

BTCPayServer driver for the Omnipay payment processing library

0.0.1(5y ago)00BSD3PHPPHP &gt;=7.1

Since Jul 30Pushed 4y agoCompare

[ Source](https://github.com/SHELA/omnipay-btcpayserver)[ Packagist](https://packagist.org/packages/shela/omnipay-btcpayserver)[ Docs](https://dcentrica.com/)[ RSS](/packages/shela-omnipay-btcpayserver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Omnipay: BtcPayServer
=====================

[](#omnipay-btcpayserver)

**Omnipay driver for the BTCPayServer Bitcoin payment processor**

[![Latest Stable Version](https://camo.githubusercontent.com/0c0abcb0852091e80cb28275d348201c4fa499129cda0b59c9b1be34358d2545/68747470733a2f2f706f7365722e707567782e6f72672f6463656e74726963612f6f6d6e697061792d6274637061797365727665722f76657273696f6e2e706e67)](https://packagist.org/packages/dcentrica/onipay-btcpayserver)[![Total Downloads](https://camo.githubusercontent.com/6f4be76f79014949765201f5b6df725123097af22361eedbd3d334d94781f906/68747470733a2f2f706f7365722e707567782e6f72672f6463656e74726963612f6f6d6e697061792d6274637061797365727665727061792f642f746f74616c2e706e67)](https://packagist.org/packages/dcentrica/omnipay-btcpayserver)

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

TODO
----

[](#todo)

This library should just wrap around the tutorial notes from the btcpayserver lib: [https://github.com/btcpayserver/php-bitpay-client/blob/master/examples/tutorial/003\_createInvoice.php](https://github.com/btcpayserver/php-bitpay-client/blob/master/examples/tutorial/003_createInvoice.php)

- Patch key-generation and pairing scripts from btcpayserver/btcpayserver-php-client lib and ref them in this README

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

[](#requirements)

- See PHP and library dependencies in `composer.json`
- A `.env` file used to manage environment variables

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

[](#installation)

This Omnipay driver is installed via [Composer](http://getcomposer.org/). To install it, simply add it to your `composer.json` file or just run `composer require dcentrica/omnipay-btcpayserver`

```
{
    "require": {
        "dcentrica/omnipay-btcpayserver": "dev-master"
    }
}
```

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

[](#configuration)

This library assumes you're using a `.env` file for your application configuration. Adapt the following example to suit your environment:

```
# Hostname of your BTCPayServer instance
BTCPAYSERVER_HOST="testnet.demo.btcpayserver.org"

# Default web store fiat currency
BTCPAYSERVER_STORE_DEFAULT_CURRENCY="NZD"

# A URL for returning shoppers back to your website after a successful purchase
BTCPAYSERVER_STORE_REDIRECT="https://pay.my-store.nz/"

# Optional: IPN notifications are sent here (if set)
BTCPAYSERVER_STORE_CALLBACK="https://my-store.nz/ipncallback/"

# Generated by https://github.com/btcpayserver/btcpayserver-php-client/blob/master/examples/tutorial/002_pair.php
BTCPAYSERVER_INVOICE_TOKEN="A2YbWgnBnEtRhX2UIqJHNvaMp2tt11AzbMiNLLJ9AKK"

# Used to encrypt public & private keys
BTCPAYSERVER_CONF_ENC_PASS="YourTopSecretPassword"

# Absolute path to the private-key, generated according to
# https://github.com/btcpayserver/btcpayserver-php-client/blob/master/examples/tutorial/001_generateKeys.php
BTCPAYSERVER_PRIKEY_LOC="/tmp/btcpay.pri"

# Absolute path to the public-key, generated according to
# https://github.com/btcpayserver/btcpayserver-php-client/blob/master/examples/tutorial/001_generateKeys.php
BTCPAYSERVER_PUBKEY_LOC="/tmp/btcpay.pub"

# Test BTCPayServer endpoint
BTCPAYSERVER_ENDPOINT_TEST="https://testnet.demo.btcpayserver.org/"

# Live BTCPayServer endpoint
BTCPAYSERVER_ENDPOINT_LIVE="https://demo.btcpayserver.org/"

# Optionally receive emails at this address when purchases are made
BTCPAYSERVER_STORE_NOTIFICATION_EMAIL="notifications@my-store.nz
```

If you want to display payment QR codes in a modal within your web store, a little JavaScript is required, an example is below:

```

    // As an example, `invoiceId` could be configured to come through as a GET param
    // The jQuery selector should identify the checkout button of your store
    $('#my-checkout-button').on('click', function(e) { window.btcpay.showInvoice(invoiceId); });

```

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

[](#basic-usage)

The following gateways are provided by this package:

- BTCPayServer

For general Omnipay usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository. For BTCPayServer usage instructions, please see the main [BTCPayServer](https://github.com/btcpayserver/php-bitpay-client) repository and the [comprehensive docs](http://docs.btcpayserver.org/).

Support
-------

[](#support)

### Omnipay

[](#omnipay)

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 want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

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

### Omnipay BTCPayServer Driver

[](#omnipay-btcpayserver-driver)

If you believe you have found a bug with *this driver*, please report it using our [GitHub issue tracker](https://github.com/dcentrica/omnipay-btcpayserver/issues).

### BTCPayServer

[](#btcpayserver)

For help with BTCPayServer:

- [visit the website](https://docs.btcpayserver.org/)
- Sign-up to the [Mattermost channels](https://chat.btcpayserver.org/btcpayserver/).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

2113d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/468f0d4915b137ec1b1eb8e4522a12ac0b4cac513e359b489f455324220f1669?d=identicon)[SHELA](/maintainers/SHELA)

---

Top Contributors

[![phptek](https://avatars.githubusercontent.com/u/478440?v=4)](https://github.com/phptek "phptek (5 commits)")[![elliot-sawyer](https://avatars.githubusercontent.com/u/354793?v=4)](https://github.com/elliot-sawyer "elliot-sawyer (4 commits)")[![SHELA](https://avatars.githubusercontent.com/u/429667?v=4)](https://github.com/SHELA "SHELA (3 commits)")

---

Tags

paymentgatewaybitcoinpaymerchantomnipaybtcpayserver

### Embed Badge

![Health badge](/badges/shela-omnipay-btcpayserver/health.svg)

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)[omnipay/bitpay

BitPay driver for the Omnipay payment processing library

1383.2k1](/packages/omnipay-bitpay)[coingate/omnipay-coingate

CoinGate driver for the Omnipay payment processing library

1037.0k1](/packages/coingate-omnipay-coingate)[sudiptpa/omnipay-nabtransact

National Australia Bank (NAB) Transact driver for the Omnipay payment processing library.

1017.2k](/packages/sudiptpa-omnipay-nabtransact)[lucassmacedo/omnipay-mercadopago

MercadoPago gateway for OmniPay

154.6k](/packages/lucassmacedo-omnipay-mercadopago)

PHPackages © 2026

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