#edutomesco
1 messages · Page 1 of 1 (latest)
params := &stripe.SubscriptionParams{
CancelAtPeriodEnd: stripe.Bool(false),
ProrationBehavior: stripe.String(string(stripe.SubscriptionProrationBehaviorCreateProrations)),
Items: []*stripe.SubscriptionItemsParams{
{
ID: stripe.String(subscription.Items.Values[0].ID),
Price: stripe.String("price_CBb6IXqvTLXp3f"),
},
},
}
subscription, err = sub.Update("sub_49ty4767H20z6a", params)
I saw here that I have to put in params the new Prices ID and the ID's, the thing is that if I have new prices, I don't have yet the sub item ID
Have you tried simply adding new items without ID? it should create new Subscription Items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So it's not mandatory will did the proration anyway?
proration only happen on changing price at same item