#Att89-pi-questions
1 messages · Page 1 of 1 (latest)
Now if the user wants to cancel the process, i would also cancel the payment intent, but this is not possible in the client side with JS, am I right?
Correct, needs to be called from your server using your secret keys: https://stripe.com/docs/api/payment_intents/cancel
How can I determine the Payment Intent on server side with having only the client secret?
You can't, you'd need the ID. But you can with Stripe.js: https://stripe.com/docs/js/payment_intents/retrieve_payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You could just return the Payment Intent ID along with the client_secret from your backend after creation
OK, thank you. So it is not unsafe to send the ID in the RequestBody?
Nope, not at all. Can only be used with your account secret key
OK :), many thanks!
Np!