#masnu-subscription-update

1 messages · Page 1 of 1 (latest)

outer tigerBOT
queen scaffold
#

masnu-subscription-update

#

@celest willow yes this is possible but the API is a bit confusing at first

#

When you call the Update Subscription API and pass items, we're doing a "merge" operation between what you give us and what already exists on the Subscription. And we don't support having the same Price multiple times.
So what you need to do instead is explicitly tell us "hey that SubscriptionItem si_12345 for the Price price_123 please increase the quantity to 5.

outer tigerBOT
celest willow
#

thank you @queen scaffold . I believe that's what I tried with SubscriptionItemsParams

// Update primary subscription api.Subscriptions.Update(sub.ID, &stripego.SubscriptionParams{ Items: &stripego.SubscriptionItemsParams{ Price: stripego.String(Plan.Id), Quantity: stripego.Int64(5), }), ProrationDate: stripego.Int64(time.Now().Unix()), })

#

Unless I got the wrong API

rapid shadow
#

👋 hopping in here since koopajah had to head out

#

What you're missing is the Subscription Item ID - you need to set ID within SubscriptionItemParams

rapid shadow
#

@celest willow Does that make sense?

outer tigerBOT