#Pavan-paymentmethods
1 messages ยท Page 1 of 1 (latest)
@lyric heart your frontend calls your backend, and your backend calls Stripe's API https://stripe.com/docs/api/payment_methods/list and returns the relevant information for your frontend to display
client_secret is only used to update payment details? Can we use the same for calling Stripe API's and retrieve payment methods
you can't no, it has to be done on a backend server using a secret API key
What is the use of publishable API key ?
to create PaymentMethods mostly
Any examples i can refer where exactly publishable api key is getting used. And also in custom flow while creating subscription, client secret is passed to frontend from backend, which is used to update payment. What are all uses of that client secret ?
@winged basalt
๐ catching up here
๐
@lyric heart can you rephrase your question? What are you trying to do?
Payment and Setup intent client secrets are used to take some actions client side that would otherwise be limited to server requests (eg, confirming a payment intent).
What are the those actions that client can perform with PaymentIntent and Setup Intent secrets ?
I am just trying to understand more.
Confirmation, handling 3ds action, etc things like that. There might be others but it's better to think in flows and applications rather than capabilities of the keys/secrets.
Agree. My use case is mostly around creating subscriptions and collect payments in recurring fashion. Just try to understand what frontend can handle and what needs backend intervention. Suppose to show last 4 digits of card, billing period of price in a subscription etc
Can frontend handles these ?
They would be up to you to deliver to your client application form the server, but are perfectly reasonable things to display.
Can these be pulled using publishable api key from frontend ?