#b33f_connect-webhooks

1 messages ยท Page 1 of 1 (latest)

keen sageBOT
arctic frigateBOT
#

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.

keen sageBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1239590299337101322

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rancid crescent
#

Hello

sterile valley
#

Hey

rancid crescent
#

As opposed to a direct endpoint

sterile valley
rancid crescent
#

Hmm okay that should work

#

Do you have an example Event ID that I can look at that you triggered and should have been sent?

sterile valley
#

Can I also share the paymentintent id?

rancid crescent
#

Sure

sterile valley
#

Then this is the paymentintent id: pi_3PFDeMGFAsQSXF4n176hj34C

rancid crescent
#

Looking

sterile valley
#

Take you time

rancid crescent
#

How did you login to the CLI?

#

I don't see any active CLI listener on your platform

#

Are you sure you are logged into the right account with the CLI?

sterile valley
rancid crescent
#

I mean it should

#

But it doesn't seem like that's what happened afaict

#

Can you try doing that again?

sterile valley
rancid crescent
#

Oh well then you aren't going to see a Webhook come through right now?

#

You need to trigger an Event while your listener is running

sterile valley
#

yea, I can create a new one directly if you want to?

rancid crescent
#

Yep, first make sure you are logged in to the CLI and run stripe listen

#

Then create a new PaymentIntent

sterile valley
#

Alright, I will do this first:

stripe listen -c localhost:3000/api/stripe/webhooks

Then I will do this:

stripe trigger payment_intent.succeeded --stripe-account acct_1N1ZkaGFAsQSXF4n

And then my app should receive the webhook, right?

rancid crescent
#

Well no that will trigger the PaymentIntent on your platform

#

Not your Connected Account

sterile valley
#

my bad. I mean with --stripe-account acct_1N1ZkaGFAsQSXF4n

rancid crescent
#

stripe trigger payment_intent.succeeded --stripe-account acct_123

sterile valley
#

I see the local listener:

#

And the fixture is also succeeded for a payment intent. But no webhook event

#

Maybe this could help: clidev_1PG0VIK7gRZLSJmg9oHIk8XC

#

And the newest created paymentintent (by the fixture) is this one: pi_3PG0VoGFAsQSXF4n1LWMwI9Z

rancid crescent
#

Hmm okay I do see an active listener and yep that all looks good

#

Can you show me your Terminal?

#

Where that listener is running?

#

Like take a screenshot

sterile valley
#

Yea, it looks like this:

rancid crescent
#

Hmm I just tested and it worked fine for me ๐Ÿค”

#

I'm on 1.19.4

#

Can you update the CLI just to make sure that isn't the issue here?

sterile valley
#

Yea give me a second to lookup the command to upgrade...

rancid crescent
#

Yep

#

Make sure you start your listener and give it a second before you trigger

sterile valley
#

Done. No webhook event

#

This is the screenshot from now:

rancid crescent
#

Can you share the same IDs you did above?

#

This is very strange

sterile valley
#

Yes, this is the first one: clidev_1PG0VIK7gRZLSJmg9oHIk8XC
And the created paymentintent: pi_3PG0iyGFAsQSXF4n1HU1q784

rancid crescent
#

Like it works just fine for me

#

Thinking....

sterile valley
#

hmm weird ๐Ÿค”

rancid crescent
#

Can you try doing a local non-connect Event?

#

Like just run stripe listen -f localhost:...

#

And then trigger on your platform (exclude the --stripe-account flag)

#

And let's make sure that works

sterile valley
#

That works. The cli id is clidev_1PG0VIK7gRZLSJmg9oHIk8XC and the paymentintent id is pi_3PG0p2K7gRZLSJmg0YubPZJ2

#

The event id is evt_3PG0p2K7gRZLSJmg0kAyMcxc

rancid crescent
#

Okay can you try typing out the full flag instead of using -c

#

Try doing --forward-connect-to

sterile valley
#

And trigger with --stripe-account flag?

rancid crescent
#

Yep

sterile valley
#

Then the cli id is clidev_1PG0VIK7gRZLSJmg9oHIk8XC
The paymentintent id is pi_3PG0rnGFAsQSXF4n14Rcq0V4
No webhook event was called.

rancid crescent
#

Argh!

sterile valley
#

Sorry ๐Ÿ™ˆ

rancid crescent
#

Not your fault at all!

#

This really should just work

#

I don't think you are doing anything wrong

#

Maybe I'm just missing something -- let me grab a colleague

sterile valley
#

Thats fine. Take your time ^^

#

I will be right back in like 20-30 minutes. So take your time ๐Ÿ™‚

rancid crescent
#

๐Ÿ‘

keen sageBOT
crimson skiff
#

Hi ๐Ÿ‘‹

#

I'm stepping in as my colleague needed to go.

#

It looks like your account is only connected to the Standard Account acct_1N1ZkaGFAsQSXF4n in Live mode. This means both Live and Test webhook events will only be sent to a Live Conenct webhook endpoint.

#

In order to test out your integration, we recommend creating a Standard Account in Test mode. This will allow you to test your Connect integration using the CLI

sterile valley
#

oh ok. Isn't it possible to use the same connected account for both: live and testmode?

#

If not, is this a possible account, that you mean? acct_1L8jXLIl8nICmzHd

#

If yes, how to migrate between both when going to production?

crimson skiff
#

It is possible to connect the same account in both Live and Test mode. How to do that depends on how you are connecting acounts.

The account you provided is connected in Test mode so that would work for testing your integration using the CLI.

Finally, because it's possible to make Test mode charges to an account connected in Live mode only, we send both Test and Live mode webhooks to your Live mode connect endpoint.

sterile valley
#

You are right, the event's go though. So I need to check if the payment was made in livemode or testmode by using the key inside the paymentintent.

How to migrate after testing with the different account?

crimson skiff
#

So I need to check if the payment was made in livemode or testmode by using the key inside the paymentintent.
The Event object itself contains a livemode property you can check: https://docs.stripe.com/api/events/object#event_object-livemode

That way you are not dependent on the type of objects being returned in the event data property

#

How to migrate after testing with the different account?
Migrate what?

sterile valley
crimson skiff
#

I'm still unclear what you mean. How are you connecting to these accounts in your test integration?

#

In general, you would connect to brand new accounts in Live mode. You would not migrate anything except changing your code to use your Live mode API keys instead of Test mode.

sterile valley
#

ok, thanks for your time and also thanks to bismarck โค๏ธ

crimson skiff
#

Sure thing! Happy to help ๐Ÿ™‚