How to confirm a payment was made?


I am planning to write a site that receive payments in Bitcoin.

The client add products to the cart, then during check out I will create a Bitcoin address to let him pay for it (each cart gets a unique address). I found the code to create multiple address here. I plan to use the NBitcoin library.

How do I verify the Bitcoin address has been paid? I'm planning to use a service like, but I only have the following information

  1. destination Bitcoin address (my generated address)
  2. the amount it should receive

Is there an easy way to use to query that my address was really paid using C#? I read the API but it is confusing.

Adi Wijaya

Posted 2016-08-22T15:01:44.407

Reputation: 21



I'm not sure about Nbitcoin node's API, but I could help you on a blockchain explorer API.

I would recommend, they are fast and trustable. Use the following code to check for confirmed transactions: (output is in json),1L8meqhMTRpxasdGt8DHSJfscxgHHzvPgk?confirmations=1

Change the confirmations tag to whatever amount you want. I highly advise against 0.

Whyte the Weeabear

Posted 2016-08-22T15:01:44.407

Reputation: 540