#yingwg

1 messages · Page 1 of 1 (latest)

woeful cloakBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

pastel fiber
mental drum
#

hi, what is difference between payment_intent.succeeded and charge.succeeded? we are currently listen to payment_intent.succeeded event

pastel fiber
#

That works too, they are the same in that once the charge is succeeded, you would get both if you're listening to both

#

One is on the charge oject, and the other one is on the Payment Intent object.

mental drum
#

yeah, event with paymet_intent.succeded, I found the latest payments doesn't show up in search payments API

#

upon receiving the payment_intent.succeeded event, the webhook event handler is trying to all success payments from the customer that has made previously and do some post processing logic based on that

#

during the test I found each time, it is missing the latest payment

pastel fiber
mental drum
#

"id": "evt_3OgcDOLZYTcA9IFh14MBlECF",

#

event type: payment_intent.succeeded

#

then we call search payment API immediately with filer "customer:'cus_PSfS9x3cgCrP0e' AND currency:'usd' AND status:'succeeded' AND amount>0",

#

The the result give me $115, but it should $121

pastel fiber
mental drum
#

then why the search payment API doesn't include that payment?

#

we call search payment intent API when receiving this event

#

Is that because there is a propagation delay?

#

or because I didn't set the filter correctly?

pastel fiber
#

Don’t use search for read-after-write flows (for example, searching immediately after a charge is made) because the data won’t be immediately available to search. Under normal operating conditions, data is searchable in under 1 minute. Propagation of new or updated data could be delayed during an outage.

Please note that there is a data freshness lag.

#

If you make the request now, does the amount match?

mental drum
#

yes...

#

it matches if I wait a bit

pastel fiber
mental drum
#

would t hat be enough if I wait for 1 min?

pastel fiber
#

Under normal operating conditions yes

mental drum
#

okay, thanks!

#

let me give it a try

pastel fiber
#

Sure!

mental drum
#

one more question

#

does stripe set any default deadline on webhook?

pastel fiber
#

What does 'default deadline' mean?

The way webhooks works is that Stripe send real time events, https://stripe.com/docs/webhooks and expect you to return a successful response immediately. Otherwise, it will time out.

mental drum
#

if I return succcessful response after 30s, is taht okay?

pastel fiber
#

No, we recommend that you immediately respond. There is not a specific timeline we can share here

mental drum
#

okay

#

thanks

pastel fiber
#

Sure!