Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

t9toqwerty's avatar

Unable to Call Methods in custom Stripe Webhook Handler

I have created a Controller to handle additional stripe webhook as instructed at https://laravel.com/docs/5.3/billing#defining-webhook-event-handlers .

But the methods are never got called .

By debugging i found that the problematic section is in cashier's WebhookController Class and handleWebhook Method. The code block is :

    if (method_exists($this, $method)) 
       {
            return $this->{$method}($payload);
        } else {
           return $this->missingMethod();
        }

The method_exists always returns false. But if i put handleAccountUpdated inside superclass(WebhookController Class of Cashier) it returns true but never works when method is in subclass(WebhookController extends CashierController) .

My WebhookController is :

namespace App\Http\Controllers;

use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;

class WebhookController extends CashierController
{
    public function handleAccountUpdated()
    {
        return 'handleAccountUpdated Called';
    }

    public function handleCustomerCreated()
    {
        return 'handleCustomerCreated Called';
    }
}
0 likes
1 reply
t9toqwerty's avatar
t9toqwerty
OP
Best Answer
Level 3

Solved , I have misread the documentation . Just made changes in route file to work with subclass .

Please or to participate in this conversation.