stripe-cli
stripe-cli copied to clipboard
Add missing event types to the `trigger` command
The trigger
command supports only a subset of all possible event types. You can view which event types are supported by running stripe trigger --help
.
Adding support for new event types is a simple but hard to automate process, so for the moment we add support for new event types when someone requests it. If you want us to add support for a new event type, please ask in this thread and we'll look into it promptly.
Note however that at this time there are some event types that cannot be triggered by the CLI. This is because under the hood, the trigger
command works by sending a series of API requests (see #295 for a more detailed explanation). This means that the CLI can only trigger events that are a direct consequence of API requests. Some events are triggered asynchronously by Stripe and cannot be triggered simply by sending API requests.
We do want to eventually support all possible event types, but supporting those events will require a bit more work as it cannot be done purely on the CLI's end.
List of supported events
As of v1.2.5:
balance.available
charge.captured
charge.dispute.created
charge.failed
charge.refunded
charge.succeeded
checkout.session.completed
customer.created
customer.deleted
customer.source.created
customer.source.updated
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated
customer.updated
invoice.created
invoice.finalized
invoice.payment_failed
invoice.payment_succeeded
invoice.updated
payment_intent.amount_capturable_updated
payment_intent.canceled
payment_intent.created
payment_intent.payment_failed
payment_intent.succeeded
payment_method.attached
setup_intent.canceled
setup_intent.created
setup_intent.setup_failed
setup_intent.succeeded
List of events that cannot be supported at this time
customer.source.expiring
customer.subscription.trial_will_end
(and probably a few others)
Hi @ob-stripe @tomer-stripe , can you please add setup_intent.succeed? Given a user successfully saves a card, on my server-side I create a Customer object with the payment method from setup_intent. I would very much like to test this! Thank you in advance!
Hi @greenep12, sorry for the long delay. v1.2.5 adds support for all setup_intent.*
events.
@ob-stripe Can you please add charge.expired
event?
I want to re-authorize card when authorized payment is expired because my order processing time is more than 7 days and stripe hold amount only for 7 days not more so I am implementing this and want to test this in local.
Thank you..
@plusoneinfo Unfortunately I think charge.expired
is in the category of events that cannot be triggered directly by the API and thus cannot be triggered by the CLI at this time. Sorry! (It's on our 2020 roadmap to find a solution to this problem so that the CLI can trigger all event types.)
Unrelated to the CLI: the reason the maximum hold period is 7 days is because banks typically don't like longer authorizations. I would recommend reaching out to Stripe's support at https://support.stripe.com/email to explain your business model and use case and make sure they tell you your approach is okay.
Would it be possible to emulate a payment_method.automatically_updated
event?
Everything about payment_method
would be great.
A way to trigger sigma.scheduled_query_run.created
would be useful
I would like to request checkout.session.expired
please so I don't have to wait 1 hour to test some new code.
I would like to request
checkout.session.expired
please so I don't have to wait 1 hour to test some new code.
I second this, a workaround would be to test the endpoint on a live API but that is risky
I would like to trigger charge.expired