#nazarhotko_98683

1 messages · Page 1 of 1 (latest)

wary pathBOT
willow scroll
#

Hi! Let me help you with this.

#

Why would you pass the customer ID to the frontend?

lucid ocean
#

im passing the userId from my DB from frontend to my backend , where i create the customerId using stripe , so i can add that customerId to existing user from my DB

willow scroll
#

That should be fine.

lucid ocean
#

if someone changes the userId im passing , could it be that ill connect the customerId from stripe to another user hence the payment might be associated with another user?

willow scroll
#

I wouldn't recommend passing your internal user ID from the frontend but getting it based on the request authorization (I assume you authorize your requests). Or at least check if this ID exists in your DB.

#

But it's not related to Stripe, really.

lucid ocean
#

okay , thanks thanthankyou

willow scroll
#

Happy to help!