#blockChain_engr
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Could you please share a request ID req_xxx from when you create a PaymentIntent?
I don't have any request id
I did not use any request id
Here is my code:
const paymentIntent = await stripe.paymentIntents.create({ amount: amount, currency: currency, payment_method_types: payment_method_types, metadata: metadata });
Thanks, let me check
I don't see any payments on this account. Could you please share a PaymentIntent ID that you create with the code you shared?
If you use Node.js this would be:
console.log(paymentIntent.id)
can you when I trigger the account.update it is working fine, but paymentIntent.created is not hitting the url I have provided?
got the problem?
I am listening to connect account events only, there is -c flag before listen command
Can you please share a PaymentIntent ID? This will make it much easier for me to investigate
I can't it sorry sir, please guide me to get it for you
You run this code.
You get the paymentIntent object
Take the object and display its ID like I suggested:
console.log(paymentIntent.id)
Then share the ID with me please.
Perfect, thanks!
Btw, you don't need ngrok if you use Stripe CLI to forward the webhook events to your local instance.
So, you are not getting any events from payment_intent because your Account webhook endpoint in only listening to transfer.* events.
All other webhook endpoints are for Connect. And this is not a Connect payment.
plus is the paymentIntent event not a connect account intent?
` const event = stripe.webhooks.constructEvent(req.body, sig, secret);
switch (event.type) {
case 'account.updated':
const account = event.data.object;
console.log("Event: "account.updated" got hendled", account);
// Then define and call a function to handle the event
break;
case 'payment_intent.created':
const payment_intent = event.data.object;
console.log("Event: "payment_intent.created" got hendled", payment_intent);
break;
case 'payment_intent.canceled':
payment_intent = event.data.object;
console.log("Event: \"payment_intent.canceled\" got hendled", payment_intent);
break;
default:
console.log(`Unhandled event type ${event.type}`);
}
res.send("Success.")``
see my code
I am listening
have a look at this pic
there is connect with account.created, and is it working perfectly fine
but there is no connect written with paymentIntent.created, and it is not triggering my endpoint
I hope you get it now...
Hello 👋
Stepping in as vanya needs to step away
hey my issue is resolved thanks for your time
Nice, glad you figured it out!