Possible, but clunky and against Telegram TOS (they have implemented a native payment platform with Stars, which is made compliant with Apple and Google’s store rules).
You’d need to ask the user for their username at checkout, and then have your bot add them to the group. You’d need to store your users info in a table or in customer meta data in stripe so you can lock them out of the group when their sub expires.
If I were you, I’d look into Telegram’s native monetisation features for groups based on their own digital currency - stars.
The key step is for them to onboard their username and telegram user id to connect with their email address. You’d need to store this mapping in a mapping table - which will enable you to kick them out when they cancel the membership.
If you’d like this built for you, feel free to DM.