#mrcsj

1 messages · Page 1 of 1 (latest)

narrow eagleBOT
vale hamlet
#

You can listen to payment_intent.succeeded event, the timestamp of this event is the time when the payment is suceeded.

fluid patrol
#

But, the time when this event is notified to our service is still somewhat different from the actual payment time. Multiple retries after event notification failures, or factors such as network delays are common online problems. In addition to this method, is there any other way to obtain a more accurate payment time?

#

you mean the 'created' in event body?

vale hamlet
#

The event's created timestamp won't change if if the event was delivered after a few attempts

fluid patrol
#

ok, i got it

#

However, in some extreme cases, we do not receive the callback notification, and only obtain the status of the payment order by querying the paymentIntent interface. In this case, how to obtain the accurate payment time?

vale hamlet
fluid patrol
#

Ok, i both use paymentIntent retrive and event retrive? firstly i use payment intent retrive to obtain ths status of this intent. If it was success, then i use the event retrive to obtain the accurate pay time about this payment intent?
b.t.w when i retrive events i can give the payment intent id {pi_*} as request param to filter the events result?

vale hamlet
#

No you can't.

#

And I don't understand why you want to do all these. You can just simply listen to payment_intent.suceeded webhook event.

fluid patrol
#

yeah i know the webhook event can slove this question. But some times webhook events is not available in some extreme cases. In this stituation, we can also want to get the accurate pay time about specific payment intent. (webhook is not available and only retrive interface can works well)