Nextjs request's order in async api

I have api endpoint to handle payment webhook requests. So it's multiple requests one by one which changes status of transaction and sometimes mine database updated in a wrong order. How it possible to ensure right order of requests in nextjs 13 ?
Was this page helpful?