Stripe webhooks failing due to InvoiceNinja returning 405 - Method Not Allowed

Webhooks from Stripe to InvoiceNinja like payment_intent.succeeded and charge.succeeded are failing
In the Stripe webhooks dashboard it shows it’s due to HTTP status code 405 (Method Not Allowed)
InvoiceNinja v5.7.5

@david do you have any suggestions?

I confirm this is still happening after every payment done through stripe. The payments are coming through fine, but Stripe is always sending this email after the failures. I never touched any webhook settings in Stripe so it must be InvoiceNinja that set the webhook URL (I’ve taken out my domain below).

Hi there,

We’re still having trouble sending requests in live mode to a webhook endpoint associated with your account. Stripe sends webhook events to your server to notify you of activity in your Stripe account, such as a completed payout or a newly-created invoice.

The URL of the failing webhook endpoint is: https://MYDOMAIN/public/index.php/payment_webhook/FX1wXSVWYUk0vwE4aXkw4KTvMV6oQkzb/VolejRejNm

You (or someone on your team) configured your Stripe account to send events to that URL. You can change your account’s webhook endpoints from the Dashboard.

In most cases, a failing webhook does not impact your payments or payouts. However:

If you use subscriptions we rely on your webhook endpoint to notify you of new invoices. These invoices may be delayed for up to three days if your endpoint is unable to successfully receive them.

If you use Checkout and rely on the checkout.session.completed event as part of your purchase fulfillment process, you should review your completed payments to ensure you have fulfilled all recent purchases.

We’ve attempted to send event notifications to this endpoint 8 times since the first failure on January 16, 2024 at 1:11:09 AM UTC. If this endpoint is important to your application, please try and fix the issue. If you do not need this webhook endpoint, you can remove it from your Stripe webhook settings. We will stop sending event notifications to this webhook endpoint by January 25, 2024 at 1:11:09 AM UTC.

Here is the summary of errors we received while attempting to send webhook events:

8 requests had other errors while sending the webhook event.

You need to return any status code between HTTP 200 to 299 for Stripe to consider the webhook event successfully delivered.

For more details on these errors and to review your account’s recent activity, you can find the full set of events and request logs on the Dashboard.

This email is the last time we’ll reach out to you before disabling the webhook.

For more in-depth information on how to use webhooks, we recommend reviewing our documentation.

The Stripe team

No errors in laravel.log and no errors in system logs, just the web server access log shows 405 from stripe:
2024-01-21 15:20:03 - - [21/Jan/2024:15:20:03 -0500] “POST /public/index.php/payment_webhook/FX1wXSVWYUk0vwE4aXkw4KTvMV6oQkzb/VolejRejNm 1.1” 405 1017 “-” “Stripe/1.0 (+”

@hillel any ideas?

@david do you have any suggestions?