Author

Topic: Anyone successfully implemented blockchain.info's receive payments API? (Read 835 times)

hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
I dont get it. How does an online website initiate transaction that is to be done offline ?

If we look at it as a replacement of blockchain.info receive API, the purpose it needs to serve is simple...

1. Generate an address for the user.

2. Get informed when there is an amount on that address as well as the amount itself.

3. Swipe the fund from this address to a pre-defined address.

Can the above be achieved online (as we need it for a website ofcourse) without running two VPS instance ? And even if I have a VPS, can Step 2 be done using https://github.com/Bit-Wasp/bitcoin-lib-php ?

 - Generate an extended public key and create address.
 - Give that unique address to customer.
 - Check if that address received any Bitcoins using any block explorers or you can use Bitcoin core.
 - Etcetera...

If you want to spend from that address, creat and sign transaction with XPRV locally using any of the software listed above and broadcast it.

P.S. https://github.com/Bit-Wasp/bitcoin-lib-php won't check transactions or notify you. You will have to add a simple script for checking transactions.
legendary
Activity: 1662
Merit: 1050
This seems to be a nice solution. Especially this one for PHP - https://github.com/Bit-Wasp/bitcoin-lib-php. But, does not it require to run this code as well as a Bitcoin daemon on two separate VPS instance ?

Nope. You can generate extended public keys from using a software, the PHP program you mentioned, for example. You can sign a transaction using corresponding private key in an offline machine using a software, https://github.com/bip32/bip32.github.io, for example.

I recommend you to read http://blog.richardkiss.com/?p=313.

I dont get it. How does an online website initiate transaction that is to be done offline ?

If we look at it as a replacement of blockchain.info receive API, the purpose it needs to serve is simple...

1. Generate an address for the user.

2. Get informed when there is an amount on that address as well as the amount itself.

3. Swipe the fund from this address to a pre-defined address.

Can the above be achieved online (as we need it for a website ofcourse) without running two VPS instance ? And even if I have a VPS, can Step 2 be done using https://github.com/Bit-Wasp/bitcoin-lib-php ?
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
This seems to be a nice solution. Especially this one for PHP - https://github.com/Bit-Wasp/bitcoin-lib-php. But, does not it require to run this code as well as a Bitcoin daemon on two separate VPS instance ?

Nope. You can generate extended public keys from using a software, the PHP program you mentioned, for example. You can sign a transaction using corresponding private key in an offline machine using a software, https://github.com/bip32/bip32.github.io, for example.

I recommend you to read http://blog.richardkiss.com/?p=313.
legendary
Activity: 1662
Merit: 1050
Better use hierarchical deterministic wallet. Advantages are:

 - You don't need to rely entirely on third party.
 - You don't need to expose private keys to create corresponding public keys(addresses).

Softwares for various languages are available here -- https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Implementations.

Feel free to post here if you need any help.

This seems to be a nice solution. Especially this one for PHP - https://github.com/Bit-Wasp/bitcoin-lib-php. But, does not it require to run this code as well as a Bitcoin daemon on two separate VPS instance ?
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
You'd better go with a serious service like BitPay:

https://bitpay.com/api

Does it allow to accept bitcoin without conversion to FIAT ? I used to know bitpay is used to convert a bitcoin payment instantly to FIAT.

AFAIK its optional.
legendary
Activity: 1662
Merit: 1050
You'd better go with a serious service like BitPay:

https://bitpay.com/api

Does it allow to accept bitcoin without conversion to FIAT ? I used to know bitpay is used to convert a bitcoin payment instantly to FIAT.
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
You mean the intermediary addresses only owned by BitPay? I mean, the ones in the invoice forms.

AFAIK, yes.

Buddy I just want to ask, is this really true!? Is this up to date information? The reason I ask is that I have already spent a fair bit of time working with it and apart from a couple of exceptions it seems pretty good- I don't really want to have to start from scratch.

Blockchain.info API is not bad but Blockchain.info has a lot of problems which may cause problems when receiving payments and it is not a good idea to depend on a third party because you will have to temporarily (unintentionally) close your service as you can't accept payments.

Another reason I want to use the blockchain.info API is that it comes with code which does stuff like automatically detects a payment. I really wouldn't know how to start doing something like that on my own!

If you don't code, then it's better to go with BitPay or Coinkite(recommended).

P.S. Before you go with Coinkite or BitPay, please check https://www.blocktrail.com/api/docs and see if you can create a simple pay button with it.
full member
Activity: 146
Merit: 100
Another reason I want to use the blockchain.info API is that it comes with code which does stuff like automatically detects a payment. I really wouldn't know how to start doing something like that on my own!
full member
Activity: 146
Merit: 100
Blockchain.info has the most broken API ever, you're bound to be alone in the dark. Let it just rot.

Buddy I just want to ask, is this really true!? Is this up to date information? The reason I ask is that I have already spent a fair bit of time working with it and apart from a couple of exceptions it seems pretty good- I don't really want to have to start from scratch.
newbie
Activity: 26
Merit: 6
You'd better go with a serious service like BitPay:

https://bitpay.com/api

You should at least have partial access to receiving addresses.

You mean the intermediary addresses only owned by BitPay? I mean, the ones in the invoice forms.
newbie
Activity: 26
Merit: 6
Not true. You provide your public address, no private keys are involved for receiving payments through BitPay.
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
You'd better go with a serious service like BitPay:

https://bitpay.com/api

You will have to trust a third party, BitPay, completely which is not a good idea IMHO. You should at least have partial access to receiving addresses. A HD wallet is better and more suitable for receiving payments.
newbie
Activity: 26
Merit: 6
You'd better go with a serious service like BitPay:

https://bitpay.com/api
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
Better use hierarchical deterministic wallet. Advantages are:

 - You don't need to rely entirely on third party.
 - You don't need to expose private keys to create corresponding public keys(addresses).

Softwares for various languages are available here -- https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Implementations.

Feel free to post here if you need any help.
newbie
Activity: 26
Merit: 6
Blockchain.info has the most broken API ever, you're bound to be alone in the dark. Let it just rot.
full member
Activity: 146
Merit: 100
Hello chaps,

I'm trying to build me a website which accepts bitcoins. I'm half way through implementing blockchain.info's receive payments API but I'm having a couple of issues. Is there anyone here who has already been through this process and is ok with me pm'ing them now and again when issues arise (which they have already)?

It is possible that those who are experienced in php would be able to help me even if you are not familiar with the API (which is at https://blockchain.info/api/api_receive). I am an amateur programmer, I only do it for fun so I may ask stupid questions.

Thanks!
Jump to: