Post
Topic
Board Currency exchange
Re: FastCash4Bitcoins Support Thread (over 125,000 Bitcoins purchased)
by
Stephen Gornick
on 19/11/2012, 19:02:31 UTC
If they have API support for importing a private key that might work.

You don't need to import a private key, you simply use Blockchain.info's API to redeem the private key on behalf of your customer.  Here's the API:

I have been meaning to add this ability to the blockchain.info API for a while. You can now replace the guid in the send api (https://blockchain.info/api/api_send) with a Hex encoded private key.

https://blockchain.info/merchant/4d6c9dff493fcd2da9508e01c8b13461d37e3d8b6df1732942d3257874051362/payment?to=$address&amount=$amount

$address = destination bitcoin address.
$amount = amount to send in satoshi.

You would probably want to verify the amount of funds available to that address as if the amount is lower than the amount available, the change gets sent right back to the address it came from.

This could also be done with the Raw Transactions capability of the Bitcoin.org client v0.7 and higher, and thus eliminate any concern over sending a customer's private key to a third party service.

So you never need to import the private key, you simply spend it to the address generated for a specific transaction and that takes the place of the customer having to redeem the funds themselves first.