<p>You are correct that the QR code would be of the wallet's private key. But for obvious reasons, you would need to generate a new address and private key for each user, otherwise, people would be sharing wallets together. You would need to load each wallet before displaying its private key in QR code format by sending funds to the wallet's address.</p>

<p>There are bitcoin wallet apps on both Android and iOS that can import a wallet by scanning a private key QR code. The players of your game would need to download one of these apps to do this though, so that might be a small hurdle. This may not be the best way to distribute bitcoin to your users for two main reasons:</p>

<p>1) You would be able to move funds out of the wallets of your users, even after they've imported the wallet themselves. I'm not saying you would do this, but you could.</p>

<p>2) Whether the private keys come packaged with the game files or the game contacts a server to retrieve the private keys, they may be susceptible to theft.</p>

<p>It might be smarter to let the users input their Bitcoin address, and have your server send the bitcoins, instead. This is safer and requires zero trust between you and the users. There is no possibility of theft perpetrated by you or other users of the game, as long as the funds are not in a <a href="https://en.bitcoin.it/wiki/Hot_wallet" rel="nofollow">hot wallet</a>.</p>

<p>Further reading: </p>

<p><a href="https://en.bitcoin.it/wiki/Bitcoind#Wallet_Services" rel="nofollow">https://en.bitcoin.it/wiki/Bitcoind#Wallet_Services</a></p>

<p><a href="https://en.bitcoin.it/wiki/Paper_wallet#Redeeming_Keys_and_Withdrawing_Funds" rel="nofollow">https://en.bitcoin.it/wiki/Paper_wallet#Redeeming_Keys_and_Withdrawing_Funds</a></p>

<p><a href="https://en.bitcoin.it/wiki/Private_key" rel="nofollow">https://en.bitcoin.it/wiki/Private_key</a></p>

<p><a href="https://en.wikipedia.org/wiki/Bitcoin#Wallets" rel="nofollow">https://en.wikipedia.org/wiki/Bitcoin#Wallets</a></p>

CC BY-SA 3.0
2014-01-07T22:48:41.330Z
the problem is i would then need a camera to scan their qr code now which would require more hardware and extra coding to integrate a camera scanning feature into the game. i'm trying to take the method with least resistance.
Patoshi パトシ
CC BY-SA 3.0
2014-01-08T00:08:24.900Z
You can just have people type in their Bitcoin address or [firstbits](https://en.bitcoin.it/wiki/Firstbits).
Sam Weinberg
CC BY-SA 3.0
2014-01-07T22:12:27.143Z
2014-01-07T22:12:27.143Z
Sam Weinberg
<p>You would have to do this in a couple of steps, the first of which doesn't involve Bitcoin at all.</p>

<ol>
<li>User scans QR code using an app you provide.</li>
<li>Your provided app sends a request to your server. This request contains something that identifies the user (say, the user's Bitcoin address).</li>
<li>Your server sends Bitcoin to the user's address.</li>
</ol>

<p>Having said that, if you already have the user's Bitcoin address, then you should consider skipping the QR code entirely and proceed directly to step 3.</p>

CC BY-SA 3.0
2014-01-07T21:51:23.950Z
2014-01-07T22:02:12.090Z
2014-01-07T22:02:12.090Z
Greg Hewgill
<p>I'm currently trying to build a game where if the user reaches a certain amount of points they get rewarded with btc at the end of the game. But the thing is I would like the QR code to show up on the screen and the user would just have to scan it and they would receive the btc. Is there an application that can do such a thing? I'm guessing it would show the private key of the qr code. But is there a better method of doing this? </p>

<bitcoind>
How would you give away free bitcoins by letting the user just scan a qr code?
Patoshi パトシ
# How would you give away free bitcoins by letting the user just scan a qr code?

(Asked by: username_0 on 2014-01-07)

I'm currently trying to build a game where if the user reaches a certain amount of points they get rewarded with btc at the end of the game. But the thing is I would like the QR code to show up on the screen and the user would just have to scan it and they would receive the btc. Is there an application that can do such a thing? I'm guessing it would show the private key of the qr code. But is there a better method of doing this?

**Tags:** bitcoind


---

## 2 answers

### Answer by username_1 on 2014-01-07. Score: 1

You are correct that the QR code would be of the wallet's private key. But for obvious reasons, you would need to generate a new address and private key for each user, otherwise, people would be sharing wallets together. You would need to load each wallet before displaying its private key in QR code format by sending funds to the wallet's address.

There are bitcoin wallet apps on both Android and iOS that can import a wallet by scanning a private key QR code. The players of your game would need to download one of these apps to do this though, so that might be a small hurdle. This may not be the best way to distribute bitcoin to your users for two main reasons:

1) You would be able to move funds out of the wallets of your users, even after they've imported the wallet themselves. I'm not saying you would do this, but you could.

2) Whether the private keys come packaged with the game files or the game contacts a server to retrieve the private keys, they may be susceptible to theft.

It might be smarter to let the users input their Bitcoin address, and have your server send the bitcoins, instead. This is safer and requires zero trust between you and the users. There is no possibility of theft perpetrated by you or other users of the game, as long as the funds are not in a [hot wallet](https://en.bitcoin.it/wiki/Hot_wallet).

Further reading:

<https://en.bitcoin.it/wiki/Bitcoind#Wallet_Services>

<https://en.bitcoin.it/wiki/Paper_wallet#Redeeming_Keys_and_Withdrawing_Funds>

<https://en.bitcoin.it/wiki/Private_key>

<https://en.wikipedia.org/wiki/Bitcoin#Wallets>

> **Comments:**
> **username_0**: the problem is i would then need a camera to scan their qr code now which would require more hardware and extra coding to integrate a camera scanning feature into the game. i'm trying to take the method with least resistance.  
> **username_1**: You can just have people type in their Bitcoin address or [firstbits](https://en.bitcoin.it/wiki/Firstbits).  

---

### Answer by username_2 on 2014-01-07. Score: 1

You would have to do this in a couple of steps, the first of which doesn't involve Bitcoin at all.

1. User scans QR code using an app you provide.
2. Your provided app sends a request to your server. This request contains something that identifies the user (say, the user's Bitcoin address).
3. Your server sends Bitcoin to the user's address.

Having said that, if you already have the user's Bitcoin address, then you should consider skipping the QR code entirely and proceed directly to step 3.


---

