#juchom_api
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/1386762785945420048
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello,
I'm updating my dotnet solutions and I have a bunch of errors due to breaking changes.
I didn't find any migration guide, could you please help me fix this issues please
48.2.0 is pinned to the Basil major api version, which introduces a number of breaking changes.
Have you reviewed our changelog for the Basil API version?
https://docs.stripe.com/changelog/basil
also we have a guide on how to upgrade your API version here: https://docs.stripe.com/upgrades#how-can-i-upgrade-my-api which I would recommend reading
I have read this docs, but there is not clear way on how we did before and how we have to do now
For exemple the following object Invoice had a PaymentIntentId, where am I supposed to find it now ?
This is the specific page you need to read:
The invoice parameter has been removed from the Invoice and Charge
InvoiceSubscriptionItemOptions object does not exist anymore in the SDK, what am I supposed to use instead ?
So you can look at the payments array on the Invoice or use the "List Invoice Payments" API endpoint to find the Invoice associated with a particular PaymentIntent
https://docs.stripe.com/api/invoices/object#invoice_object-payments
https://docs.stripe.com/api/invoice-payment/list?api-version=2025-05-28.basil&lang=curl#list_invoice_payments-payment-type
Could you give me more context on what you do with InvoiceSubscriptionItemOptions? I'm less familiar with the dotnet sdk but I'm sure this is related to another one of the breaking changes
Sure, here is what I do
public async ValueTask<SubscriptionQuote> GetQuote(string subscriptionId, long requestedSeats)
{
var prorationDate = DateTime.UtcNow;
var subscriptionService = new SubscriptionService();
var subscription = await subscriptionService.GetAsync(subscriptionId);
var itemInfo = subscription.Items.Data[0];
var items = new List<InvoiceSubscriptionItemOptions>
{
new() { Id = itemInfo.Id, Price = itemInfo.Price.Id, Quantity = requestedSeats }
};
long actualSeats = itemInfo.Quantity;
decimal nextInvoicePrice = (Convert.ToDecimal(itemInfo.Price.UnitAmount!.Value) * requestedSeats) / 100;
// Proration price only happens when we request more seats than the actual number of seats;
decimal? prorationPrice = null;
if (requestedSeats > actualSeats)
{
var options = new UpcomingInvoiceOptions
{
Customer = subscription.CustomerId,
Subscription = subscriptionId,
SubscriptionItems = items,
SubscriptionProrationBehavior = "always_invoice",
SubscriptionProrationDate = prorationDate
};
var invoiceService = new InvoiceService();
var invoiceDraft = await invoiceService.UpcomingAsync(options);
prorationPrice = (Convert.ToDecimal(invoiceDraft.AmountDue) / 100);
}
Actually when a customer want to change the number of seats, we first give him a quote
InvoiceSubscriptionItemOptions and InvoiceSubscriptionItemOptions and UpcomingAsync have been removed
looking
Hello
I'm taking over here
Catching up
Looks like you're referring to Upcoming invoice endpoint deprecation? https://docs.stripe.com/changelog/basil/2025-03-31/invoice-preview-api-deprecations?changelog-sdk=dotnet