Retrieving discord ID's from patron list

Hi, I am making a Discord bot and I am trying to add a premium function. I want to make it so that whenever someone buys something I can get their Discord user id So i can give them the premium access. I am using Discord.js.

Hi @braedan7878!

We have member webhooks in our API that can let you know when someone has pledged (given money to) a creator:

You can get discord information from there, but the member object doesn’t have discord information directly; for that, you need to include the user (add a query param for include=user.null). In addition, you need to specify which fields to include (another query param fields[user]=social_connections,first_name,last_name,.... See for which fields can be requested on the user object and for an explanation of the JSON:API standard for requesting includes/fields.

Discord information can be found in the social_connections field

Please reach out if you have further questions!