#nazarhotko_98683
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Why would you pass the customer ID to the frontend?
If you create PaymentIntents before collecting the Payment Method from the customer, you should create it with customer parameter set: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-customer
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
That should be fine.
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?
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.
okay , thanks than
Happy to help!