<p>I don't think you need a third-party library if you have a reasonable level of programing experience.  (If you don't, you probably shouldn't be handling money directly.)</p>

<p>Here are the steps from the Blockchain.info (BC.i) page recreated for Bitcoin Core.</p>

<h2>Get A Receiving Address</h2>

<p>Use the <a href="https://bitcoin.org/en/developer-reference#getnewaddress" rel="nofollow"><code>getnewaddress</code></a> RPC.  The JSON-RPC result will be a string with the address.</p>

<h2>Get A Callback When An Address Receives A Payment</h2>

<p>Use the <code>-walletnotify</code> bitcoind command line switch to run a program every time a wallet transaction is received, sent, or confirmed.  Your program can use the following commands:</p>

<ul>
<li><a href="https://bitcoin.org/en/developer-reference#gettransaction" rel="nofollow"><code>gettransaction</code></a> to get details about the transaction, including everything BC.i would've sent you and more.  (See link for an example.)  When Bitcoin Core runs the walletnotify command, it can pass an argument with the TXID, so you would run <code>gettransaction &lt;txid&gt;</code></li>
<li>Something like <code>curl</code> to send an HTTP GET to your callback URL with whatever details you need</li>
</ul>

<p>That's it.  As long as you can write a script that can parse JSON, you can do everything BC.i does with just a few lines of code.  That's also probably why you don't see any code on GitHub: it's too simple to make a project out of.</p>

<p>Before you get started, I highly recommend reading the Bitcoin Wiki <a href="https://en.bitcoin.it/wiki/Proper_Money_Handling_%28JSON-RPC%29" rel="nofollow">proper money handling page</a> to learn how to handle high-precision bitcoin values.  Also, if this is your first money-handling program, please remember the high stakes that come with holding on to money.  Hackers love stealing bitcoins.</p>

CC BY-SA 3.0
2015-01-23T02:21:52.417Z
Libraries serve many purposes, and there are good reasons to use them instead of building everything from scratch. I'm looking for something that's been tried and tested for at least one year. I could build it myself, but I'd rather start my next project using code that is more than 0 days old and has been tested more than 0 times. If it's true that this doesn't exist and everyone uses third party services (blockchain.info/bitpay/coinbase) for merchant processing, then what's the point of even using Bitcoin in the first place?
bvpx
CC BY-SA 3.0
2015-02-09T16:42:30.020Z
David Harding was not telling you to build everything from scratch, he was telling you how to integrate your app with bitcoind with a few lines of code.  It sounds pretty reasonable to me, except you should use a heirarchical deterministic wallet so that you only need one backup ever.
David Grayson
CC BY-SA 3.0
2015-01-09T01:44:18.820Z
2015-01-09T01:44:18.820Z
David A. Harding
<p>The <a href="https://gear.mycelium.com/" rel="nofollow noreferrer">Mycelium Gear</a> is probably the most practical way to go. While technically it's a 3rd party, the money is not routed through them, and thus no KYC/AML, no censorship, and no commission. Mycelium Gear simply notifies you about the incoming payments based on your HD wallet xpubkey.</p>

<p>Alternatively, you can setup their open source software yourself.</p>

CC BY-SA 3.0
2017-07-16T17:46:51.677Z
2017-07-16T17:46:51.677Z
qertoip
<p>Unlikely the OP is still waiting for the answer but the question remains valid and six years later community actually has some good answers.</p>
<p>Open source, self-hosted payment processors for Bitcoin:</p>
<ul>
<li><a href="https://btcpayserver.org/" rel="nofollow noreferrer">https://btcpayserver.org/</a> - the most powerful one</li>
<li><a href="https://cypherpunkpay.org/" rel="nofollow noreferrer">https://cypherpunkpay.org/</a> - the lightweight one (disclosure: author here)</li>
</ul>

