<p>The easiest way to do this is to have the QR code be a URL. For example, <code>http://www.example.com/bitcoingiveaway/E34IKJ</code>. Just assign a unique code to each location, the <code>E34IKJ</code> in my example.</p>

<p>What that web page does is up to you. It has to track how many times it has been accessed, of course. The first time, it can send a form that allows a person to fill in some kind of identifier, which can be a Bitcoin address. You then send them the coins (or if using some kind of account, credit their account).</p>

<p>Making this work without the scanners having Internet access is much trickier. It can be done, but it would require your to control the scanning devices such that they included a time stamp, and there would be no way to reliably inform people whether they were first right at the point of scan.</p>

<p>Another possibility for the "first come, get coins" model is to have the QR code be the actual private key used to claim the Bitcoins.</p>

CC BY-SA 3.0
2011-09-13T17:51:55.157Z
I would prefer the latter (have QR code somehow be actual private key used to claim the bitcoins). However, ideally it would not require any manual steps of behalf of participants other than scanning the code with their client on either iOS or Android. Maybe we aren't there yet with the clients...but would be nice to be able to use QR codes for a one step receipt of bitcoins rather than just a one step send.
lemonginger
CC BY-SA 3.0
2011-09-13T17:54:03.527Z
Then probably the best solution is to have the QR code be the private key, but also offer a web page where people can enter a private key and their Bitcoin address to have the balance transferred.
David Schwartz
CC BY-SA 3.0
2011-09-13T17:57:44.460Z
Depending on your knowledge level / abilities it may also be possible to grab one of the open-source Android clients and modify it to allow private key import via QR code scan.
David Perry
CC BY-SA 3.0
2011-09-13T17:43:31.143Z
2011-09-14T02:32:44.837Z
2011-09-14T02:32:44.837Z
David Schwartz
<p>QR codes are completely passive. They do not collect any information about the devices used to scan it.</p>

<p>If you want to set this up using only the Bitcoin network, you can create QR codes with private keys of Bitcoin addresses. The device used to scan the code should be able to import the private key and send its bitcoins to another address chosen by the user. The user should destroy the QR code afterwards to avoid <a href="https://bitcoin.stackexchange.com/questions/899/in-a-double-spend-attempt-how-is-the-valid-transaction-chosen">stealing attempts</a> by other users.</p>

<p>Having a "pool" of bitcoins in a QR code is not possible in this scenario. </p>

<hr>

<p>Since mobile clients currently can not import private keys, another easy way to do this would be with <a href="https://www.instawallet.org/" rel="nofollow noreferrer">Instawallet</a>. People would scan an Instawallet QR code, open the url, type in their address and cash out the bitcoins.<br>
But again, this solution does not allow for a bitcoin "pool". If you really want that feature you should design a dedicated website, like David Schwartz suggested in his answer.</p>

CC BY-SA 3.0
2011-09-13T18:01:16.647Z
I suppose I should have been more clear and asked, is there any mobile client that would support the following scenario using QR codes. Not the codes themselves.
lemonginger
CC BY-SA 3.0
2011-09-13T18:06:33.353Z
@lemonginger It shouldn't be hard to implement, but I don't know of any mobile client that currently supports this.
nmat
CC BY-SA 3.0
2011-09-13T20:21:28.250Z
@lemonginger As an alternative, you could encode an Instawallet URL.
nmat
CC BY-SA 3.0
2011-09-13T17:59:55.033Z
2011-09-13T20:21:25.847Z
2017-04-13T12:47:32.940Z
nmat
<p>Suppose I wanted to have a bitcoin treasure hunt, where QR codes were used. The first person who scanned a given QR code should receive some preset amount of bitcoins. Is this possible? (Preferably with as little need for knowledge on the part of the recipient as possible.) As a bonus, is it possible to have a single QR code to have a "pool" of 5 bitcoins it is attached to, give 1 bitcoin away per scan, but only allow scanning by unique devices. (ie; so 1 QR code could be used to claim 1 bitcoin for 5 unique devices) or easiest just to create 5 QR codes? Essentially the same functionality as the "send to QR code" in the Android client, only in reverse - (Scan QR code, and receive coins)</p>

