#Léo Reina

1 messages · Page 1 of 1 (latest)

outer perchBOT
obtuse glen
sweet oyster
#

hey, just for context, maybe there's an easy way of doing it, what I need is to update a price id on a subscription that is paused, so I received an error saying that the subscription can't be paused.

I was thinking then, i could:

  • unpause the subscription (without charging it)
  • update to the new price id
  • pause the subscription again

is that make sense?

the problem now is when I'm unpausing it, It grabs the draft invoice and charges it

obtuse glen
#

I see. You're getting an error when you're trying to update the Price on the paused Subscription? Do you have a Request ID I can look at for that?

Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

sweet oyster
#

yes, I have, I think is this one: req_P5VYxyILm09AjG

obtuse glen
#

Can you just void the outstanding Invoice so that it is no longer chargeable?

sweet oyster
#

how can i do that? right now what i'm trying is something like this. updating the subscription and deleting the old one and adding the new one

await stripe.subscriptions.update(sub.id, { proration_behavior: 'none', items: [ { price: newPriceId, quantity: 1, }, { id: sub.items.data[0].id, deleted: true, }, ], });

#

I guess that maybe getting the invoice attached to the subscription and void it?

obtuse glen
#

Yes, exactly

sweet oyster
#

ah okay, I'll try this approach then, thank you! 🙏 I'll let you know if this work