Xendit has defined a standard of 30s timeout in webhook to keep the consistencies and performances over transaction to ensure stability and resiliencies after deep assessment and thorough consideration to give the best experience for our customer.
If your application responds longer than 30s, Here’s what we recommend that you could consider do :
- Ack the message and save into persistent storage (database, object storage service, or any other storage that is persistent)
- Once the message is stored and acked, application can return 200 as response status.
- You can then design in your application as such to consume back the list of messages you have stored in your storage mentioned above and update your transaction accordingly based on the webhook message payload retrieved from your storage.
- By having such recommendation, not just the application could benefit from refraining timeout but also give resiliency in the event of reconciliation of your transaction should you need it as well as having to keep records of webhook which contains your payment latest updates from Xendit.