#Dara
1 messages · Page 1 of 1 (latest)
When you forwarded you specify the URL with query parameter?
What do you see on console then
No, I just use this command:
stripe listen -p shadowness -a -f localhost:5000
I set the url query in the webhook endpoint on the dashboard
That will use the Stripe CLI instance (the one on your local machine) to listen to the event from Stripe and directly forward to localhost:5000. It is unrelated to anything set on Dashboard
Really? I thought that it just changes the domain to localhost. All my webhooks are ran from events.
Actually, it is related to the dashboard because -a means load from webhooks.
Oh sorry missed that part
So we have 2 Stripe accounts and to know which one it comes from, I was recommanded by Stripe developers here to add a query to the webhook endpoint url.
Hmm you have one endpoint URL for 2 different account?
Are they both regular account or connected account?
It's a strange setup though, normally you would want to separate them
but yes using query parameter should word. How about testing it without the stripe listen command
Just stripe trigger on each account and see
stripe trigger is just fake data right?
Yes.
Well you can trigger real data via your site, but really not that much different
for Test mode
Trigger failed: Request failed, status=401, body={
"error": {
"code": "api_key_expired",
"doc_url": "https://stripe.com/docs/error-codes/api-key-expired",
"message": "Expired API Key provided: rk_test_*********************************************************************************************QvhcBB",
"type": "invalid_request_error"
}
}
I never used the trigger command...
Oups, I forgot to add the project -p. The trigger works now.
trigger doesn't do anything. My server doesn't receive the webhook without the listen command.
Forget it. I think I'll add a metadata to the subscripton for new subscribers.
On the listen terminal, the post address is without the query...
trigger doesn't do anything. My server doesn't receive the webhook without the listen command.
Why? In a real-world application you wouldn't needlistento receive event
Happy to quick check if you provide the event id evt_xxx
Well, I trigger this one "evt_1NEMH74ugWOxILKl2djSJglE" for customer.subscription.created.
Not true, when a user subscribes either through element or checkout, the event customer.subscription.created is triggered first but the status=incomplete. Then, customer.subscription.updated is triggered to change the status from incomplete to active. So 2 webhooks will run in this case. Also, if Stripe or the server was interrupted in anyway, webhooks is the best method to deal with this. In the past, wihtout the webhooks, our support was bombarded for not fulfilling our customers during an outage. And we had to remedy manually. With webhooks, you just have to wait until the events get resent.
Sorry I don't really follow, what is not true? I meant in your running service, you don't rely to stripe listen on the terminal to receive every event, correct?