BTCPay implements the same API as Bitpay for creating or managing your invoices. Migrating should just be a matter of pointing to the BTCPay URL instead of Bitpay.
While Bitpay is using one user account for one merchant, BTCPay allows a user to manage multiple stores.
The authentication mechanism is using BitId
.
With BitId
, the client
of the API (like an e-commerce plugin) generates a private key, then inform the server
(BTCPay) about the public key
.
Every requests to the API sent by the client is signed with the client's private key
.
We call pairing
the process to inform BTCPay about your public key
.
Your first need to create a new store:
- Log in
- Go to Stores menu
- Click on
Create a new store
- Enter a friendly name for the store, validate.
There is two method of pairing
, client side pairing and server side pairing.
With client side pairing, the client
generates a URL from his public key
which a human user can browse to validate the pairing.
Typically the URL looks like https://btcpay.example.com/api-access-request?pairingCode=<pairingcode_goes_here>
.
You can find documentation about how to achieve this with this link.
The second way, is to generate your private key via some bitcoin library then:
- Go to the store's settings
- Click on
Access tokens
- Click on
Create new Token
- Select merchant's facade and enter your public key,
- Click request pairing
- Click on Approve
BTCPay Server has an API compatible with Bitpay, it inherits from all its integration to ECommerce solutions with minimal engineering efforts. You can read the documentation on Bitpay's website.
The only difference is that while bitpay support one store per account, BTCPay supports multiple store per account.