#thepure-metadata-discordId
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Do you mean for collecting payments? How is this related to integrating Stripe?
I need to know which discord account the are signed in with so I can auto assign a role after payment.
How are you collecting payment method information?
I would like to use a payment link.
In that case I think you could achieve this by specifying a Custom Field for the customer's Discord account ID
https://docs.stripe.com/payment-links/customize#add-custom-fields
There is no way to grab that information automatically?
No
Hmm, I found a discord server that seems to have done this, maybe I will ask the what they are doing.
If so, that would be handled in their own code. You could collect the Discord account ID in your code and create a Checkout Session with that data already appended to it
Ah, I suspect that is exactly what they are doing. Could you point to some docs for that?
Well this is kind of just how Checkout Sessions work. So you would want to start with the overall doc for it: https://docs.stripe.com/payments/checkout/how-checkout-works
And just understand that metadata is valid parameter to pass whenever you are creating or updating the Session object. That is a good place to store any associated data you want to keep along with the record of the payment.
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-metadata
Thank yoiu.
Happy to help! ๐