CC BY-SA 4.0
2021-06-25T09:01:21.603Z
2021-06-25T09:01:21.603Z
CypherpunkDev
<p>I've been searching for an open-source alternative to blockchain.info's Receive Payments API (<a href="https://blockchain.info/api/api_receive" rel="nofollow">https://blockchain.info/api/api_receive</a>). I want to run bitcoind on my own server and have payments handled in my own database.</p>

<p>Is there any project in existence that is kept up-to-date with the current version of Bitcoin?</p>

<p>Searching here, github, and Google has returned me no results.</p>

<transactions><bitcoind><api><payment><payment-processors>
accept bitcoin payments for orders without 3rd party software
bvpx
# accept bitcoin payments for orders without 3rd party software

(Asked by: username_0 on 2015-01-02)

I've been searching for an open-source alternative to blockchain.info's Receive Payments API (<https://blockchain.info/api/api_receive>). I want to run bitcoind on my own server and have payments handled in my own database.

Is there any project in existence that is kept up-to-date with the current version of Bitcoin?

Searching here, github, and Google has returned me no results.

**Tags:** transactions, bitcoind, api, payment, payment-processors


---

## 3 answers

### Answer by username_1 on 2015-01-09. Score: 3

I don't think you need a third-party library if you have a reasonable level of programing experience. (If you don't, you probably shouldn't be handling money directly.)

Here are the steps from the Blockchain.info (BC.i) page recreated for Bitcoin Core.

## Get A Receiving Address

Use the [`getnewaddress`](https://bitcoin.org/en/developer-reference#getnewaddress) RPC. The JSON-RPC result will be a string with the address.

## Get A Callback When An Address Receives A Payment

Use the `-walletnotify` bitcoind command line switch to run a program every time a wallet transaction is received, sent, or confirmed. Your program can use the following commands:

* [`gettransaction`](https://bitcoin.org/en/developer-reference#gettransaction) to get details about the transaction, including everything BC.i would've sent you and more. (See link for an example.) When Bitcoin Core runs the walletnotify command, it can pass an argument with the TXID, so you would run `gettransaction <txid>`
* Something like `curl` to send an HTTP GET to your callback URL with whatever details you need

That's it. As long as you can write a script that can parse JSON, you can do everything BC.i does with just a few lines of code. That's also probably why you don't see any code on GitHub: it's too simple to make a project out of.

Before you get started, I highly recommend reading the Bitcoin Wiki [proper money handling page](https://en.bitcoin.it/wiki/Proper_Money_Handling_%28JSON-RPC%29) to learn how to handle high-precision bitcoin values. Also, if this is your first money-handling program, please remember the high stakes that come with holding on to money. Hackers love stealing bitcoins.

> **Comments:**
> **username_0**: Libraries serve many purposes, and there are good reasons to use them instead of building everything from scratch. I'm looking for something that's been tried and tested for at least one year. I could build it myself, but I'd rather start my next project using code that is more than 0 days old and has been tested more than 0 times. If it's true that this doesn't exist and everyone uses third party services (blockchain.info/bitpay/coinbase) for merchant processing, then what's the point of even using Bitcoin in the first place?  
> **username_2**: username_1 username_1 was not telling you to build everything from scratch, he was telling you how to integrate your app with bitcoind with a few lines of code.  It sounds pretty reasonable to me, except you should use a heirarchical deterministic wallet so that you only need one backup ever.  

---

### Answer by username_3 on 2017-07-16. Score: 0

The [Mycelium Gear](https://gear.mycelium.com/) is probably the most practical way to go. While technically it's a 3rd party, the money is not routed through them, and thus no KYC/AML, no censorship, and no commission. Mycelium Gear simply notifies you about the incoming payments based on your HD wallet xpubkey.

Alternatively, you can setup their open source software yourself.


---

### Answer by username_4 on 2021-06-25. Score: 0

Unlikely the OP is still waiting for the answer but the question remains valid and six years later community actually has some good answers.

Open source, self-hosted payment processors for Bitcoin:

* <https://btcpayserver.org/> - the most powerful one
* <https://cypherpunkpay.org/> - the lightweight one (disclosure: author here)


---

