#yanqing_api

1 messages ยท Page 1 of 1 (latest)

drifting sableBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1331238266107723797

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

sick badger
#

The issue is that you have a webhook endpoint that didn't responded successfully to the event invoice.created

#

This is the webhook endpoint that didn't responded successfully we_1PkNYKByUW5gLVs3R6ZfZFY7

woeful cosmos
#

Hi @sick badger thanks for your response. We are following stripe's guide on updating webhook api versioning. So that's why we have a old version returning 400 directly and the new version handling correclty. We do have the new version returning 200 on this event evt_1QjgTAByUW5gLVs3GXZpZ0Q9

sick badger
#

Yes I see that, your old version should return 200 as well.

woeful cosmos
#

And it is what we did last time when we upgraded from another older version to the 2024-06. Back then we didn't experience this issue.

sick badger
#

I see what you mean, yeah for general use cases yes you should do so (in order to be able to retry if you want to revert back), however for events involved in automatic actions (like invoice auto advance) all your webhook endpoints should returns 200 as mentioned in the guide I shared.

woeful cosmos
#

But we would like to retry webhooks involved in automatic actions as well. For example, this invoice creation is automatic because it's subscription entering another cycle, etc. We would still like to be able to retry this. Also, can you point me to where it mentioned we should return 200 on automatic action events? Sorry I couldn't find it.

#

Also, does it mean for the invoice created via non automatic actions, and we return 400 on the old version handler, the finalise window would still be 72 hours?

sick badger
#

We would still like to be able to retry this
You can retry manually events using the cli or dashboard

woeful cosmos
#

Thanks, do you mean then we should return 200 on old versions NO MATTER what use case this is?

sick badger
#

the finalise window would still be 72 hours?
It depends on the auto advance status of the invoice, is it manual ot auraomtic

#

But manually created invoices are finalized automatically

#

the grace period of 1 hour are just for invoices created from a Subscription

woeful cosmos
#

I did, but it didn't mention when webhooks are returning conflicting response code

#

Let's set the conflicting webhooks aside now. I do have 2 follow up questions ๐Ÿ˜„

  1. if we do want the system to pick up the 1 hour default settings we have in our stripe account, do we need to return 200 on both webhook endpoints?
  2. is this 72 hours change introduced after 2024-06? Because we were doing the same thing but didn't experience the issue back then during our last upgrade.
#

Thanks for your help again

sick badger
#

if we do want the system to pick up the 1 hour default settings we have in our stripe account, do we need to return 200 on both webhook endpoints?
Yes.

#

is this 72 hours change introduced after 2024-06? Because we were doing the same thing but didn't experience the issue back then during our last upgrade.
No, AFAIK this is old behavior.