Practical overview
When it fits
Use it when building a custom server-side Bitcoin payment flow and you want the library to handle address generation and balance-related steps without installing a local Bitcoin node RPC client.
Who it is for
- Developers integrating Bitcoin payment handling into a website built with Node.js.
- Website operators who want payment-specific addresses and a documented path for transferring proceeds to a configured address.
Documented uses
- Generate a separate Bitcoin address for a payment request.
- Monitor an address and receive a notification when its balance meets the configured confirmation threshold.
- Request a transfer of collected funds to a configured Bitcoin address.
Requirements & limits
- The library uses the blockr API rather than a locally installed Bitcoin node RPC client.
- The README says a wallet client is not required and describes local storage for generated keys, with optional encryption.
- The documented network setting defaults to test; live is shown as an alternative.
- Settings include minimum confirmations, polling and timeout values, and a transaction fee.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the package and initialize the library
Add the documented Accept Bitcoin package to a Node.js project and initialize it with a destination Bitcoin address.
Before you start
- A Node.js project using npm
- A destination Bitcoin address to pass to the library
Steps
Install the package with the command below.
npm install accept-bitcoinRequire
accept-bitcoinin the project.Create an instance with the destination Bitcoin address, as shown in the README.
Expected outcome
The README's stated setup stage is complete: the package is installed and an instance is initialized with a Bitcoin destination address.
Guide limitations
- These steps cover installation and initialization only; they do not establish that payment acceptance or transfers have been tested.
- The README documents test as the default network setting and shows live as an alternative.
Configure and handle a documented payment-address flow
Use the README's example pattern to create a payment address, respond to a balance event and request a transfer.
Before you start
- The package installed and initialized with a destination Bitcoin address
- A Bitcoin network selection; the README lists test and live
- A local key-storage path, with optional password-based encryption settings
Steps
Create an address with
generateAddress, following the documented example.Provide the generated address to the buyer as the payment destination.
Attach a
hasBalanceevent handler; the README sets a configurable minimum-confirmation threshold, whose default is six.In the event handler, call the documented transfer method to send the balance to the configured account.
Expected outcome
The code follows the documented sequence for exposing a payment address, receiving a balance notification and requesting a transfer.
Guide limitations
- The README describes use of the blockr API and does not require a local Bitcoin node RPC client.
- Generated keys are stored locally by default; encryption is an option controlled by settings.
- The documentation is not evidence that the example or external API currently operates successfully.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- sagivo/accept-bitcoin · Official homepage title · retained in its source language

