#manu_occhia-events

1 messages · Page 1 of 1 (latest)

stable nexus
#

Do you have the ID of the payment intent that that happened for?

dark island
#

pi_3K6y1vAKy7tT9lVJ0sFNpzfr

#

I notice that this happend only the first time I use the method for off session payment, but not in subsequent ones

stable nexus
#

So to clarify, you got both the succeeded and created events. The issue is that created came after succeeded?

dark island
#

In the last one I get info of payment intent with:

  • status: require_payment_intent
  • no charge object
  • amount_received: 0
#

and yes is created event

stable nexus
#

Are you saying you have seen created events that has a successful charge?

dark island
#

No, I get first payment_intent.succeded with charge and payment completed info,
and after payment_intent.created event with no charge and require_payment_method status.

stable nexus
#

Gotcha.

#

Unfortunately we can't guarantee the ordering of events even for things like this where one clearly came after the other.

dark island
#

Got it, do you have any suggestions for these problems? according to what you tell me any information I receive from the events regarding payments or accounts can potentially be out of date, I should use the events to get the element id and request stripe with an additional api call (for example a retrive payment intent) the updated info?

#

or just don't consider the payment_intent.created..

stable nexus
#

Looking in to what might be the best way to check in this case.

#

For events on the same object, you may be able to check the created timestamp on the event to see if the event you are looking at is later than the one you most recently saw.

dark island
#

This is a great idea, thanks for your help

stable nexus
#

For this, I might also check the status if the timestamps are the same.