#rikless

1 messages · Page 1 of 1 (latest)

quartz creekBOT
pseudo cape
#

Hi there!

alpine wraith
#

Hi Soma

#

re_3LuEjsJv8TI995DP17WwnExq

pseudo cape
#

That refund ID does exist, but it's on a different Stripe account.

alpine wraith
#

yes but the standard account is connected on our platform

pseudo cape
alpine wraith
#

['stripe_account' => $account_id]

#

that's done afaik :/

pseudo cape
#

I don't see that in our logs so there must be an issue. Can you share your full code that makes this request?

alpine wraith
#
$account_id = $notification['account'] ?? null;

            $obj = (new $class)->retrieve(
                $notification['data']['object']['id'],
                ['stripe_account' => $account_id]
            );
#

where $notification is the webhook request

pseudo cape
#

And this code created the request ID you shared earlier? req_jGfckVVt2HPxc4?

alpine wraith
#

yes

#

you don't see the Stripe-Account header in the request ?

untold quest
#

Hi there 👋 I'm jumping in as my teammate needs to step away, please bear with me a moment while I catch up on the context here.

alpine wraith
#

Hi Toby

untold quest
#

I checked that request as well, and am not seeing a Connected Account's ID on it. Have you tried making another request since then that I could double check? Additionally, have you tried logging account_id before that request is made to ensure it's being set as expected?

alpine wraith
#

another request on this connected account ?

#

No, didn't logged it because if i'm not wrong, that id is sent from Stripe webhook

untold quest
#

I would recommend checking to see if that parameter is getting set then. What I'm gathering is that you're building a flow which listens for webhook events and then makes request(s) based on the information contained within those webhook events.

Is $notification being populated by the constructEvent function?

alpine wraith
#

mmmh no, what we only do is : ```php
(array) json_decode(Request::getContent(), true)

#

and we can see the request here, where account is populated

#

pretty strange, it looks like a new try has been done for the event, and all was ok

#

actually not

untold quest
#

Can you elaborate on what you're seeing?

alpine wraith
#

I've seen a retry, with the same error

#

What I don't understand is that it looks like I receive 2 identical notification in the same time

untold quest
#

It does look that event was sent to that endpoint multiple times. Looking at the logs, we encountered a 500 response from your server for the first delivery attempt, so it is expected that we would queue that event to be resent. Any status outside of the 2XX range is interpreted as the event failing to be delivered, so we try to send it again until you tell us that your server successfully received the event (or the retry period is exhausted).

alpine wraith
#

I know this, but it does not explain why I revieve the same event 2 times at the same time

untold quest
#

They were ~17 seconds apart