Hi Temesgen,
Thank you for reaching out. While ApiDog doesn’t directly support listening for webhooks, you can achieve this by leveraging your backend service to capture the webhook events and then using ApiDog to validate the data.
Here’s a suggested approach:
1.Capture Webhook Events in Your Backend:
Set up an endpoint in your backend service to receive Stripe webhooks.
When a webhook event is received, store the relevant data in your database.
2. Add a Post-Request Processor-Database Operation in ApiDog to query your database and validate the stored data against your expected result.
I hope this helps. If you have any further questions or need more detailed guidance, please let me know.
Thank you for you suggestion. Yes, we are already listening the stripe webhooks in our backend and we are processing the necessary logic in our backend based on the stripe webhook events.
The problem comes when we run the test scenarios during the CI/CD to automate the testing process. We have many test scenarios written for the endpoints on the ApiDog. We are unable to listen the stripe webhooks from ApiDog during the CI/CD.
I think the idea Emily mentioned would work. Let me explain it with more details:
You first need to record every Stripe webhook event on your backbend service that save it as a Stripe event logs Database table.
And then you can utilize Apidog post processer to get the row that match your logic from the event logs table since Apidog support connect to the database for corresponding environment.