#javier-espinosa_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250763856079229024
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
hi! I don't think that's possible, sorry. Cancellation only happens in some special manual states and is not something we have a test mode equivalent for.
I see
all events which have "livemode: true" means they are production environment, right? And all test mode events have "livemode: false" ?
Correct, yes
I was thinking on checking state only if livemode: true in payload to skip that check in my integration test
dont like to have logic for test mode but well, I prefer to test something
Unless you have a better suggestion ๐
If it's important to you, you can stub the event payload to 'fake' an event
event payload is mocked yes, but in the integration test i do an api call to stripe API to retrieve latest state of the payout in this case - that's why i need a payout in canceled state
Well it's not possible to trigger Payloads into that state hence why you'd mock the request to the API and stub the response as you need. Generally we don't recommend running integration test suites directly against the API: https://docs.stripe.com/automated-testing#server-side-testing