How to automate bitcoin wallet to send return payments to website subscribers?

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)