#jovan-webhooks-metadata
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- jovanm-google-not-stripe-question, 21 minutes ago, 11 messages
- .jovanm_, 1 hour ago, 17 messages
- jovanm-payment-element, 19 hours ago, 9 messages
Hi ๐
I am not familiar with gtag events and I don't think they are a part of Stripe.
Yeah, they're not part of stripe. But I want to execute a javascript function in that part (see screenshot) of confirmPayment() (which is part of stripe), will the javascript function be able to execute before the page redirection?
I don't know. I cannot offer any advice on that since it's not part of Stripe
Can you give me the graph of the custom payment flow?
I'm not sure what you are referring to. We don't have a diagram of the payment flow specifically
You do, I have seen it before but I forgot which documentation. It has boxes, and arrows. There's even confirmPayment() -> return_url something in that graph
Oh, wait do you mean something like this? https://site-admin.stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-create-intent
Ah yes, that's right. Thanks for this!
Okay, sorry. Some of our other objects have lifecycle diagrams and I was thinking of those
That's alright. I think this is the answer I am looking for when I ask my original question.
Therefore, the javascript function won't be executed when the payment has been successful.
Anyways, thanks for your help here!
Great ๐ I'm glad we were able to find an answer for you ๐
What is the difference between payment_intent.succeeded and invoice.payment_succeeded in Stripe Webhook?
will both of the events be triggered upon successful payment? even recurring payments?
Each describe a successful payment but the payment_intent.succeeded is for a Payment Intent in Stripe. An Invoice can be paid outside of Stripe and still trigger that webhook. Most of the time an Invoice payment triggers both events
Is there any chance that the invoice.payment_succeeded won't be triggered? when the payment is successful?
Also, how do you add metadata on paymentIntent in recurring payments (auto-charge payments) ?
How are you creating recurring payments?
Using subscriptions api?
You put a question mark, are you not sure?
Currently, I am using subscriptions for recurring payments
People can use Payment Links, Checkout Sessions, etc.
And it matters how you are doing it
Ahh, I am using payment elements
But you are creating a Subscription direcrtly with the API?
Oo, it's custom payment flow.
I already know how to add metadata when the users subscribed to our service.
However, I don't know how to add metadata when stripe autocharge a user's card. Is it possible?
For recurring subscription generated payment intents, you will want to listen to the payment_intent.created webhook event and then update the metadata when that occurs.
Sure thing! Happy to help ๐
If the metadata you want is on the Subscription, you can look it up by using the retrieve API for the payment intent and expanding the invoice.subscription property https://stripe.com/docs/api/payment_intents/object#payment_intent_object-invoice
So, when I update the payment intent in payment_intent.created to add the metadata. Will I see that metadata on payment_intent.succeeded?
Yes, that metadata will be inlcuded in the Payment Intent object returned with the payment_intent.succeeded event
I see, thanks!