<qrcode><receiving>
Using QR codes for bitcoin giveaway
lemonginger
# Using QR codes for bitcoin giveaway

(Asked by: username_0 on 2011-09-13)

Suppose I wanted to have a bitcoin treasure hunt, where QR codes were used. The first person who scanned a given QR code should receive some preset amount of bitcoins. Is this possible? (Preferably with as little need for knowledge on the part of the recipient as possible.) As a bonus, is it possible to have a single QR code to have a "pool" of 5 bitcoins it is attached to, give 1 bitcoin away per scan, but only allow scanning by unique devices. (ie; so 1 QR code could be used to claim 1 bitcoin for 5 unique devices) or easiest just to create 5 QR codes? Essentially the same functionality as the "send to QR code" in the Android client, only in reverse - (Scan QR code, and receive coins)

**Tags:** qrcode, receiving


---

## 2 answers

### Answer by username_1 on 2011-09-13. Score: 8

The easiest way to do this is to have the QR code be a URL. For example, `http://www.example.com/bitcoingiveaway/E34IKJ`. Just assign a unique code to each location, the `E34IKJ` in my example.

What that web page does is up to you. It has to track how many times it has been accessed, of course. The first time, it can send a form that allows a person to fill in some kind of identifier, which can be a Bitcoin address. You then send them the coins (or if using some kind of account, credit their account).

Making this work without the scanners having Internet access is much trickier. It can be done, but it would require your to control the scanning devices such that they included a time stamp, and there would be no way to reliably inform people whether they were first right at the point of scan.

Another possibility for the "first come, get coins" model is to have the QR code be the actual private key used to claim the Bitcoins.

> **Comments:**
> **username_0**: I would prefer the latter (have QR code somehow be actual private key used to claim the bitcoins). However, ideally it would not require any manual steps of behalf of participants other than scanning the code with their client on either iOS or Android. Maybe we aren't there yet with the clients...but would be nice to be able to use QR codes for a one step receipt of bitcoins rather than just a one step send.  
> **username_1**: Then probably the best solution is to have the QR code be the private key, but also offer a web page where people can enter a private key and their Bitcoin address to have the balance transferred.  
> **username_2**: Depending on your knowledge level / abilities it may also be possible to grab one of the open-source Android clients and modify it to allow private key import via QR code scan.  

---

### Answer by username_3 on 2011-09-13. Score: 1

QR codes are completely passive. They do not collect any information about the devices used to scan it.

If you want to set this up using only the Bitcoin network, you can create QR codes with private keys of Bitcoin addresses. The device used to scan the code should be able to import the private key and send its bitcoins to another address chosen by the user. The user should destroy the QR code afterwards to avoid [stealing attempts](https://bitcoin.stackexchange.com/questions/899/in-a-double-spend-attempt-how-is-the-valid-transaction-chosen) by other users.

Having a "pool" of bitcoins in a QR code is not possible in this scenario.

---

Since mobile clients currently can not import private keys, another easy way to do this would be with [Instawallet](https://www.instawallet.org/). People would scan an Instawallet QR code, open the url, type in their address and cash out the bitcoins.  
But again, this solution does not allow for a bitcoin "pool". If you really want that feature you should design a dedicated website, like username_1 username_1 suggested in his answer.

> **Comments:**
> **username_0**: I suppose I should have been more clear and asked, is there any mobile client that would support the following scenario using QR codes. Not the codes themselves.  
> **username_3**: @username_0 It shouldn't be hard to implement, but I don't know of any mobile client that currently supports this.  
> **username_3**: @username_0 As an alternative, you could encode an Instawallet URL.  

---

