I am having a weird problem for more than a month now. First of all let me tell you my scenario, I have an external payment provider that charges my customers on a recurring basis, and whenever the payment in the third party provider is done it sends a webhook request to my application. In my application’s webhook handler it automatically creates an invoice for each payment through the Invoice Ninja API and it has been working great.
The only problem is that sometimes some invoices don’t get created at all and when I look in my application logs I see that the endpoint “https://invoicing.co/api/v1/invoices/” returned “message”: “Server Error”.
literally from around 10 invoices it happens randomly to one or two of them and always a different invoice or a different client. so it can’t be a permission problem because most invoices work except one or two. and the invoice which returned an error during creation I can still see it in the UI as a “Pending” invoice which doesn’t have a number
I have tried everything to debug this problem but I can’t debug it since it’s initiated from a webhook to my server and everytime I do it manually all the invoices get created normally!
do you have any info on this? thank you