#HODL-test-clocks

1 messages · Page 1 of 1 (latest)

waxen quail
#

Hi there! I think they are great too. Yes events generated via a test clock should still hit our endpoint.

karmic pond
#

Thanks! Here's where I'm trying to make sense of this:

Acme Inc, is the Stripe extension and Widgets LLC is the connected org.

Acme Inc has a connected account webhook setup in test mode listening for invoice failure events.

Widgets LLC does the following in 'test mode':
(1) Create test clock with freeze time to 30 days ago.
(2) Then create customer and subscription tied to that clock.
(3)Next update payment source to a failing card.
(4) Finally, advance test clock to the present time to trigger invoice failure.

I don't ever see these events come through to our Acme Inc webhook logs; however I can confirm their are invoice failure within the connected org's dashboard. Wasn't sure if this was an issue due to test clocks timing being a few minutes off from present time when the events actually triggered )

waxen quail
#

Can you provide the Subscription ID?

karmic pond
#

sure

#

sub_1LBjTtLixu0LQ1SfhtAqt7at

#

and this is the associated invoice I would've expected to see a webhook event for in_1LBjUILixu0LQ1SfrhKNtQEe

waxen quail
#

I'm seeing events for that Sub were sent to a platform webhook and responded to with a 200

karmic pond
#

Oh wow, so I think that event was sent to the extensions live mode webhook. Is this expected behavior?

#

Am I understanding this correctly:

IF the Stripe Extension is listening to connected account webhooks (in Live Mode), it will receive all events generated from the connected account regardless of whether they're "Test Mode" or "Live Mode"?

silent kite
#

Bismark had to step out but I can help here. Yes that is the expected behavior, when an account and platform are connected in live mode, the platform's connect endpoints will receive both live mode and test mode events from the account.

#

It happens that way to be compatible with legacy behavior. To filter out live mode from test mode events, you can check the event's livemode property to see which mode it is from

karmic pond
#

Thanks @silent kite. That was the source of all my confusion. I'd created a webhook in the Extensions test mode and wasn't receiving test mode events from the connected orgs... this helps me to better understand that