#aksharj-test-webhook
1 messages · Page 1 of 1 (latest)
Have you tried using our CLI? https://stripe.com/docs/stripe-cli
yes, have used this, but is it possible to trigger it for a real user in test environment?
You can use trigger: https://stripe.com/docs/cli/trigger
Complete reference documentation for the Stripe CLI.
stripe trigger invoice.upcoming
ok but looks like i cant specify a customer here?
i want to test the logic i have for this event
You can use the override flag: https://stripe.com/docs/cli/trigger#trigger-override
Complete reference documentation for the Stripe CLI.
would need a valid customer for this
stripe trigger invoice.upcoming --override customer=cus_123
you are the best @uneven oyster many thanks, this is exactly what i needed
have a nice day
Np!
seem to get a unknown flag: --override
stripe trigger invoice.upcoming --override customer=cus_Kf1cYWGEAlWVer
ok
Can you try and update the CLI? This must be pretty new
ok, doing it now
Think it was added in 1.7.2
cool, upgrading the cli now
see this message now
⣟ Checking for new versions... The event ‘invoice.upcoming’ is not supported by the Stripe CLI.
stripe version 1.7.8
Yeah that was my next thing 😆
It's not supported: https://stripe.com/docs/cli/trigger#trigger-event
Complete reference documentation for the Stripe CLI.
You'd just need to 'trigger' that event manually: Setup a subscription with the desired Customer with a very short trial
ok
Why specifically the invoice.upcoming event?
i have started listening to this event, to send ourselves an email that a user will be sent a reminder via stripe
the webhook logic is setup i need to test it
i think i can copy the invoice object, and run the script from rails console
btw, when a upcoming.invoice event is triggered, has Stripe already sent a email reminder to the user?
There would be sent around the same time yes
We can't guarantee ordering