Download the PHP package petzsch/laravel-btcpay without Composer
On this page you can find all versions of the php package petzsch/laravel-btcpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download petzsch/laravel-btcpay
More information about petzsch/laravel-btcpay
Files in petzsch/laravel-btcpay
Package laravel-btcpay
Short Description BtcPay wrapper for laravel
License MIT
Homepage https://github.com/petzsch/laravel-btcpay
Informations about the package laravel-btcpay
Laravel BTCPay

Laravel BTCPay enables you and your business to transact in Bitcoin, Litecoin and 10+ other BTCPay-supported cryptocurrencies within your Laravel application.
Contents
- Installation
- Install Package
- Publish config file
- Add configuration values
- Interaction with API
- Webhooks
- 1. Use package route or define your own
- 2. Setup your webhook listener
- Credits
- License
Installation
Requirements
- PHP 8.1 or higher
- Laravel 10 or higher
Install package
You can install the package via composer:
Publish config file
Publish config file with:
This will create a btcpay.php file inside your config directory.
Add configuration values
Add the following keys to your .env file and update the values to match your
preferences (read more about configuration):
Interaction with API
This package is wrapping the BTCPay Greenfield PHP SDK, so you can use all features provided by the SDK.
You can access the endpoint clients via the BTCPay facade. For example, to access the Invoice endpoint client, you can use:
Webhooks
BTCPay resource status updates are completely based on webhooks (IPNs). Laravel BTCPay fully capable of automatically
handling webhook requests. Whenever a webhook is received from BTCPay's server, \Petzsch\LaravelBtcpay\Events\WebhookReceived event is
dispatched. Take the following steps to configure your application for webhook listening:
1. Use package route or define your own
By default, package provides a btcpay/webhook route that will listen for incoming webhook POST requests from
BTCPay's server. It automatically verifies the request signature and dispatch event only if it is valid.
You can change the default route path in the btcpay.php config file by updating the webhook.prefix key.
:information_source: To retrieve webhook route anywhere in your application, use:
route('btcpay.webhook')
Alternatively, you can disable the package route by setting webhook.prefix to false in the btcpay.php config file and define your own route in your routes/web.php or routes/api.php file:
2. Setup your webhook listener
Start by generating an event listener:
Then, implement your application-specific logic in the handle(...) function of the generated listener.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-btcpay with dependencies
ext-json Version *
021/api-entity Version ^2.1
btcpayserver/btcpayserver-greenfield-php Version ^2.0