stripe / stripe-cli

A command-line tool for Stripe
https://stripe.com/docs/stripe-cli
Apache License 2.0
1.57k stars 362 forks source link

Webhooks: checkout.session.async_payment_succeeded not being sent by stripe trigger #1104

Closed NoamBechhofer closed 11 months ago

NoamBechhofer commented 11 months ago

Issue

checkout.session.async_payment_succeeded event is not being sent by stripe trigger

Expected Behavior

I expect to be able to use the command $ stripe trigger checkout.session.async_payment_succeeded

Steps to reproduce

Open two shells and enter the following two commands: $ stripe listen --forward-to localhost:5000/stripe_webhooks/payment_success (my endpoint URL) $ stripe trigger checkout.session.async_payment_succeeded

Traceback

A newer version of the Stripe CLI is available, please update to: v1.16.0
Setting up fixture for: product
Running fixture for: product
Setting up fixture for: price
Running fixture for: price
Setting up fixture for: checkout_session
Running fixture for: checkout_session
Setting up fixture for: payment_page
Running fixture for: payment_page
Setting up fixture for: payment_method
Running fixture for: payment_method
Setting up fixture for: payment_page_confirm
Running fixture for: payment_page_confirm
Trigger succeeded! Check dashboard for event details.

stripe listen output:

2023-07-21 12:54:29  <--  [200] POST http://localhost:5000/stripe_webhooks/payment_success [evt_1NWMb3KqbDWV3M2hQJvtjQ66]
2023-07-21 12:54:29   --> price.created [evt_1NWMb3KqbDWV3M2haWgpvXfg]
2023-07-21 12:54:29  <--  [200] POST http://localhost:5000/stripe_webhooks/payment_success [evt_1NWMb3KqbDWV3M2haWgpvXfg]
2023-07-21 12:54:32   --> charge.succeeded [evt_3NWMb4KqbDWV3M2h0o6oZQq9]
2023-07-21 12:54:32  <--  [200] POST http://localhost:5000/stripe_webhooks/payment_success [evt_3NWMb4KqbDWV3M2h0o6oZQq9]
2023-07-21 12:54:32   --> checkout.session.completed [evt_1NWMb6KqbDWV3M2hWiFj6Va3]
2023-07-21 12:54:32  <--  [200] POST http://localhost:5000/stripe_webhooks/payment_success [evt_1NWMb6KqbDWV3M2hWiFj6Va3]
2023-07-21 12:54:32   --> payment_intent.succeeded [evt_3NWMb4KqbDWV3M2h0bpJ9iYy]
2023-07-21 12:54:32  <--  [200] POST http://localhost:5000/stripe_webhooks/payment_success [evt_3NWMb4KqbDWV3M2h0bpJ9iYy]
2023-07-21 12:54:32   --> payment_intent.created [evt_3NWMb4KqbDWV3M2h0wr3Fhqo]
2023-07-21 12:54:32  <--  [200] POST http://localhost:5000/stripe_webhooks/payment_success [evt_3NWMb4KqbDWV3M2h0wr3Fhqo]

As you can see, the actual checkout.session.async_payment_succeeded event is never sent

Environment

Windows

remi-stripe commented 11 months ago

@NoamBechhofer We just released v1.17.0 of the Stripe CLI which fixes this bug! Thanks again for the clear report and really sorry about the trouble!