002pair.php: pairs your private/public keys to your BitPay merchant account. Please make sure to first create a pairing code in your BitPay merchant account (Payment Tools - Manage API tokens) and put this pairing code in the script. The script returns an API token that should be put put in index.php, to create invoices permanently. Pairing Code Saving the gateway configuration automatically generates the Pairing Code. Click the Generate New Key and Pairing Code button if a new pairing key is required. Enter this pairing code into your BitPay account in Payment Tools Manage API Tokens.
Accept Bitcoin and Bitcoin Cash for your business with your Laravel application and BitPay client.
Requires PHP ^7.3
Contents
After this, you will see a pairing code. Copy this code and paste in your WooCommerce BitPay settings page. Next, click on Find to continue. Once your website verifies the pairing code it will automatically fetch and store your API key. To store all changes, click on save settings. This is how you add the option of bitcoin payments on your website. Get answers to your questions about our blockchain-powered mass-payout platform for businesses. Paying with Bitcoin and Cryptocurrency.
- Installation
- Examples
Installation
Install package
You can install the package via composer:
Publish config file
Publish config file with:
Add configuration values
Add following keys to .env file and updated the details (view more about configuration):
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,
Bitpay Card
Next, add listener to EventServiceProvider's $listen array as below,
Connect to server and authenticate the client
Create keypairs and pair your client(application) with BitPay server.
What exactly above command do?
- Above command will create Private and Public key, encrypt your private key using bitpay secure storage class using your provided password.
- SIN (Service Identification Number) for your client will be created to uniquely identify requests from your server.
- By using SIN new Token and Pairing Code will be created for your client on bitpay server and will be shown on your console output.
- Token will be used for all future request to bitpay and will automatically be copied to your
.envfile. - Based on environment you set TEST/LIVE, command will provide URL to approve your client and you need to copy and search Pairing Code on bitpay server & approve it.
You are all set.
⛳
Examples
Create Invoice and checkout
Let's go step by step. Update macbook pro to catalina.
- Create your internal system order and then initiate the workflow by creating bitpay invoice as below,
- Once you get the invoice url for payment, redirect user to that particular url. Use will see something like below on browser.
- Next, open your bitpay wallet, scan the code and make a payment. Something like below,
- Once payment is done, success screen will be displayed and user needs to click on Return to Shop Name.
- Payment done! Now you need to wait for webhook to get notification regarding status of payment.

Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Sierra to mojave upgrade. Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email vaibhavraj@vrajroham.me instead of using the issue tracker.
Bitpay Card Services
Credits
License
Bitpay Pairing Codes
The MIT License (MIT). Please see License File for more information.
