Bitcoin Forum
July 08, 2024, 12:30:14 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Figuring out received transaction fee [merchant, json-rpc, bitcoind]  (Read 360 times)
psih (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 12, 2013, 08:38:32 AM
 #1

Hello!

I'm trying to figure out how can I get the fee that was applied to a transaction that was received by my bitcoind client. I use the "new address for every transaction" approach, so all my clients send their bitcoin to unique addresses. Based on that I'm able to find the transaction id and this is where i'm stuck at the moment. I somehow need to find out what transaction fee was actually paid by the client.
The reason is that we request, say, 0.1 BTC to pay, but when validating the payment I see that we received 0.0999 instead. So I need to actually figure out if client has sent less BTC or the fee was applied. At this point I use getreceivedbyaddress to check if I received funds to the address and then via listtransactions I can find the transaction in question. After that I'm at a loss at this moment.

I know about the fee formula - although the information differs from place to place, so which should I use is a question too. But i'm puzzled about which RPC calls will give me the required information and how do calculate the fee. Or is there a call, that can give me the fee applied to the transaction? Or should I read the block information and somewhere there is the transaction fee information?

Thanks for the help in advance.
psih (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 12, 2013, 09:07:24 AM
 #2

Is this the right forum section for such question? As a newbie I can't post it into relevant forum section, so if it is permitted by the rules, move it to relevant section where people can actually help me with it? Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!