PHPackages                             ambitionphp/laravel-bitpay - 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. ambitionphp/laravel-bitpay

ActiveLibrary[Payment Processing](/categories/payments)

ambitionphp/laravel-bitpay
==========================

Bitpay wrapper for laravel

v3.0.2(4y ago)02MITPHPPHP &gt;=7.3 || ^8.0

Since Jun 3Pushed 4y agoCompare

[ Source](https://github.com/ambitionphp/laravel-bitpay)[ Packagist](https://packagist.org/packages/ambitionphp/laravel-bitpay)[ Docs](https://github.com/vrajroham/laravel-bitpay)[ RSS](/packages/ambitionphp-laravel-bitpay/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (14)Used By (0)

Laravel + BitPay Integration
============================

[](#laravel--bitpay-integration)

[![Latest Version on Packagist](https://camo.githubusercontent.com/18171a05e033be12535ef2696c97effe08bb1091bd32829dfdab3ce0f107622f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7672616a726f68616d2f6c61726176656c2d6269747061792e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/vrajroham/laravel-bitpay)[![Build Status](https://camo.githubusercontent.com/a674923fe118e24dcd1bd97b60bc113178451fe633de507dd7280333d739d7a8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7672616a726f68616d2f6c61726176656c2d6269747061792f6d61737465722e7376673f7374796c653d666f722d7468652d6261646765)](https://travis-ci.org/vrajroham/laravel-bitpay)[![Quality Score](https://camo.githubusercontent.com/1d3723f8d1609c992eb62e2f10ca50d1464153425216eb46e4ec38de4245c317/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7672616a726f68616d2f6c61726176656c2d6269747061792e7376673f7374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/vrajroham/laravel-bitpay)[![Total Downloads](https://camo.githubusercontent.com/09d92f126e87c9e9d83af325b6e070e9312f3b3f6206850ea1c52b172407561d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7672616a726f68616d2f6c61726176656c2d6269747061792e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/vrajroham/laravel-bitpay)

Accept Bitcoin and Bitcoin Cash for your business with your Laravel application and BitPay client.

> Requires PHP ^7.3

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Install Package](#install-package)
    - [Publish config file](#publish-config-file)
    - [Add configuration values](#add-configuration-values)
    - [Add webhook event listener](#add-webhook-event-listener)
    - [Connect to server and authenticate the client](#connect-to-server-and-authenticate-the-client)
- [Examples](#examples)
    - [Create Invoice and checkout (step wise)](#create-invoice-and-checkout)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

#### Install package

[](#install-package)

You can install the package via composer:

```
composer require vrajroham/laravel-bitpay
```

#### Publish config file

[](#publish-config-file)

Publish config file with:

```
php artisan vendor:publish --provider="Vrajroham\LaravelBitpay\LaravelBitpayServiceProvider"
```

#### Add configuration values

[](#add-configuration-values)

Add following keys to `.env` file and updated the details ([view more about configuration](https://support.bitpay.com/hc/en-us/articles/115003001063-How-do-I-configure-the-PHP-BitPay-Client-Library-)):

```
BITPAY_PRIVATE_KEY_PATH=/tmp/bitpay.pri
BITPAY_PUBLIC_KEY_PATH=/tmp/bitpay.pub
BITPAY_NETWORK=testnet
BITPAY_KEY_STORAGE_PASSWORD=SomeRandomePasswordForKeypairEncryption
BITPAY_TOKEN=
```

#### Add webhook event listener

[](#add-webhook-event-listener)

By default package is capable of handling of webhook requests. Bitpay payment status updates are completely based on webhooks. Whenever webhook is received from server, `BitpayWebhookReceived` event is dispatched. You just need to provide a listener for this event.

You can add your listener as below,

```
