#Jefu-payment_intent.payment_failed

1 messages · Page 1 of 1 (latest)

torpid charm
#

Hi, can you share the PaymentIntent id so I can review this?

torpid mountain
#

Sure, fyi this was triggered in our local environment pi_3LIc91GhGYHlMhY20iCMpssc

torpid bridge
#

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

torpid mountain
#

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?

torpid bridge
#

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

torpid mountain
#

Thank you for clarifying! Is this a quirk with Klarna specifically or is this expected behavior with other integrations with Stripe?

torpid bridge
#

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

torpid mountain
#

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?

torpid bridge
#

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)

torpid mountain
#

I see. And I'm assuming different payment methods have different ways of determining when a Charge object should get created after a failure?

torpid bridge
#

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)

torpid mountain
#

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?

torpid bridge
#

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

torpid mountain
#

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?

torpid bridge
#

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

torpid mountain
#

Okay. Thank you koopajah you've been very helpful!

torpid bridge
#

Sure! I'll flag this internally too so that we can investigate what's causing this one since you gave a concrete example