<p>There is no &quot;message&quot; field in Bitcoin transactions, only the payment information is transferred on the network. While you can generate a label for a payment requests on your end, or include a label in the QR code for the benefit of the payer, neither would be transferred on the Bitcoin network. The proper way of distinguishing payments on Bitcoin is to give each payment a unique invoice address.</p>
<p>Instead of using plain Bitcoin Core, you may want to take a look at <a href="https://btcpayserver.org" rel="nofollow noreferrer">BTCPay Server</a>, which is a self-hosted open-source payment processing solution that facilitates on-chain and Lightning Network payments. If you want to continue using Bitcoin Core, look into the <a href="https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/listunspent/" rel="nofollow noreferrer"><code>listunspent</code></a> call.</p>
<p><sup>H/T to @Anonymous and @darosior, whose comments I've collected to write this answer.</sup></p>

CC BY-SA 4.0
2020-12-21T18:44:33.620Z
2020-12-21T18:44:33.620Z
Murch
<p>I'm new to bitcoin and want to take payments with it on my website.
Taking payment isn't a problem but the manually process of verifying payments and matching up with users is.</p>
<p>Is there any way to use an API to search the transactions to my address and look for specific text in the &quot;message&quot; field?</p>
<p>Thanks
Matt</p>

CC BY-SA 4.0
2020-12-20T13:16:53.247Z
There is no "message" field in Bitcoin transactions.
Claris
CC BY-SA 4.0
2020-12-20T13:29:49.750Z
Oh then I misunderstood. Because I can make a QR code that includes a message or "description". When I scan it my bitcoin wallet shows this in the send dialog box.
I wanted to include there like a user ID which I could match up to my back end database
Matt Deemer
CC BY-SA 4.0
2020-12-20T13:41:11.873Z
That's a message to appear in their wallet about who they paid to. It isn't part of the transaction, it isn't immutable. You need to give a unique payment address to every person who pays you, and that's how you know who paid you. This is how all services operate.
Claris
CC BY-SA 4.0
2020-12-20T13:43:46.560Z
Aaah ok thank you, now I understand.  So the message won't arrive at my wallet.
I'll continue my search for how to correctly implement payments on my site then.
Matt Deemer
CC BY-SA 4.0
2020-12-20T15:27:25.640Z
@MattDeemer you should probably look for integrated solutions, such as btcpayserver. If you still want to go with `bitcoind`, look for the `listunspent` call exposed by the JSONRPC API.
Antoine Poinsot
CC BY-SA 4.0
2020-12-21T18:38:58.830Z
@darosior: That sounds more like an answer than a comment :)
Murch
<transactions><api>
How to search (via json API) transactions to my wallet?
Matt Deemer
# How to search (via json API) transactions to my wallet?

(Asked by: username_0 on 2020-12-20)

I'm new to bitcoin and want to take payments with it on my website.
Taking payment isn't a problem but the manually process of verifying payments and matching up with users is.

Is there any way to use an API to search the transactions to my address and look for specific text in the "message" field?

Thanks
username_0

**Tags:** transactions, api

> **Comments:**
> **username_1**: There is no "message" field in Bitcoin transactions.  
> **username_0**: Oh then I misunderstood. Because I can make a QR code that includes a message or "description". When I scan it my bitcoin wallet shows this in the send dialog box. I wanted to include there like a user ID which I could match up to my back end database  
> **username_1**: That's a message to appear in their wallet about who they paid to. It isn't part of the transaction, it isn't immutable. You need to give a unique payment address to every person who pays you, and that's how you know who paid you. This is how all services operate.  
> **username_0**: Aaah ok thank you, now I understand.  So the message won't arrive at my wallet. I'll continue my search for how to correctly implement payments on my site then.  
> **username_2**: @username_0 you should probably look for integrated solutions, such as btcpayserver. If you still want to go with `bitcoind`, look for the `listunspent` call exposed by the JSONRPC API.  
> **username_3**: @darosior: That sounds more like an answer than a comment :)  

---

## 1 answers

### Answer by username_3 on 2020-12-21. Score: 2

There is no "message" field in Bitcoin transactions, only the payment information is transferred on the network. While you can generate a label for a payment requests on your end, or include a label in the QR code for the benefit of the payer, neither would be transferred on the Bitcoin network. The proper way of distinguishing payments on Bitcoin is to give each payment a unique invoice address.

Instead of using plain Bitcoin Core, you may want to take a look at [BTCPay Server](https://btcpayserver.org), which is a self-hosted open-source payment processing solution that facilitates on-chain and Lightning Network payments. If you want to continue using Bitcoin Core, look into the [`listunspent`](https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/listunspent/) call.

H/T to @Anonymous and @darosior, whose comments I've collected to write this answer.


---

