Just create an API endpoint in your /api.php routes, and then add them to your stripe account. Stripe will treat these APIs as webhooks. After someone subscribes to one of your services, Stripe will call the provided webhook on your server to report a new subscription event.
In your routes /api.php or (better) in a separate API controller add any event you need to fire there.
in Laravel, make sure:
1- uninstall middleware('auth:api') on these websites.
2- then analyze the payload sent by the strip to confirm the payment.
You can refer to the Stripe documentation here for more details.
source share