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

Adams_'s avatar

Stripe Webhook event not updating on subscription table in database

I am testing stripe webhook with wamp server with laravel cashier, I am using stripe CLI to test but when I set my endpoint for stripe to listen

Stripe listen --forward-to http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook

and fired up an event like new subscription, deleting, updating subscription it all post status 200, but the problem is when I canceled, update it doesn't reflect in subscription table in the database, I don't know what I did wrong if you know, please help.

but when I canceled my subscription from my app, it shows on the stripe dashboard but any event that occurred on the dashboard doesn't reflect on the database. is it the endpoint that was wrong or am I missing something?

this is the respons from stripe CLI

2020-11-24 07:37:24 --> setup_intent.created [evt_1Hqv9OLzAo4pwMcy1jw5GVcy] 2020-11-24 07:37:24 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1Hqv9OLzAo4pwMcy1jw5GVcy] 2020-11-24 07:38:06 --> setup_intent.succeeded [evt_1HqvA9LzAo4pwMcyl4WlzxeW] 2020-11-24 07:38:06 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvA9LzAo4pwMcyl4WlzxeW] 2020-11-24 07:38:08 --> payment_method.attached [evt_1HqvACLzAo4pwMcyYt5dXxOd] 2020-11-24 07:38:08 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvACLzAo4pwMcyYt5dXxOd] 2020-11-24 07:38:09 --> customer.updated [evt_1HqvACLzAo4pwMcy26i3asDf] 2020-11-24 07:38:09 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvACLzAo4pwMcy26i3asDf] 2020-11-24 07:38:10 --> charge.succeeded [evt_1HqvAELzAo4pwMcyieotO6QR] 2020-11-24 07:38:10 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvAELzAo4pwMcyieotO6QR] 2020-11-24 07:38:10 --> invoice.created [evt_1HqvAELzAo4pwMcy5zC26m37] 2020-11-24 07:38:10 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvAELzAo4pwMcy5zC26m37] 2020-11-24 07:38:11 --> invoice.finalized [evt_1HqvAELzAo4pwMcywpBARbkd] 2020-11-24 07:38:11 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvAELzAo4pwMcywpBARbkd] 2020-11-24 07:38:11 --> invoice.paid [evt_1HqvAELzAo4pwMcyJqxgbJXE] 2020-11-24 07:38:11 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvAELzAo4pwMcyJqxgbJXE] 2020-11-24 07:38:11 --> invoice.payment_succeeded [evt_1HqvAELzAo4pwMcyRE6vDNpN] 2020-11-24 07:38:11 <-- [200] POST http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook [evt_1HqvAELzAo4pwMcyRE6vDNpN] 2020-11-24 07:38:11 --> payment_intent.created [evt_1HqvAFLzAo4pwMcyGkCDthla]

0 likes
2 replies
Adams_'s avatar

Yes sir I configured it on the control panel/dashboard and added the endpoint in the VerifyCsrfToken

        class VerifyCsrfToken extends Middleware
   {
         /**
         * The URIs that should be excluded from CSRF verification.
          *
         * @var array
         */
          protected $except = [
         'http://laravel-tests/vendor/stripe/stripe-php/lib/Webhook',
      ];


    }

Please or to participate in this conversation.