#blockChain_engr

1 messages · Page 1 of 1 (latest)

south pierBOT
spring raven
#

Hi! Let me help you with this.

#

Could you please share a request ID req_xxx from when you create a PaymentIntent?

turbid igloo
#

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 });

spring raven
#

Maybe a PaymentIntent ID? pi_xxx

turbid igloo
#

req_3dxVdXW1EKfOYl

#

?

spring raven
#

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)
turbid igloo
#

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

spring raven
#

Can you please share a PaymentIntent ID? This will make it much easier for me to investigate

turbid igloo
#

I can't it sorry sir, please guide me to get it for you

spring raven
turbid igloo
#

pi_3MWggwAaA4UqtRKN0t2JzdRC

#

got it

spring raven
#

Perfect, thanks!

#

Btw, you don't need ngrok if you use Stripe CLI to forward the webhook events to your local instance.

turbid igloo
#

I had used it

#

How to register endpoint on stripe dashboard and receive events....

spring raven
#

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.

turbid igloo
#

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

turbid igloo
#

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...

vocal coyote
#

Hello 👋
Stepping in as vanya needs to step away

turbid igloo
#

hey my issue is resolved thanks for your time

vocal coyote
#

Nice, glad you figured it out!