#hoyong_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234592996817633311
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello Charge objects refer to any charge from any payment method, so charge.regunded can work here. If you try this in test mode you should be able to see what that event looks like.
Do you know what doc you saw that we say that Charges only refer to card charges? I will make sure we fix that doc
I see. So, when payment_intent gets refunded through the Stripe dashboard, it will still fire that charge.refunded event?
I was mostly looking at https://docs.stripe.com/api/webhook_endpoints/create#create_webhook_endpoint-enabled_events
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it isn't really clear that charge.rufunded can be used for payment_intent
having payment_intent specific evnets and charge specific events made me a bit confused that they are related
Yep, payment intents create charges. So events will often get triggered for both. Here only the charge event exists, but it will be created because the refund is being created on the payment intent's underlying charge
That's good to know. Thanks so much.
I have another webhook related question. Can a payment_intent be canceled through the dashboard? When I checked, it's not possible.
And this is a dashboard related question, but do you support creating a custom link for an existing payment_intent? I also tried, but I can only create a payment_link when I create a payment_intent through the dashboard.
I am 99% sure you can cancel via the dashboard but am not immediately seeing the button. I will confirm one way or the other and will get back to you
Unfortunately we don't support creating a payment link or checkout session for an existing PI
Thanks. Then, I guess it should be worth to create the webhook for canceling a PI to make sure I can account for it in my system.
So, there is no way for the user to make a payment for the existing PI without using the UI I am building (I am a service provider)
Not for the existing PI, but you can definitely cancel it via the API and then create a Checkout Session that makes a PI for the same amount
This makes me wondering if I should create webhooks for charge.succeeded as well as payment_intent.succeeded
Just one or the other should work. Both events will always get created for the same payment succeeding, so you only need to subscribe to one for your server to get the signal that the payment has succeeded
Cool. That's good to know.
Do you have the answer for canceling an existing PI through the dashboard?
From the dashboard, you can cancel payments when they have held funds but have not captured them yet. For all other states, only the API can capture them https://docs.stripe.com/refunds#cancel-payment
đ¤ˇ
So it depends on your usecase
I am honestly a bit surprised by that but it is good to have a definitive answer from the docs
Yeah. That's good to know. Less thing to write in the code base haha.
Thanks for checking.
I really appreciate for the answers! Thanks a lot.
Of course, happy to help!