<blockquote>
<p>How can a bitcoin wallet even be programmed to automatically respond to incoming payments with a return payment?</p>
</blockquote>
<p>What is a bitcoin wallet, exactly? It can be just about anything that is programmed to create keys, check UTXOs and build/sign transactions... A bitcoin wallet can be programmed to do just about anything.</p>
<p>Your question is broad... You need to program it yourself. Build a database to keep track of addresses and payment codes and whatever else then build your site to interact with your database and your wallet, or build your own wallet.</p>

CC BY-SA 4.0
2021-01-28T02:49:19.170Z
How can a bitcoin wallet be programmed to respond to incoming payments with its own return payments? never seen that before, given that manual confirmation of payments is the norm. can you link a tutorial? "building a database" myself completely avoids the question about "automation"
user610620
CC BY-SA 4.0
2021-02-27T07:22:39.930Z
@user610620 You still have to build automation yourself, via maybe setting up a database etc. The process of setting your automation up is not itself automated :)
ieatpizza
CC BY-SA 4.0
2021-02-27T12:56:00.027Z
Ok how can it be done
user610620
CC BY-SA 4.0
2021-01-28T02:46:37.363Z
2021-01-28T02:46:37.363Z
m1xolyd1an
<p>When a .onion website sells subscription log-in accounts, they ask for subscription payment and say that a return payment will be received immediately after, containing the payment code for creating a user account.</p>
<p>For example, the subscription might cost <code>0.001 BTC</code>, so if the new subscriber pays that, and she receives <code>0.0002713 BTC</code> afterwards as a return payment, then the new user can create their account by entering the following fields in the registration form:</p>
<ul>
<li>Username</li>
<li>Password</li>
<li>Payment Code: <code>2713</code></li>
</ul>
<p>How can a bitcoin wallet even be programmed to automatically respond to incoming payments with a return payment?</p>
<p>and further, disguise the payment code in the return payment amount such that the form will associate a unique code to each new user (unless maybe they are just fixing the payment code to be identical for all users)</p>

CC BY-SA 4.0
2021-02-27T07:25:24.843Z
Why would you want to pay money to send confirmation codes to people? Why not just associate each of your recipient addresses with a particular user account, or make the payment confirmation code the user's transaction ID, or something?
ieatpizza
CC BY-SA 4.0
2021-02-27T12:56:25.757Z
Ok how can that be done
user610620
CC BY-SA 4.0
2021-02-27T21:40:26.237Z
Generate an address, then store it in your database as belonging to a user account. Check the address for payment, and when payment is received, mark the account paid. Or, if you want to go the payment code route: generate the address, then when the user submits a transaction ID, check that that transaction ID pays you the correct amount and hasn't been submitted before, then mark the account paid.
ieatpizza
<wallet><payment><payment-processors><micropayments><automation>
How to automate bitcoin wallet to send return payments to website subscribers?
user610620
# How to automate bitcoin wallet to send return payments to website subscribers?

(Asked by: username_0 on 2021-01-28)

When a .onion website sells subscription log-in accounts, they ask for subscription payment and say that a return payment will be received immediately after, containing the payment code for creating a user account.

For example, the subscription might cost `0.001 BTC`, so if the new subscriber pays that, and she receives `0.0002713 BTC` afterwards as a return payment, then the new user can create their account by entering the following fields in the registration form:

* Username
* Password
* Payment Code: `2713`

How can a bitcoin wallet even be programmed to automatically respond to incoming payments with a return payment?

and further, disguise the payment code in the return payment amount such that the form will associate a unique code to each new user (unless maybe they are just fixing the payment code to be identical for all users)

**Tags:** wallet, payment, payment-processors, micropayments, automation

> **Comments:**
> **username_1**: Why would you want to pay money to send confirmation codes to people? Why not just associate each of your recipient addresses with a particular user account, or make the payment confirmation code the user's transaction ID, or something?  
> **username_0**: Ok how can that be done  
> **username_1**: Generate an address, then store it in your database as belonging to a user account. Check the address for payment, and when payment is received, mark the account paid. Or, if you want to go the payment code route: generate the address, then when the user submits a transaction ID, check that that transaction ID pays you the correct amount and hasn't been submitted before, then mark the account paid.  

---

## 1 answers

### Answer by username_2 on 2021-01-28. Score: 0

> How can a bitcoin wallet even be programmed to automatically respond to incoming payments with a return payment?

What is a bitcoin wallet, exactly? It can be just about anything that is programmed to create keys, check UTXOs and build/sign transactions... A bitcoin wallet can be programmed to do just about anything.

Your question is broad... You need to program it yourself. Build a database to keep track of addresses and payment codes and whatever else then build your site to interact with your database and your wallet, or build your own wallet.

> **Comments:**
> **username_0**: How can a bitcoin wallet be programmed to respond to incoming payments with its own return payments? never seen that before, given that manual confirmation of payments is the norm. can you link a tutorial? "building a database" myself completely avoids the question about "automation"  
> **username_1**: @username_0 You still have to build automation yourself, via maybe setting up a database etc. The process of setting your automation up is not itself automated :)  
> **username_0**: Ok how can it be done  

---

