I'm running an online store. I added the option to pay using bitcoin, using Mycelium Gear.
Gear can be configured to wait for 0-6 confirmations and up to 48*60*60 seconds from the moment the payment address was generated for a transaction to be paid/confirmed.
There are three potentially interesting moments in the life of a transaction when someone might like to be notified:
- A transaction with an output that is being watched has been transmitted on the p2p network.
- The transaction has been included in a block.
- The transaction is fully confirmed (is 6 blocks deep).
With regular bitcoins, I see that when I configure gear to wait for 6 confirmations and 24h, Gear sends two notifications. One for event #2 (transaction included in block) and one for event #3 (transaction confirmed).
With testnet, when configured the same way it behaves the same way, only the testnet blocks are tiny and sometimes happen frequently. But when configured to not wait for confirmation (and only wait for 15 minutes), Gear sends a single notification, after event #1 (transaction transmitted).
What I actually want is to be notified as soon as possible after the customer has transmitted a transaction (event #1), and be notified within minutes of the transaction being fully confirmed (event #3).
If no transaction was transmitted within the first 15 minutes, consider the order abandoned (and the payment address eligible for reuse).
I think what I want is reasonable. But I don't see how to get it from Gear.
Is there a way to get this from Mycelium Gear? If not, is there an alternative service that does the same thing Gear does, but can send the two notifications I need (event #1 and event #3)?
Alternatively, how do other people do it, without using coinbase/braintree/bitpay and without running a full node client on the server?
My best idea currently is to configure Gear to not wait for confirmation to get the first notification, and then follow up the transaction manually using some blockchain explorer API to find out whether it got included in a block and how many blocks deep, until it's fully confirmed and then I can generate the second notification. But if I have to use a second service (some kind of blockchain exploration API), Gear will be a disappointment.