#Daniele - klarna webhooks

1 messages · Page 1 of 1 (latest)

gentle lava
#

Thank you for the info. Checking in to that payment

ebon fiber
#

any way i can look at the event?

#

in any case i believe i've provided you a wrong payment intent, that doesn't have klarna
still - shouldn't your webhook system retry attempts?

#

will find the klarna id now, one moment

gentle lava
#

Our system did retry the attempts and those timed out as well

#

Whoops copied the wrong link

ebon fiber
#

how many times are they retried?

gentle lava
ebon fiber
#

found the klarna one: pi_3L5edNI3vmos4cA71RQH9JNd

gentle lava
#

We don't have a specific number but we will retry sending an event to you for three days

#

Thank you checking in to that

ebon fiber
gentle lava
#

The payment for pi_3L5edNI3vmos4cA71RQH9JNd ultimately failed and it looks like your server did acknowledge the failure event (evt_3L5edNI3vmos4cA71CzhzmO9). Looking in to how you can see these events in the dashboard...

ebon fiber
gentle lava
ebon fiber
#

yes, that works now

ebon fiber
gentle lava
#

I do not know why it is showing up differently for me

#

Checking in to that PI more...

#

Every way I can view that payment intent it is still showing as incomplete and having a status of requires_payment. Can you try pulling that payment intent with an API call and see if you see that status there?

ebon fiber
#

@gentle lava i believe the issue was that:
payment created, marked as successful and money taken from the customer’s bank account
after they were taken however an additional step was required (klarna 3dsecure?), which couldn’t have been done and thus resulted in that

#

is that possible?

gentle lava
#

As far as I can see that payment started in a requires_payment_method state and transitioned to a requires_action state after being confirmed which is expected here. As far as I can see, that payment should not have shown up as "Succeeded" on the Dashboard

ebon fiber
gentle lava
#

Is it possible that that screenshot is of another payment? Could your system have created two payment intents for one of your invoices?

ebon fiber
#

Nope, it's one payment intent for one invoice, the invoice id on the screenshot match with what i've sent here so far

nocturne dagger
#

Hello 👋
Taking over here
Give me a moment to catch up, thanks 🙂

ebon fiber
nocturne dagger
#

Sorry I'm confused.
Where exactly is it showing pi_3L5edNI3vmos4cA71RQH9JNd succeeded?

nocturne dagger
ebon fiber
#

Yes, i’m asking about the klarna one which is shown as succeeded on our client connected account but your colleague said that it was never processed

nocturne dagger
#

both PaymentIntent have klarna payment methods
Let's take a step back here

ebon fiber
#

So.

#

this one i've just shared is linked to pi_3L5edNI3vmos4cA71RQH9JNd

#

stripe shows it as succeeded, however requires_action is still missing from the customer
customer does not complete requires_action, so payment on stripe turns from succeeded to incomplete

#

cause this is shown as well, it seems like it was succeeded but then turned into incomplete

nocturne dagger
#

So there are two PaymentIntents here for this one invoice that you're referring to ( 9f5bce-6af3142649-4d0ef0)

#

One succeeded
One failed (and is still pending)

ebon fiber
#

Mh yeah i'm seeing, how can there be multiple payment intents for the same invoice?

#

I mean sorry, that was more of a question for myself since it's on our code the issues

#

lol, so basically the error is that we're creating multiple payment intents for the same invoice

nocturne dagger
ebon fiber
#

could you please check if those other payment intents have klarna as well? are they different in any way?

#

alright interesting, the other two payment intents seem to be using sofort rather than klarna

nocturne dagger
#

The request is coming from Sellix

#

but going back to your original question, they're probably looking at different PaymentIntents at different times and are getting confused.

ebon fiber
#

So i think i might know what happened here

#

User paid with klarna, but whilst waiting for your webhook he changed gateway on our website to sofort

#

So our website changed the payment intent validation to the new pi (incomplete one), when we received the webhook we validated it against the invoice, it was different so we returned a 400 to you

#

Any way you can think of to improve this logic?

#

However they are all through sofort, all three payment intents

nocturne dagger
#

I'm not super sure to be honest as I don't know your integration very well to make any recommendation