#mathieu-events
1 messages · Page 1 of 1 (latest)
heya @normal owl! unfortunately not, you can't trigger payment_intent.succeeded on a given PaymentIntent.
and on invoice.payment_succeeded ?
it's not possible to pass in a specific object id and attempt to trigger an event for that specific object id
what you can do though, is to resend a specific event id
how can i do that ?
i think this is what you're looking for?
Complete reference documentation for the Stripe CLI.
For context i'm trying to test delivering licence product to my user which have a subscription being paid but i'm feeling a bit lost at the moment with the webhook.
I want to be able to test the webhook in real situation and having stripe calling my localhost endpoint.
I'm using sepa test integration number to test the PaymentIntent going from processing to succeeded after 3 min AT321904300235473204 from this guide https://stripe.com/docs/billing/subscriptions/sepa-debit?platform=web#test-integration
And what i dont understand is how to tell stripe to trigger the event on my localhost after i init this scenario going through my subscription workflow ?
ok i think i get it now after some testing.
here is what i do :
- listen to event with cli with this :
stripe listen --forward-to=api.localhost/v1/stripe-webhook -e invoice.payment_succeeded - run the subscription workflow on my app on localhost
- wait for the event to trigger on the dashboard on https://dashboard.stripe.com/test/events
- find it, copy paste his id and then use the CLI resend
stripe events resend evt_1JrfXeD9WJsCYyaSOrvjDuRf - and now my localhost webhook seems to be hit, according to my log :
NOTICE: PHP message: invoice.payment_succeeded in_1JrfXbD9WJsCYyaSkWWp9GTj
Does it looks like i'm testing this the right way to you or am i doing it wrong ?
give me a second to catch up, i was a little tied up with something else earlier
you shouldn't need to resend it, if you're already listening for it (unless you want to test something more than once)
but yep, your flow is correct!
ok i'm gonna do more debugging to see if i really need to resend it, thanks