#geeky_cli-fixtures
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234628283342262322
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
geeky_cli-fixtures
@drowsy laurel there are a few ways to do this but if I were you I wouldn't use the CLI at all for this. I'd write real code using our API to cause the exact Event(s) you are looking for
But if you want the CLI then the best option is to create your own fixture that has the right sequence of API requests to match what you need: https://docs.stripe.com/cli/fixtures
What do you mean? I would have to turn off test mode / use my production key and run my code on a visible server then?
You can use your Test Secret API key in your code locally on your machine to test anything the same way the CLI lets you do it
I thought the test API didn't let you have events without using the CLI?
I think you might be misunderstanding things a bit. The CLI offers a lot of features. One of the features is the ability to use the stripe trigger xxxxx command to cause certain Events to be triggered.
Another feature is the ability to listen for Events in Test mode on your Stripe account and automatically forward those to your local server on your computer. That's based on the stripe listen command
That second feature is what I recommend using but still write code in your favourite language to cause Events for real and make things easier to repeat and debug
Ohhh okay, I get what you mean
- run
stripe listen --forward-to xxx - run my normal tests which should fire the events locally
exactly!
I see, thanks a lot!