<p>Not sure what you mean by last payment because multiple payments to the same address could be included in the same block and therefore included at the same time.</p>

<p>Anyway:</p>

<p>You could use <code>getreceivedbyaddress</code> however you would still have to filter out all the transactions that you dont want.</p>

<pre><code>getreceivedbyaddress &lt;bitcoinaddress&gt; [minconf=1]
</code></pre>

<blockquote>
  <p>Returns the amount received by  in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0. </p>
</blockquote>

CC BY-SA 3.0
2014-05-14T07:35:05.367Z
Yeah its seems like the only way to get the transaction Ids. What I do now is issue a new address every time I want a paypent then call getreceivedbyaddress <address> minconf to confirm payment, if they send more than once then thats still in the balance but it wont give me the txn ids
Abelgo
CC BY-SA 3.0
2014-05-14T06:22:19.720Z
2014-05-14T08:41:19.907Z
2014-05-14T08:41:19.907Z
UndergroundVault
<p>What is the best method of getting the transaction id for the last payment sent to an address with <em>n</em> confirmations ?</p>

<p><code>getbalance address</code> with minconf will give me a balance
but what I would like to do is get the full details of the last transaction made to an address, not only the balance.</p>

<p>I could do a something like <code>listtransactions</code> then filter out the data, I was wondering is there a simpler way that would not require me first to know the account associated with the address.</p>

<bitcoind><bitcoin-core><json-rpc>
BitCoin RPC calls
Abelgo
# BitCoin RPC calls

(Asked by: username_0 on 2014-05-14)

What is the best method of getting the transaction id for the last payment sent to an address with *n* confirmations ?

`getbalance address` with minconf will give me a balance
but what I would like to do is get the full details of the last transaction made to an address, not only the balance.

I could do a something like `listtransactions` then filter out the data, I was wondering is there a simpler way that would not require me first to know the account associated with the address.

**Tags:** bitcoind, bitcoin-core, json-rpc


---

## 1 answers

### Answer by username_1 on 2014-05-14. Score: 1

Not sure what you mean by last payment because multiple payments to the same address could be included in the same block and therefore included at the same time.

Anyway:

You could use `getreceivedbyaddress` however you would still have to filter out all the transactions that you dont want.

```
getreceivedbyaddress <bitcoinaddress> [minconf=1]

```

> Returns the amount received by in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0.

> **Comments:**
> **username_0**: Yeah its seems like the only way to get the transaction Ids. What I do now is issue a new address every time I want a paypent then call getreceivedbyaddress <address> minconf to confirm payment, if they send more than once then thats still in the balance but it wont give me the txn ids  

---

