#jnarowski-subscription-update

1 messages · Page 1 of 1 (latest)

knotty vaultBOT
mossy carbon
#

@brisk forum what you are describing should be impossible right now, it's impossible to have a Subscription on monthly and yearly at the same time.

#

Can you give me some concrete example to look at, what you see and what the problem is?

#

jnarowski-subscription-update

brisk forum
#

Sure. Let me try to recreate

#

That customer now has both a monthly and a yearly subscription

#

and I just updated the old subscription.item with the new yearly price id

#

It looks like my update is creating a new subscription instead of updating the existing one

#

Just trying to create a workflow to go from monthly to annual or annual to monthly

mossy carbon
#

Wait so you are saying they have two completely separate Subscriptions? Like sub_123 and sub_ABC?

#

because if so: you aren't using the code you mentioned at all which would update an existing Subscription. Instead you are calling the Subscription Create API and creating a brand new Subscription

brisk forum
#

It creates an entirely new subscription even though I am updating the line item of the other one

mossy carbon
#

I know you think that's what happens but it is not what's happening at all. I can say this with absolute certainty

#

your code is calling stripe.subscriptions.create() both times, and never the stripe.subscriptions.update() one

brisk forum
#

Let me check. That would be dumb on my part lol

#

Ok you are right. Doh. Thanks for the quick sanity check.