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: Can't use `stripe trigger checkout.session.async_payment_succeeded` #1112

Closed katherineqian closed 10 months ago

katherineqian commented 10 months ago

The more information we have the easier it is for us to help. Feel free to remove any sections that might not apply

Issue

Describe what happened and what you were trying to do I tried to use the Stripe CLI on web to test my webhook.

Expected Behavior

Tell us what you expected to happen I expected to be able to trigger an async payment success event using stripe trigger checkout.session.async_payment_succeeded.

Steps to reproduce

What are the steps we can take to reproduce this and verify it's fixed? Run stripe trigger checkout.session.async_payment_succeeded and successfully trigger an event.

Traceback

Share any debug output that was given by the CLI

{"error": {
"message":  "An error has occurred confirming the Checkout Session.",
"request_log_url":  ["https://dashboard.stripe.com/test/logs/req_uKwg65sLrDOSqd?t=1691871196"](https://dashboard.stripe.com/test/logs/req_uKwg65sLrDOSqd?t=1691871196),
"type":  "invalid_request_error", },

Environment

Select one of: macOS, Linux, Windows, Other Other (Chrome web)

kyang-stripe commented 10 months ago

Hi @katherineqian, what version of stripe-cli are you using? Could you update to the latest version and see if that fixes your issue?

etsai-stripe commented 10 months ago

hi @katherineqian i have checked with stripe CLI version 1.16.0, and it worked. could you please update and try again? i will close this ticket now

$  stripe trigger checkout.session.async_payment_succeeded
A newer version of the Stripe CLI is available, please update to: v1.17.1
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 version
stripe version 1.16.0
A newer version of the Stripe CLI is available, please update to: v1.17.1

i have also tried with stripe shell (web version CLI)

stripe trigger checkout.session.async_payment_succeeded
Set up fixture for: product
Set up fixture for: product
Set up fixture for: price
Set up fixture for: checkout_session
Set up fixture for: payment_page
Set up fixture for: payment_method
Set up fixture for: payment_page_confirm
Trigger succeeded!

Show details…
katherineqian commented 10 months ago

Hi! It was only on the web version (https://stripe.com/docs/stripe-cli?shell=true) but it's working now. Thanks for taking a look!