#myz-webhook-payments

1 messages · Page 1 of 1 (latest)

pliant mothBOT
#

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

south wagon
#

myz-webhook-payments

#

@frigid yoke Step 1: do you see that Event in your account's Dashboard?

frigid yoke
#

I can see the success payment

south wagon
#

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.

frigid yoke
#

Sorry, I tried many events after that.

#

I can see there is a success event

south wagon
#

Okay what's the Event id?

frigid yoke
#

The payment pi_3O4SrwKOpvLJLJo30X4KfJxj for $100.00 AUD has succeeded

#

evt_3O4SrwKOpvLJLJo301zsJkfF

#

Sorry, it doesn't allow me to copy

south wagon
#

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

frigid yoke
#

I listen to payment_intent.succeeded

south wagon
#

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

frigid yoke
#

I changed the event from checkout.session.completed to payment_intent.succeeded

#

I already update my cloud function

south wagon
#

the cloud function is irrelevant

frigid yoke
#

This is a payment from my flutter app, not web

south wagon
#

the issue is the configuration in your Dashboard

frigid yoke
#

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

south wagon
#

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

frigid yoke
#

I see

#

I only select to listen to checkout.session.completed in my webhook

#

Is this what you mean?

south wagon
#

yes

frigid yoke
#

Sorry, I am so so stupid

#

🤣

south wagon
#

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

frigid yoke
#

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.

south wagon
#

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

frigid yoke
#

I use both default built-in checkout page from stripe and flutter-stripe package.

south wagon
#

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

frigid yoke
#

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?

south wagon
#

because it's the right way to do fulfillment for Checkout

frigid yoke
#

So listen to payment_intent.succeeded event may not be stable or could be dangerous for some reasons?

pliant mothBOT
south wagon
#

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

frigid yoke
#

I sse

#

Many people don't like to fill the form from a website link.

#

I will try to listen to payment_intent.succeeded event

#

@south wagon Thank you so much