#blackgriffen237-ephemeral-key-for-SI
1 messages · Page 1 of 1 (latest)
or you have to use the customer id
Hello 👋
Could you provide me more information on the use-case here?
on the backend i have ephemeral key for ios
i was wondering if i could use that for web as well setting up a setup intent
and if not and there is no customer id for the setup intent is there some other mapping i can use so when the response comes asynchronously i can do the mapping on the backend
sorry not used to discord not sure if i’m doing this right
Let me look into it.
Just juggling between a few threads at the moment
ok thanks is this the right place to ask ? and this private thread to discuss?
Yup this is the right place
Thank you for your patience.
We don't recommend that you use Ephemeral keys for web as they're designed to work with mobile SDKs.
AFAIK In order to create an Ephemeral key, you'd need a customer right?
yes the backend has the customer
f not and there is no customer id for the setup intent is there some other mapping i can use so when the response comes asynchronously i can do the mapping on the backend
I'm not sure what you mean by this. Can you give me an example?
well on the web site the user will add a payment with setup intent right ?
but according to the video associated with that you can skip the customer id
and attach the customer to the payment instrument later
so without giving the web app the customer id
how can i map the asynchronous response back to the customer
the webhook for the asynchronous response is on the back end, not the web app
i just want to mimic the mobile device flow, the mobile device never sees the customer id
i want to maintain the customer id on the back end without sharing it with the web app
does that suffice as an example?
I don't know if stripe.js supports ephemeral keys though
well im not asking for ephemeral key specifically, is there ANY way to map the payment intent to customerid on the back end?
Okay wait
Let's take a step back here as your original ask mentioned ephemeral keys.
If I understand it correctly, (feel free to correct me at any point)
- You want to create a SetupIntent (server-side)
- Confirm it (client-side)
- Associate it with a customer (server-side)
change the first step to client-side without a customer id and you have it
Ah okay. Thanks for clarifying.
What are you planning on using on the client-side? Stripe checkout, Stripe.js ?
stripe checkout
Pre-built checkout page correct?
gotcha. let me quickly check something.
thank you
catching up here one sec @marsh temple
mind summing up your question in one line, if possible?
sorry?
using stripe checkout on the client side, is there anything i can use instead of the customer id to map the payment intent on the back end to the customer id when the asynchronous webhook is called
nope, you just use the Customer ID of the Customer that completed the CheckoutSession
would metadata work?
that can work too