#votsircp-subscriptions

1 messages · Page 1 of 1 (latest)

proper root
#

@noble cape are you looking at it on the frontend(like the response of confirmCardPayment?) charges is not returned on the frontend, you have to look at the PaymentIntent on a backend with a secret key instead.

noble cape
#

yes, frontend, as the result of calling confirmCardPayment

#

ah, i see

#

hmmm, how do i get such key?

proper root
#

well you already have one(since you used it to create the Subscription object on your backend server).

#

I'm not sure what specific information you want from the charges array, but generally your frontend would e.g. send the pi_xxx PaymentIntent ID to your backend, which can call https://stripe.com/docs/api/payment_intents/retrieve and then return back whatever information your frontend is looking for.

noble cape
#

i'd like to get the charge id

#

like charges[0].id

#

ok, i understand