Skip to main content

Events

SaaSykit emits events that you can listen for and respond to. This is useful for things like doing certain things when a user subscribes, cancels subscription, etc like sending notifications, logging, and more.

Available Eventsโ€‹

Registeredโ€‹

This event is fired when a user registers.

Just like any laravel event, you can listen to it by adding a listener to your EventServiceProvider:

protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];

Subscribedโ€‹

This event is fired when a user subscribes to a plan.

You can listen to it by adding a listener to your EventServiceProvider:

protected $listen = [
Subscribed::class => [
SendSubscribedNotification::class,
],
];

SubscriptionCancelledโ€‹

This event is fired when a user cancels their subscription.

You can listen to it by adding a listener to your EventServiceProvider:

protected $listen = [
SubscriptionCancelled::class => [
SendSubscriptionCancellationNotification::class,
],
];

InvoicePaymentFailedโ€‹

This event is fired when a user's invoice payment fails.

You can listen to it by adding a listener to your EventServiceProvider:

protected $listen = [
InvoicePaymentFailed::class => [
SendInvoicePaymentFailedNotification::class,
],
];

Orderedโ€‹

This event is fired when a user orders a one-time purchase product.

You can listen to it by adding a listener to your EventServiceProvider:

protected $listen = [
Ordered::class => [
SendOrderNotification::class,
],
];

OrderRefundedโ€‹

This event is fired when a user's order is refunded.

You can listen to it by adding a listener to your EventServiceProvider:

protected $listen = [
OrderRefunded::class => [
SendOrderRefundedNotification::class,
],
];