#benomatis
1 messages · Page 1 of 1 (latest)
Because with web, everything is generally just done via publishable key
is there a doc on this somewhere? it isn't very clear to me what the reasons are... so for example existing card details can be retrieved on web via the Elements using the publishable key, but the PaymentSheet (mobile) needs the ephemeral key to do so?
existing card details can be retrieved on web via the Elements using the publishable key
Which call specifically are you doing where this is allowed?
it's a theoretical question, as I am just in the process of switching from CardElement, and haven't been allowing customers to save card data
I now started to use PaymentElement
would it not normally present the customer's previous cards if they chose the checkmark to save?
correct
You'd need to do that
And unless you've tested this, I don't think you can do it with a publishable key
The way to achieve it would be to make a call from the frontend to your backend where you'd make a serverside call to stripe
ephemeral keys just allow you to make calls that are usually sensitive temporarily
using the ephemeral key?
No
secret key from your server
You just can't use secret key on the frontend
On your server is totally fine
I still don’t understand the need for yet another key, why would I need a different type key on mobile? is this documented somewhere? don’t want to waste your time, happy to read about this if it’s explained somewhere in the docs
It's not well documented. See: https://stripe.dev/stripe-android/payments-core/com.stripe.android/-ephemeral-key/index.html and https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet#add-server-endpoint for more info. Ephemeral key basically allows you to temporarily query sensitive data from the frontend
Generally the pattern with web is to call your backend and get that data via your secret key
what’s confusing is that mobile has a way to save card, and web has Link, but the 2 are different things, correct? does Link exist at all on mobile?
Link is really a separate payment method. AFAIK that's only for the web
You can save cards for future usage on the web too though
Link is just a wallet payment method
And if you don't want to process payment but just save card: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
while Link is a wallet, if you choose to save your card details on mobile, it will behave similarly, no? their purpose is ultimately the same: prevent typing in your card details manually every time
Sorry I'm personally not one of our mobile experts
But can you link the mobile guide for saving card so I can suggest an equivalent if there is one
There definitely are certain features available on mobile that don't exist on web though
I followed this guide: https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet&locale=en-GB
it just looks and behaves almost exactly like Link
it’s as if Link was for web, and “save card” for mobile, but actually being a completely different service
I personally think it’s confusing if you support both platforms (web and mobile) for the same service
at least if you use the out of the box solutions…
Yeah that's fair
ok, thank you for your help, really appreciate it