user134147: I have a website that will show a QR code of my bitcoin wallet (public key), I will ask the client to deposit bitcoins there, I want to know which wallet (public key) was the one that deposited this in order to know which client is paying for a service that I am going to give you. I am using Python and Django to create the WEB page

user5406: That won't work: Bitcoin transactions do not reliably identify the sender.
Bitcoin addresses are unlike (e)mail addresses. Think of bitcoin addresses as "invoice identifiers": whenever you want to get paid, request to be paid to a new address on your invoice. Then, whenever you get paid, you know which invoice was paid.
Bitcoin wallets have many addresses and addresses should not be reused.

user208: You cannot; Bitcoin has no concept of a "sender" of a transaction.
If you want to know which invoice/bill has been paid, give out a new address for every payment you expect.
Bitcoin block explorer sites sometimes do show the "input addresses" of a transaction, but these do not have the properties you generally expect from a sender:

There may be 1, or more, or even no identifiable input addresses.
The addresses may not all belong to the sender, in case of a payjoin transaction.
The addresses may not belong to the sender at all. For example if the sender uses an exchange site, the addresses you see will belong to the exchange.
You don't know anything about where money goes if you'd try to send coins back there. If you want a refund address, you need to ask the payer for one.


134147: <p>I have a website that will show a QR code of my bitcoin wallet (public key), I will ask the client to deposit bitcoins there, I want to know which wallet (public key) was the one that deposited this in order to know which client is paying for a service that I am going to give you. I am using Python and Django to create the WEB page</p>
 5406: <p>That won't work: Bitcoin transactions do not reliably identify the sender.</p>
<p>Bitcoin addresses are unlike (e)mail addresses. Think of bitcoin addresses as &quot;invoice identifiers&quot;: whenever you want to get paid, request to be paid to a new address on your invoice. Then, whenever you get paid, you know which invoice was paid.</p>
<p>Bitcoin wallets have many addresses and addresses should not be reused.</p>
 208: <p>You cannot; Bitcoin has no concept of a &quot;sender&quot; of a transaction.</p>
<p>If you want to know which invoice/bill has been paid, give out a new address for every payment you expect.</p>
<p>Bitcoin block explorer sites sometimes do show the &quot;input addresses&quot; of a transaction, but these do not have the properties you generally expect from a sender:</p>
<ul>
<li>There may be 1, or more, or even no identifiable input addresses.</li>
<li>The addresses may not all belong to the sender, in case of a payjoin transaction.</li>
<li>The addresses may not belong to the sender at all. For example if the sender uses an exchange site, the addresses you see will belong to the exchange.</li>
<li>You don't know anything about where money goes if you'd try to send coins back there. If you want a refund address, you need to ask the payer for one.</li>
</ul>
