Help needed to link user ID to each order

Hi there,

I’ve been following this video [https://www.youtube.com/watch?v=bNx9DNWvf8s], and everything works as explained. However, I’m struggling to link the user ID to each order in the system. I can’t figure out how to associate the user ID with individual orders.

Could someone help me with this? Any guidance or suggestions would be greatly appreciated!

He seems to collect the user email in there as that’s part of the Stripe payload. Isn’t that enough for you to establish a relation?

The answer is yes, but if the user pays with a different email, I can’t track it, and it will cause confusion. Using the ID ensures that the user’s identity won’t change.

In this part where he sets this ID, I think you can combine the user’s ID with the product’s ID, something like: userID||productID.

Then split them out when you collect them later on.

image

Also, it seems like you can try using this instead of prefilled_email.

Per a comment last year, it seems doing this would prevent users from changing the email.