#ironbeard

1 messages · Page 1 of 1 (latest)

dusty thicketBOT
frank field
#

Hey there

#

Are you responding to the webhook with a 200 when you receive it?

gleaming horizon
#

Yeah, I log the response right before returning it, and it shows 200

frank field
#

Can you provide an example Event ID?

gleaming horizon
#

Sure, one second

#

evt_1M2d1ACoTIfwbn28Y40LGWKs

frank field
#

Are you doing other actions before returning the response here?

#

To me it looks like it is timing out before getting a response

#

You should always respond immediately, then handle your other actions

gleaming horizon
#

yeah, I just tried to send the data myself and I think it's timing out too

#

Gotcha.. so does that mean I need to look into the response being async?

frank field
#

Yep

#

You should move your response to the beginning of your handler

gleaming horizon
#

Gotcha, I'll have to figure that out. Thanks for the advice!

frank field
#

np!

gleaming horizon
#

Kind of a separate question, but saw this thread was still open: is it possible to "expand" the "latest_invoice.payment_intent" when creating/updating a subscription?

Right now I'm making one call to create/update then doing a "read" call to expand the invoice/payment_intent in order to send client_secret to front end.

frank field
#

Yep

#

You can expand on POST requests

#

And the response will include the expansion

gleaming horizon
#

nice, that's good to know. Thanks! 🙂