<p>What you're describing is one way to do it but there are much better ways. Take a look at <a href="https://bitlab.co/wallet" rel="nofollow">https://bitlab.co/wallet</a> which is an open source real-time wallet API that you can learn from. The back-end source that interfaces with the bitcoind service is at <a href="https://github.com/bitlabco/bitlab-nodejs" rel="nofollow">https://github.com/bitlabco/bitlab-nodejs</a></p>

CC BY-SA 3.0
2013-11-29T16:54:23.950Z
2013-11-29T16:54:23.950Z
Bitlab.co
<p>Can anyone help me understand how their payment API works at a bitcoind rpc level?  As far as I can tell, there is no way to see what the balance of an address is, only the number of bitcoins that address has received along with the confirmations for it.</p>

<p>If I were to replicate the blockchain API, i would have to:</p>

<ul>
<li>create an address and associated it to an account (destination address)</li>
<li>check the balance of all accounts</li>
<li>get a list of all addresses in that account</li>
<li>check all the addresses looking for the lowest confirmations
<ul>
<li>if value &lt; balance loop back to ensure to check other addresses </li>
</ul></li>
<li>locate callback and call that</li>
<li>move btcs from account to destination address</li>
<li>repeat</li>
</ul>

<p>Is it really that convoluted or am I missing something much simpler?  I currently run a website that processes BTC payments but i'd like to move away from relying on blockchain.info.</p>

<bitcoind><json-rpc><blockchain.info>
How does blockchain.info determine when a payment is received?
Richie Lai
# How does blockchain.info determine when a payment is received?

(Asked by: username_0 on 2013-11-28)

Can anyone help me understand how their payment API works at a bitcoind rpc level? As far as I can tell, there is no way to see what the balance of an address is, only the number of bitcoins that address has received along with the confirmations for it.

If I were to replicate the blockchain API, i would have to:

* create an address and associated it to an account (destination address)
* check the balance of all accounts
* get a list of all addresses in that account
* check all the addresses looking for the lowest confirmations
  + if value < balance loop back to ensure to check other addresses
* locate callback and call that
* move btcs from account to destination address
* repeat

Is it really that convoluted or am I missing something much simpler? I currently run a website that processes BTC payments but i'd like to move away from relying on blockchain.info.

**Tags:** bitcoind, json-rpc, blockchain.info


---

## 1 answers

### Answer by username_1 on 2013-11-29. Score: 1

What you're describing is one way to do it but there are much better ways. Take a look at <https://username_1/wallet> which is an open source real-time wallet API that you can learn from. The back-end source that interfaces with the bitcoind service is at <https://github.com/username_1/bitlab-nodejs>


---

