#ruin_subscription-update
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/1240683048169639968
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
params := &stripe2.InvoiceParams{
Customer: stripe2.String(customerID),
AutomaticTax: &stripe2.InvoiceAutomaticTaxParams{
Enabled: stripe2.Bool(true),
},
SubscriptionItems: items,
}
if invoiceImmediately {
params.SubscriptionProrationBehavior = stripe2.String(
string(stripe2.SubscriptionProrationBehaviorAlwaysInvoice),
)
}
if subscriptionID != nil {
params.Subscription = stripe2.String(*subscriptionID)
}
params.AddExpand("total_tax_amounts.tax_rate")
params.AddExpand("subscription")
in, err := invoice.GetNext(params)
if relevant
I think you should use this endpoint instead: https://docs.stripe.com/api/invoices/upcoming
That looks like the retrieve invoice endpoint
With the upcoming invoice endpoint you can preview a change to a subscription
Actually that might just be an old version of the sdk that calls that same endpoint
Can you share a request id
yes, I'm using that endpoint
give me a sec
will get the request_id, but it seems like it is /upcoming endpoint
Yeah must just be an old version of our Go SDK
In newer versions the call is invoice.Upcoming
req_e4mCF33y8VRPSG
Yeah you need to add the new yearly price for this to work
So you need to remove 1 subscription item and add a new one
but subscription related to the invoice has monthly anchor
and I'm chaing to yearly billing cycle
would that still work?
after preview invoice
canceling monthly subscription -> activating yearly, with deducted prorated credits from monthly sub
let me try
ruin_subscription-update