On this documentation, it said that both can be used, but what's the difference between the two? Their code seems to be identical as well.
I found the answer, it seems that WebhookReceived
is triggered BEFORE Laravel Cashier do any logic with the webhook event, while WebhookHandled
is triggered AFTER Laravel Cashier did their logic.
So if you received a customer.subscription.created
event.
WebhookReceived will trigger before there are any data on the database with that event while WebhookHandled will trigger with the new subscription available in the database.