#keith-connect-products
1 messages · Page 1 of 1 (latest)
Hi there 👋 we're not as familiar with the dashboard functionality in this forum, but I would assume that the connected account could delete the price/product.
Have you tried to simulate this scenario in test mode?
No - I haven't yet. I am also wondering if they can change the price. We want to enforce some rules about the prices of the products that are sold via our platform.
In that case - could they change prices / delete the product using the API?
Either way would be bad for our platform - we want them to only change them going through our API so we stay in sync and apply rules around products / prices.
I just created a product and price on my connected Standard account, and via the dashboard I was able to change the price without issue. Though, I was logged into the dashboard via the platform and used the "View Dashboard as this Account" functionality.
You could listen to product and price events so you are notified when one is changed and then try to execute recovery flows, but I think you're going to need to create those objects on your platform account if you want to make sure no one else can edit them.
OK - I didn't think a connected account could sell a product that lives on the platform. I think we have to create the products inside the connected account.
That's correct if you're using direct charges, which I assume you are as you mentioned you're working with Standard account.
Yes we are using direct charges.
So I think you have two options:
- Use webhook events to build a reactive flow where you're notified of changes and then try to revert them.
- Store the price on your platform account (they'll be used for reference) where you can control them. When you create your payments, retrieve the price info from your platform and then use it to in an ad-hoc fashion by using
price_datarather thanprice. For example, if you're using Checkout Sessions then you can define your price when you're creating the session:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
Thanks! I like that option 2. I'll investigate that some more.
Could that also work with subscriptions?
Yup, the only difference to be wary of if you're creating the subscriptions directly is that they only accept an ad-hoc price via price_data, so a product will have to already exist.
https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price_data
Awesome thanks!