#Jefu-payment_intent.payment_failed
1 messages · Page 1 of 1 (latest)
Sure, fyi this was triggered in our local environment pi_3LIc91GhGYHlMhY20iCMpssc
that's kind of expected as this attempt didn't cause a failed charge to be created, it just failed. It's definitely something we could improve. I'd recommend raising to our support team so that they can escalate to the product team: https://support.stripe.com/contact
I see. Just to clarify, can you please explain what you mean by " this attempt didn't cause a failed charge to be created, it just failed"? I.e. what's the difference between a failed charge and a failure, in this instance?
The PaymentIntent confirmation failed, but no Charge object was created. There isn't always a failed charge
and payment_method_details doesn't live on PaymentIntent it lives on the associated Charge object if one is created
Thank you for clarifying! Is this a quirk with Klarna specifically or is this expected behavior with other integrations with Stripe?
Just to add a bit of context we triggered the Approved: false flow on Klarna's end https://docs.klarna.com/resources/test-environment/#klarna-payments-test-triggers
It can happen with other payment methods, so you want to always look at last_payment_error on the PaymentIntent too in that event to understand what caused it
Understood, thank you. So to recap: payment_method_details will only appear if a Charge object was created
When do Charge objects typically get created?
When the underlying PaymentIntent is confirmed, but not always
For a successful payment there's always a charge, for a failure, it depends (like this case)
I see. And I'm assuming different payment methods have different ways of determining when a Charge object should get created after a failure?
yep
so mostly if you look at last_payment_error and also the associated Charge in the charges list if any and confirm the most recent one is associated with this event (based on created basically)
Thank you! My last question: is there anybody we can reach out to to better understand which situations Klarna creates a Charge object and which situations they do not?
Not really, I'm your best person really
but it doens't really matter to know the situations right?
Mostly all you need to know is that it doesn't always happen and so you have to plan for both options
I suppose you're right. Sometimes we'll have payment_method_details sometimes we won't. In the situations we won't, look at last_payment_error
Is that the gist of it?
Yeah
I can't really give you the specifics unfortunately especially for all payment methods
each one can subtly differ (I wish it wasn't the case, which is something we are trying to improve)
So until we properly create a Charge for every failure, you have to basically approach it defensively and always look at both
Okay. Thank you koopajah you've been very helpful!
Sure! I'll flag this internally too so that we can investigate what's causing this one since you gave a concrete example