What you have described is a complete subsystem, not a bot or a technology. That subsystem would need to include multiple parts such as user and payment database, payment gateway and/or paypal transaction processing application, payment event/status driven access controls, etc.
At this point you have an idea, but not a plan or anything with which others can really help. The language(s) chosen for implementation would depend on the specification and your available skills, neither of which are known to us.
I would suggest that you search for terms such as
payment gateway and
online fulfillment software as a good starting point.
Also, please review the
LQ Site Faq for help in asking a complete question. The better and more complete your question, the better replies you will receive.