#myz-webhook-payments
1 messages · Page 1 of 1 (latest)
Hello myz123, 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.
• myz123, 0 days ago, 33 messages
• myz123, 0 days ago, 20 messages
myz-webhook-payments
@frigid yoke Step 1: do you see that Event in your account's Dashboard?
I can see the success payment
that's not what I am asking. Please take some time to read what I am saying to debug things first. I see you already had multiple threads earlier today.
Okay what's the Event id?
The payment pi_3O4SrwKOpvLJLJo30X4KfJxj for $100.00 AUD has succeeded
evt_3O4SrwKOpvLJLJo301zsJkfF
Sorry, it doesn't allow me to copy
Okay so the type of that Event is payment_intent.succeeded. But your account only has one webhook endpoint that only listens to checkout.session.completed
you are not. Taht's a picture of code
You, as the developer, went and configured a webhook endpoint in your dashboard. When you did, we asked you the Events you want to listen to and you only picked checkout.session.completed
I changed the event from checkout.session.completed to payment_intent.succeeded
I already update my cloud function
the cloud function is irrelevant
This is a payment from my flutter app, not web
the issue is the configuration in your Dashboard
https://dashboard.stripe.com/test/webhooks/we_1NXaUjKOpvLJLJo3TLXyLVdv you never changed this
This payment_intent.succeeded event has been triggered and I listen to it. But my update doesn't triggerred.
I will take a look and write some logs to test if this event has been triggerred
you're not reading and listening to what I am saying. You are set on this being a bug and are rushing through your things
Please carefully read my words, take the time to understand them. I told you the exact problem: in your Stripe account's Dashboard, the webhook endpoint that you created is misconfigured
I see
I only select to listen to checkout.session.completed in my webhook
Is this what you mean?
yes
no worries. You're not stupid but you are clearly rushing as fast as you can and as soon as it doesn't work you forget to carefully look at what you already did before
Hey boss, I have a web app and a flutter mobile app.
Is it a good idea to listen to both payment_intent.succeeded and checkout.session.completed?
Or just listen to payment_intent.succeeded
I don't want event to be triggered twice.
That doesn't really make sense to me. If I were you I'd redirect to Checkout even in your mobile app. Way simpler and easier
but otherwise, no way around it. For Checkout use checkout.session.completed, for payments without Checkout use payment_intent.succeeded.
And note that payment_intent.succeeded is sent also for Checkout and you will have to ignore those ones. You can set custom metadata on the PaymentIntent using payment_intent_data[metadata] when you create the Checkout Session
I use both default built-in checkout page from stripe and flutter-stripe package.
If it were me I'd never do that. In my mobile app I'd just open a browser and let Checkout handle the payment to have one unified integration
checkout.session.completed will be triggered only from redirected stripe built-in checkout page. But payment_intent.succeeded can be triggered for every successful payment. Why do you prefer listen to checkout.session.completed?
because it's the right way to do fulfillment for Checkout
So listen to payment_intent.succeeded event may not be stable or could be dangerous for some reasons?
nothing is "dangerous", it's just not what we recommend that's all. You asked me what to do so I explained what I think you should do.
If you prefer to just listen to payment_intent.succeeded you can