-2

I am trying to write a gateway system where users can check the data upon the callback that is sent to their specific url.

I am wondering how I could go about checking that the payment has been received.

I have code that will generate address's and check balances but not an event or socket to automatically check when that address has received funds.

What is the best way to go about this?

I know i can use blockchains online to read data, but there is not 1 blockchain that does all cryptos so i'd be baffling between here and there which is not what I want to do really.

I am NOT running my own node, but generating public and private keys.

Many thanks in advance!

2
  • 2
    Hi php dev, this site collects questions about Bitcoin, questions about "all cryptocurrencies" for which the answer vastly differs to an equivalent question only about Bitcoin are likely going to be considered out of scope by our community. Either way, the answer is: get the data from one or multiple service that provide it, or run your own nodes.
    – Murch
    Jun 17 at 16:58
  • @Murch Okay thank you. Then please pretend I just stated Bitcoin only. None of the other coins. If I get it working with 1 I can do it with all.
    – php dev
    Jun 17 at 17:04

1 Answer 1

1

Alright, so, pretending it's "Bitcoin" instead of "cryptocurrencies", if you don't run your own full node and want to somehow check you've received the money with Node JS, you can just use the API of a block explorer (e.g., mempool.space).

Alternatively, you can just scrape the page of the block explorer with puppeteer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.