#schinmay-setupintent

1 messages · Page 1 of 1 (latest)

violet relic
#

@deft wharf we don't share the customer id client side

#

it's something you set server-side on SetupIntent creation and you won't see it client side I think

deft wharf
#

interesting.. yeah, I see it in the CLI and API responses on the server side. just not on the client.

So given the SetupIntent is in place, what is the recommended way to get the customerId on the client? I am trying to route the next step after card creation to update Subscription plans on (a pre-existing) customer.

violet relic
#

You absolutely should not trust the customer id from the client

#

since I could change it and try to get a real one to charge their card

#

so you really handle all of this server-side

#

and server-side you know who this customer is, they are paying you or making a change to their account so you must have a session/cookie for them with all the info

deft wharf
#

ah..got it. thanks for the pointers. btw, the API docs are bit silent about not passing the customer property on the client.

violet relic
#

yeah I think some of it is more "obvious" design than it is Stripe specific

#

it's the same as passing the amount for a product client-side!

#

but I agree we could make things better