#ChrisPBacon-product.updated-event

1 messages · Page 1 of 1 (latest)

weak bobcat
#

Hey can you share the evt_xxx ID

silent violet
#

Well, it looks like that when a product is created an event is called for that. But then also a new price is created which probably triggers the product.updated hook?

weak bobcat
#

Yep, not sure! If you can share the ID I can take a look

#

But that sounds plausible

silent violet
#

product_created: evt_1L7cUAFM6e0F56a9yI7kgHmB

product_updated: evt_1L7cUBFM6e0F56a9oty6EFRd

All related to product_id: prod_LpH2fh8tSgxJ96

#

just wondering why the entire product_created is all done on Stripe's end (bundling the new price ID) and simply returning the product.created since afterall, i'm not actually updated anything yet

edit: why the entire product.created script isn't run on Stripe's end...

weak bobcat
#

Taking a look

#

You can see the previous attributes field on evt_1L7cUBFM6e0F56a9oty6EFRd:

previous_attributes: {
    default_price: null,
    updated: 1654508674
}
#

Looks like you're using the Dashboard UI, which requires you create a Price at the time of Product creation

#

The Dashboard likely wraps those into a single API call, which is unfurled into 3 requests:

#

Subsequent events are fired following those calls. Hope that clarifies things!

silent violet
#

I've been entering a valid price each and every time at product creation.

weak bobcat
#

Yep, exactly. And that's just how it works (as outlined)

#

The Dashboard just masks the 3 separate API calls (that I listed) into one UI

silent violet
#

For companies that pay to handle serverless function calls, that's double what should be sent since product.created event should be a single call. If there's more work to package all the data for that created event why should the client be handling that?

#

Is there a place to request a feature update?

weak bobcat
#

what should be sent since product.created event should be a single call
It can't be at that stage though as the related Price object doesn't yet exist (hence the update call and event)

#

I'll relay your feedback internally

silent violet
#

I guess a workaround would be a local UI to handle all this to avoid serverless function calls

#

Thank you for your feedback anyways. Helps me more understand the process

weak bobcat
#

Sure, np