Is there a way in cardano-cli generated wallet to know from what address the payment came from?

I want to implement waiting for payment flow, and once the ADA is received I want to mint and NFT and send it to the buyer. How can I know the sender’s address via some API? preferable for free not with SaaS APIs.

Here are a couple of approaches:

  1. Run cardano-db-sync and use SQL queries to obtain the information.
  2. Run cardano-graphql and use GraphQL queries.
  3. When the Plutus Application Backend (PAB) is released, it may be possible that you can use the REST API for the PAB chain index.
  4. Use a third-party service like or
  5. Write custom Haskell code based on the cardano-client-demo.
  6. Write custom Haskell code using the mantra package and its watchTransactions function.

Perhaps others could suggest additional approaches? In particular, I suspect there are JavaScript and Rust libraries that might have this capability.