#vktr0440
1 messages · Page 1 of 1 (latest)
Primary payment_intent.succeeded. I need to track and update order status when its paid with sofort (or delayed payment) etc...
So your goal is to trigger payment_intent.succeeded with the CLI for testing purposes?
Then sure, use stripe trigger payment_intent.succeeded
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.
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 apayment_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.
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.
Oh I see, you want to trigger payment_intent.succeeded in test mode with Sofort without having to wait?
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?
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
So yes looks like there's no way to trigger the payment_intent.succeeded event programatically. You jsut have to wait 3 minutes, as explained in the documentation:
In test mode, the PaymentIntent’s status remains in the processing state for three minutes to simulate this.
https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web&ui=API#fulfillment
Okay, and the event will be triggered on my local url? (Sure im running stripe cli and so on)
If the Stripe CLI is listening to events, then yes
thank you, i will continue with integration
Happy to help đŸ™‚