#vktr0440

1 messages · Page 1 of 1 (latest)

cursive caveBOT
hoary tinsel
#

Hi there!

#

Which event exactly to you want to trigger?

vale fractal
#

Primary payment_intent.succeeded. I need to track and update order status when its paid with sofort (or delayed payment) etc...

hoary tinsel
#

So your goal is to trigger payment_intent.succeeded with the CLI for testing purposes?
Then sure, use stripe trigger payment_intent.succeeded

vale fractal
#

I need to trigger this event for specific payment which i created by me via my eshop

#

Im able to trigger this event, events are handled by server, but i need to trigger for the specific payment, for testing purposes.

hoary tinsel
#

but i need to trigger for the specific payment,
I don't understand what that means. If you have a specific PaymentIntent in test mode that you can to succeed, then confirm it with a PaymentMethod and you will receive a payment_intent.succeeded.

#

For example something like:

const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000,
  currency: 'usd',
  payment_method: 'pm_card_visa',
  confirm: true
});

Will generate a payment_intent.succeeded event.

vale fractal
#

Okay so. I have one payment in stripe which is paid via sofort (delayed payment). Is there a way how to trigger on testing environment payment_intent.succeeded for this specific payment? I ran stripe trigger payment_intent.succeeded its generate random payment which is made by card and not sofort.

hoary tinsel
#

Oh I see, you want to trigger payment_intent.succeeded in test mode with Sofort without having to wait?

vale fractal
#

Yes, thats what i want

#

And one more question. If i successfully manage to set up the webhook and I will listen to webhooks for payment_intent statuses. Its enought to just check "type" if it is set to "payment_intent.succeeded" and then mark order as able to be fullfilled?

hoary tinsel
#

Yes, thats what i want
Still looking into this
Its enought to just check "type" if it is set to "payment_intent.succeeded" and then mark order as able to be fullfilled?
Yes looks correct to me

vale fractal
#

Okay, and the event will be triggered on my local url? (Sure im running stripe cli and so on)

hoary tinsel
#

If the Stripe CLI is listening to events, then yes

vale fractal
#

thank you, i will continue with integration

hoary tinsel
#

Happy to help đŸ™‚