user2525: For a web app, I'm wondering is there an API/SDK that enables you to execute some code every time an address receives ADA, NFT, or native token? The wallet address receiving does not change. If not, what repos should I start at for building this sort of functionality?
For example, I'm selling NFTs on my website and my wallet address is shown which anyone can send a specific amount of ADA to in order to get a random NFT from the collection. I want to execute the functions which pick a random NFT from the collection to mint every time my wallet receives the specified amount of ADA.

user157: How about running a Cardano node and build a script that queries the target address and produces something consumable by your API?

user1919: All the above solutions can do the job, but you'll end up polling the blockchain on each one. Another solution though is using tangocrypto services. Their webhooks feature will allow you to "react" to different blockchain events such as PAYMENT. So you just need to set up a webhook and start listening to a specific address. You will get a callback notifying you every time the address receive a payment.

user2335: What info do you wanna get specifically? If it is just the UTXO's at an address and you are running a node then the following script suffices.

#!/bin/bash
cardano-cli query utxo --mainnet --address $(cat ~/path/to/file.addr) > ~/UtxosAtAddress

If you would like more info on transactional data you could run the cardano-db-sync package in along side the node. Via this you can query a lot of data, but it does require some PostgreSQL knowledge.
Now if you have no interest in running a node or the cardano-db-sync, you could also query third party api's. A nice one to mention is Blockfrost that has multiple languages supported. For more info on this see their website [1]

user4074: I believe this guide would help you out:
https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-wallet/

user899: There are different ways.
You can do what jnprogrammer said, or you can run the graphql setup https://github.com/input-output-hk/cardano-graphql providing an entire stack of tools including the API (graphQL).
The graphQL query you're looking for could look like this
query {
  transactions(where: {outputs: {address: {_eq:"addr1..."}}}) {
    outputs {
      address
      value
    }
  }
}

and you'll receive a list of sending address and receiving address with the amounts in lovelace
If you don't want to build and run any of that yourself, you could also use a public API. I am not sure if there are any reliable public graphQL endpoints out there, but e.g. blockfrost.io offers a REST API.
The downside of that is you rely on a third party and you depend on that service being up to date with the network and always up and running. On the other hand, depending on your experience and admin skills, it can also be the more reliable option :)

2525: <p>For a web app, I'm wondering is there an API/SDK that enables you to execute some code every time an address receives ADA, NFT, or native token? The wallet address receiving does not change. If not, what repos should I start at for building this sort of functionality?</p>
<p>For example, I'm selling NFTs on my website and my wallet address is shown which anyone can send a specific amount of ADA to in order to get a random NFT from the collection. I want to execute the functions which pick a random NFT from the collection to mint every time my wallet receives the specified amount of ADA.</p>
 157: <p>How about running a Cardano node and build a script that queries the target address and produces something consumable by your API?</p>
 1919: <p>All the above solutions can do the job, but you'll end up polling the blockchain on each one. Another solution though is using <a href="https://www.tangocrypto.com" rel="nofollow noreferrer">tangocrypto</a> services. Their <a href="https://docs.tangocrypto.com/notify/notify/using-webhooks" rel="nofollow noreferrer">webhooks</a> feature will allow you to &quot;react&quot; to different blockchain events such as PAYMENT. So you just need to set up a webhook and start <strong>listening</strong> to a specific address. You will get a callback notifying you every time the address receive a payment.</p>
 2335: <p>What info do you wanna get specifically? If it is just the UTXO's at an address and you are running a node then the following script suffices.</p>
<blockquote>
<p>#!/bin/bash</p>
<p>cardano-cli query utxo --mainnet --address $(cat ~/path/to/file.addr) &gt; ~/UtxosAtAddress</p>
</blockquote>
<p>If you would like more info on transactional data you could run the cardano-db-sync package in along side the node. Via this you can query a lot of data, but it does require some PostgreSQL knowledge.</p>
<p>Now if you have no interest in running a node or the cardano-db-sync, you could also query third party api's. A nice one to mention is Blockfrost that has multiple languages supported. For more info on this see their website [<a href="https://blockfrost.io/" rel="nofollow noreferrer">1</a>]</p>
 4074: <p>I believe this guide would help you out:
<a href="https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-wallet/" rel="nofollow noreferrer">https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-wallet/</a></p>
 899: <p>There are different ways.</p>
<p>You can do what jnprogrammer said, or you can run the graphql setup <a href="https://github.com/input-output-hk/cardano-graphql" rel="noreferrer">https://github.com/input-output-hk/cardano-graphql</a> providing an entire stack of tools including the API (graphQL).</p>
<p>The graphQL query you're looking for could look like this</p>
<pre><code>query {
  transactions(where: {outputs: {address: {_eq:&quot;addr1...&quot;}}}) {
    outputs {
      address
      value
    }
  }
}
</code></pre>
<p>and you'll receive a list of sending address and receiving address with the amounts in lovelace</p>
<p>If you don't want to build and run any of that yourself, you could also use a public API. I am not sure if there are any reliable public graphQL endpoints out there, but e.g. <a href="https://blockfrost.io" rel="noreferrer">blockfrost.io</a> offers a REST API.
The downside of that is you rely on a third party and you depend on that service being up to date with the network and always up and running. On the other hand, depending on your experience and admin skills, it can also be the more reliable option :)</p>
