I want my customers to pay transaction fees. The only helpful but incomplete answer I have found so far is from here:
You can create a transaction which spends the output to yourself, attaching a fee to that transaction. In order for miners to grab the transaction fee on that transaction, they would have to also mine the original transaction.
I have some experience of calling bitcoind methods using JSON. With these assumptions:
my account: "my"
receiver's address: "123..zyz"
coins to be sent: 0.001
transaction fee: (unpredictable)
my customer will receive 0.0008 coins if the transaction fee is 0.0002 in this case.
Am I supposed to first call method sendfrom like below?
sendfrom("my","123..zyz",0.001)
Then how do I determine the transaction fee? How do I charge the transaction fee to the receiver? Would kind soul please provide me the detail answer with complete list of calls to Original Bitcoin client/API calls?