#Soyra
1 messages ยท Page 1 of 1 (latest)
Hi there!
This is was the Stripe CLI is doing when triggering a checkout.session.completed event: https://github.com/stripe/stripe-cli/blob/master/pkg/fixtures/triggers/checkout.session.completed.json
As you can see it creates a Checkout Session in payment mode and not subscription mode, so it's expected that there is no subscription ID.
Yes, that's the problem ๐ฆ
So you have a few options:
- Use the
--overrideparameter to change the product and mode used by the Stripe CLI https://stripe.com/docs/cli/trigger#trigger-override - Create your own fixture that describes how to create a Checkout Session in subscription mode.
- Or more easily just create a Checkout Session with a subscription in test mode.
I thought about create manually a Checkout Session, but it will call the real endpoint, and not the test one isn't it ?
If you use your test API keys (sk_test_xxx), then it will create test objects.
Oh yes ok. Well, thanks for your reactivity and your help ๐ I'm going to test that
Happy to help ๐