#ChrisPBacon-product.updated-event
1 messages · Page 1 of 1 (latest)
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?
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...
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:
- Create the product (https://dashboard.stripe.com/test/logs/iar_E7Heo4HNXVGfwQ)
- Create the price (https://dashboard.stripe.com/test/logs/req_hy2pRveJ05gsbQ)
- Update the product (https://dashboard.stripe.com/test/logs/iar_AA7F9ipwftO60X)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Subsequent events are fired following those calls. Hope that clarifies things!
I've been entering a valid price each and every time at product creation.
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
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?
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
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
Sure, np