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

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

<p>You can check also our API <a href="https://bitaps.com/api/#Create_payment_address" rel="nofollow noreferrer">https://bitaps.com/api/#Create_payment_address</a></p>

<p>Your task in this approach is only create callback handler.</p>

CC BY-SA 3.0
2016-12-28T16:34:53.490Z
2016-12-28T16:34:53.490Z
bitaps.com
<p>I am currently using BlockChain.info's API to do payment verification with, but have a few questions.</p>

<p>How I am using it (I think I am using it in the right way....):</p>

<ol>
<li>I am issuing a new/clean address to for each sale.</li>
<li>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)</li>
<li>I then add the transaction details to my database/System and display the relevant message to the user.</li>
<li>An automated script then runs to collect/update the confirmed count (and updates this info into my database).</li>
</ol>

<p>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!</p>

<p>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?</p>

<p>Any advice on this would be greatly welcomed!</p>

<api>
How are double spends and "dropped" transactions represented in BlockChain.info API
Ford
# How are double spends and "dropped" transactions represented in BlockChain.info API

(Asked by: username_0 on 2013-10-08)

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!

**Tags:** api


---

## 1 answers

### Answer by username_1 on 2016-12-28. Score: 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://username_1/api/#Create_payment_address>

Your task in this approach is only create callback handler.


---

