#jrserqung_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/1256173095530795058
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
hi! do you have some example event IDs evt_xxx where this is happening?
The problem is, if I fire the "cancel" event right, now it does give me and evt_Id, but since the "created" event also gets fired right away, that event will also give me and evt_Id, which one would help?
I am not trying to do anything crazy here, literally loggin into Stripe CLI, and fire payment_intent.cancel. That is all
that's normal though, when you trigger payment_intent.canceled the CLI just calls the API and creates a PaymentIntent, and then cancels it
that's how all the trigger commands work, they just call the API and have side-effects which includes the event you're looking for
like you can look at https://github.com/stripe/stripe-cli/blob/8b81e5834d325ab137144b084fd9e433e3e43db4/pkg/fixtures/triggers/payment_intent.canceled.json to see the API calls it makes which is create PI , cancel PI
Let me explain my situation and that may make sense to you, but at the moment not for me.
- I place an order on my localhost
Let me explain my situation and that may make sense to you, but at the moment not for me.
- I place an order on my localhost
- On confirmation page I insert the order into the database (Payment complete at this stage)
- I want to fire the payment_intent.cancel to see how the event will react, but I can't do this without actually firing the "created" event which in this scenario doesn't make sense
then just cancel the existing PaymentIntent using https://docs.stripe.com/api/payment_intents/cancel to cancel the existing PaymentIntent and generate the event
if you use trigger payment_intent.canceled then as I explained, that is creating a brand new PaymentIntent that is not related at all to any previous calls or orders you made
Oh.... how have I not though of that ๐ Thanks a lot! I will give it a try
One last question, in a real life situation, when the payment turns out that Klarna declined it after 2 hours of placing the order, Stripe will send me the following event right: payment_intent.payment_failed?
yes
Great thanks.