3

I need to implement a BTC payment system on my web-store. But I'm still not sure about the mechanisms I'm supposed to use for payment confirmation.

For example, a user registered on my store and I created a new address for his account by using getnewaddress('user-name'). I also generate a new address for every new transaction. How can I track the status of a payment made to this address?

1 Answer 1

1

I would start by looking at the mempool. See getrawmempool, getrawtransaction, decoderawtransaction api calls. Once you see the transaction your looking for in the mempool you could consider that status #1

Once this transaction is confirmed in a block it will show up as part of the getbalance for that account and other RPC calls like listunspent etc.. You could consider that status #2

Then it's up to you how many confirmations you want for the payment to be considered confirmed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.