#Pavan-paymentmethods

1 messages ยท Page 1 of 1 (latest)

winged basalt
lyric heart
#

client_secret is only used to update payment details? Can we use the same for calling Stripe API's and retrieve payment methods

winged basalt
#

you can't no, it has to be done on a backend server using a secret API key

lyric heart
#

What is the use of publishable API key ?

winged basalt
#

to create PaymentMethods mostly

lyric heart
#

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

turbid arch
#

๐Ÿ‘‹ catching up here

lyric heart
#

๐Ÿ‘

turbid arch
#

@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).

lyric heart
#

What are the those actions that client can perform with PaymentIntent and Setup Intent secrets ?

#

I am just trying to understand more.

turbid arch
#

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.

lyric heart
#

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 ?

turbid arch
#

They would be up to you to deliver to your client application form the server, but are perfectly reasonable things to display.

lyric heart
#

Can these be pulled using publishable api key from frontend ?

turbid arch
#

No, you cannot retrieve existing customer payment payment methods from the client

#

Price info is also secret only, but is something you can cache in your client app though, it's not necessary to retrieve each time.