I want to have a Discord server for paid members. I thought I could make them pay over Stripe, send them an invite on payment, and then regularly run a Python script, which checks whether all my Discord members have a valid subscription. For this to work I need a logical connection between the payment and the Discord member.
I thought the logical connection would be the invite, but I can't seem to figure out how to do this. I studied the Discord API, but it seems the invites are not unique to members nor I can track down which members used which invites.
Also, I can't even see the members' e-mail address. Not that e-mails would be the best logical connection, as one could use a different e-mail for subscription than for setting up their Discord account, but it would be at least a spark of hope. I discovered a permission/scope to see e-mails, but it seems to require a full, interactive OAuth2 flow, whereas I need to pair the members with payments using a non-interactive server-side cron script.
Could someone point me to the right direction?
Note: There are services like LaunchPass or Memberful, which can do this, hence there must be a way. I can code and I think I'd be okay with a much simpler mechanism then what they offer (one manually editable Google Sheets table and one Python script), so I'm trying to figure this out myself.