#surgical
1 messages · Page 1 of 1 (latest)
Hello! Can you give me an example Event ID or Charge ID so I can take a look?
You got that Event because you canceled the associated Payment Intent in this request: https://dashboard.stripe.com/logs/req_d3E6IFI1YUXTgK
this makes sense. but how can a charge.refunded have a status of success if the associated intent was canceled?
Not sure I follow, what do you mean exactly?
Are you talking about the status on the Charge or the status on the Refund?
If I created a payment intent, and then canceled the intent, how can there be a refund on something I never paid?
i see this as the charge refunded, but how can there be a successful refund in the first place, if the payment intent was canceled?
The Payment Intent was canceled after the capture (and thus the Charge) succeeded.
You created the Payment Intent here: https://dashboard.stripe.com/logs/req_OLmAXWjHlRwkZe
It was confirmed here: https://dashboard.stripe.com/logs/req_CgF7ZBqwanYiH7
And then you canceled it.
The confirmation succeeded though.
hmm. maybe my logic is out of order? Currently we send an email thanking them for email, upon a payment.intent_succeeded. We also send a refund email when charge.refunded has succeeded. So we're sending a refund email, when the original intent didn't succeed. Is my approach incorrect?
I only see this happen a couple times out of 100 charges, so I'm unsure what causes this
I think there's a misunderstanding, yeah. You're doing separate authorization and capture, meaning you're placing a hold on funds. You successfully placed the hold, but that doesn't mean the entire Payment Intent succeeded. It won't succeed until you capture the funds (which you didn't do), but the Charge succeeded (because you placed the hold successfully).
Got it. During a refund.succeeded webhook, is there a way to determine if that refund is using captured funds and not just held?
the intent (no pun intended) is to send an email to the customer saying they are getting their money back
Yeah, the charge.refunded object contains the Charge, and it will have an amount_captured property saying how much was captured, and also a captured boolean. You can use those to determine if the funds were captured or not.
I'll take look. Thank you so much!
Happy to help!