I am currently using BlockChain.info's API to do payment verification with, but have a few questions.

How I am using it (I think I am using it in the right way....):

  1. I am issuing a new/clean address to for each sale.
  2. I am then checking the balance of the address and the transactions (tx->out) to get the time of the transaction, the value and the block height (of which I am using to get the confirmed count from)
  3. I then add the transaction details to my database/System and display the relevant message to the user.
  4. An automated script then runs to collect/update the confirmed count (and updates this info into my database).

I have been building this by making bitcoin transactions to myself, but of course all my test transactions are genuine, so I don't know how "bad" transactions will be represented!

What I am unsure on, is how will double spends (or dropped transactions/spends/fraud) be represented? Will the transaction simply disappear? And will this then effect the balance shown against the address? Or will the block height simply change to 0/NULL?

Any advice on this would be greatly welcomed!

1 Answer 1


Double spend transaction (transaction that lost the competition) have no block height. So you can check this field.

Also you review other approach using callback or webhooks to get update that new transaction arrived. Most blockchain API provide this service.

You can check also our API https://bitaps.com/api/#Create_payment_address

Your task in this approach is only create callback handler.

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.