#meshpaul_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1220549189209948302
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- paul_customer-defaultpm, 1 day ago, 44 messages
Hi
Looks like code didn't make it let me update
val subscriptionId = "sub_1Of9NMBZuRENdfSAYdQ77jsc"
val subscription = Subscription.retrieve(subscriptionId)
val subscriptionItem = subscription.items.data.first { it.price.id == MONTHLY_COLLECTION_PRICE_ID }
val paramsNew = SubscriptionItemUpdateParams.builder()
paramsNew
.setProrationBehavior(SubscriptionItemUpdateParams.ProrationBehavior.NONE)
.setQuantity(subscriptionItem.quantity - 1)
subscriptionItem.update(paramsNew.build())
Okie, can you find the request on your Stripe Dashboard? https://dashboard.stripe.com/test/logs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
req_xxx
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I had 3 items then I set this to 2
let me set this to 1 and show you the log
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
when I see invoice I see very weird behavior due to proration
It seems like you are updating the Subscription Item? Let's try to Update the Subscription instead
Tried that as well
let me update code related to this
Ok let me increase the number of Items first
val subscriptionId = "sub_1Of9NMBZuRENdfSAYdQ77jsc"
val subscription = Subscription.retrieve(subscriptionId)
val subscriptionItem = subscription.items.data.first { it.price.id == MONTHLY_COLLECTION_PRICE_ID }
val params = SubscriptionUpdateParams
.builder()
.addItem(
SubscriptionUpdateParams.Item.builder()
.setId(subscriptionItem.id)
.setQuantity(subscriptionItem.quantity + 1).build()
).build()
subscription.update(params)
Adding Items
val subscriptionId = "sub_1Of9NMBZuRENdfSAYdQ77jsc"
val subscription = Subscription.retrieve(subscriptionId)
val subscriptionItem = subscription.items.data.first { it.price.id == MONTHLY_COLLECTION_PRICE_ID }
val params = SubscriptionUpdateParams
.builder()
.setProrationBehavior(
SubscriptionUpdateParams.ProrationBehavior.NONE
)
.addItem(
SubscriptionUpdateParams.Item.builder()
.setId(subscriptionItem.id)
.setQuantity(subscriptionItem.quantity -1 ).build()
).build()
subscription.update(params)
Log line
https://dashboard.stripe.com/test/logs/req_a7mYyXd9loWuEn
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Okie looking...
Umm this is hard to track because there are too many requests. Could you create a brand new Subscription and then only call 1 Update Subscription API?
I am not sure we can see this behavior on barnd new
let me find another one
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah this doesn't have proration on Upcoming Invoice, so I think proration_behavior = none is working as expected
Hmm Ok... we will test this some more... I did start this with subscription first
The previous Sub has some request in the past without proration_behavior set to none (ie. https://dashboard.stripe.com/test/logs/req_Sc0i5WX8hgbHKb) so it already has some proration on next Invoice
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.