#b33f_connect-webhooks
1 messages ยท Page 1 of 1 (latest)
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.
- b33fb0n3_returning-customers, 2 days ago, 11 messages
- b33fb0n3_api, 6 days ago, 12 messages
๐ 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.
Hello
Hey
Did you set up a Connect endpoint: https://docs.stripe.com/connect/webhooks
As opposed to a direct endpoint
I tried to set it up localy with
stripe listen -c localhost:3000/api/stripe/webhooks
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?
Can I also share the paymentintent id?
Sure
Then this is the paymentintent id: pi_3PFDeMGFAsQSXF4n176hj34C
Looking
Take you time
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?
You can go to https://dashboard.stripe.com/test/webhooks in your Dashboard and you should see something under Local listeners if you are currently logged into the CLI for that account
I logged in via stripe login and chose the plattform account. That should be right, right?
I mean it should
But it doesn't seem like that's what happened afaict
Can you try doing that again?
The paymentintent was created 2 days ago. There shouldn't be a active connection
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
yea, I can create a new one directly if you want to?
Yep, first make sure you are logged in to the CLI and run stripe listen
Then create a new PaymentIntent
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?
Well no that will trigger the PaymentIntent on your platform
Not your Connected Account
So you want to use --stripe-account: https://docs.stripe.com/cli/trigger#trigger-stripe_account
my bad. I mean with --stripe-account acct_1N1ZkaGFAsQSXF4n
stripe trigger payment_intent.succeeded --stripe-account acct_123
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
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
Yea, it looks like this:
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?
Yea give me a second to lookup the command to upgrade...
Done. And I do the same, right?
#1239590299337101322 message
Yes, this is the first one: clidev_1PG0VIK7gRZLSJmg9oHIk8XC
And the created paymentintent: pi_3PG0iyGFAsQSXF4n1HU1q784
hmm weird ๐ค
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
That works. The cli id is clidev_1PG0VIK7gRZLSJmg9oHIk8XC and the paymentintent id is pi_3PG0p2K7gRZLSJmg0YubPZJ2
The event id is evt_3PG0p2K7gRZLSJmg0kAyMcxc
Okay can you try typing out the full flag instead of using -c
Try doing --forward-connect-to
And trigger with --stripe-account flag?
Yep
Then the cli id is clidev_1PG0VIK7gRZLSJmg9oHIk8XC
The paymentintent id is pi_3PG0rnGFAsQSXF4n14Rcq0V4
No webhook event was called.
Argh!
Sorry ๐
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
Thats fine. Take your time ^^
I will be right back in like 20-30 minutes. So take your time ๐
๐
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
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?
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.
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?
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?
How to migrate to the correct account in production?
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.
ok, thanks for your time and also thanks to bismarck โค๏ธ
Sure thing! Happy to help ๐