#jm199seo-prices
1 messages · Page 1 of 1 (latest)
bear with me, I didn't actually know transfer_lookup_key exists
ok, got it.
to be clear, transfer_lookup_key doesn't change what the customer is paying or update the existing subscription in any way. It just updates "metadata" so that you can find the new Price when looking up the key from the older one.
to actually update the subscriptions you need to call the API as described at https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#switching , for each subscription using the old price
and change them to the new price_xxx
you could write a script for that or use a fixture to script stripe-cli to do that, yes
that's what i understood from the docs. I was trying to batch the process of deleting the lookup_key from the previous price and assign the same lookup_key to the updated (new) price item
makes sense, but you can use transfer_lookup_key when creating the new price, you don't have to remove lookup_key of the older one
If set to true, will atomically remove the lookup key from the existing price, and assign it to this price."
i think the URL you just posted will be a huge help to me thanks!
correct me if i'm wrong, are fixtures via the stripe-cli used for populating data only? as in creating products/prices? or can it be used to update items also?
yeah the problem i had with using transfer_lookup_key was that new prices are correctly assigned with the correct lookupkey, but the subscription_item isn't updated, which incurred an error. So I thought that all customers had to re-subscribe to the new product/prices
yep the lookup key doesn't change the actual subscriptions
I agree it's confusing, "To update your price for new customers, you only need to create a new price and transfer the lookup key" is a bit misleading
what you actually need to do is call the API for each subscription and update its items to change the price to the new price_xxx ID per the link above. (also make sure to think/test about which proration_behavior value you intend to use for the change)
it's a really common feature request to automate this and I wish we supported it, but right now it requires manually calling the API for each sub