#Vane-cancel-payment
1 messages ยท Page 1 of 1 (latest)
Hello! If you're using Payment Intents you can just cancel the Payment Intent (https://stripe.com/docs/api/payment_intents/cancel)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hi, I've seen that and I understand, my question is just how would client pass that payments id?
do I pass client secret and access payment through there?
Is the issue that you don't have a Payment Intent ID client-side to be able to send back to your server to tell it to cancel?
Yeah, I mean I have clientSecret
I don't know how I would get the paymentintent id on client side
You can either retrieve the Payment Intent client-side with just the client secret (https://stripe.com/docs/js/payment_intents/retrieve_payment_intent) or you can also keep the Payment Intent ID client-side in addition to your cient secret
ah thank you, so cancelling is only server-sided right?
Yup!
thank you
just setup the cancelling, @wet fern , I see that the payment elements are still there? how would I delete them?
I believe you'd call destroy() (https://stripe.com/docs/js/element/other_methods/destroy)
๐