#jcnguyen_36895_03919
1 messages · Page 1 of 1 (latest)
Hello
Can you clarify? Not exactly sure what you mean.
An example JSON response might help
let me give you an example: when i have a subscription with price cost $200. When a subscription upgrade to another price let say $400. I used upcoming invoice to calculate the prorate and due amount. However, the API return 3 line items
- Prorate amount look correct
- Somehow it added another line called with new price
- Actual line with new price
because of 3 lines the amount due end up $600 instead of $200
Can you show me your code for how you are doing this?
SubscriptionItems = new List<InvoiceSubscriptionItemOptions>
{
new()
{
Price = priceid,
Quantity = 1,
Id = subscriptionitem.Id,
}
},
Hi, stepping in as bismark need to delurk. Let me catch up here
Can you share the request id where you're seeing three lines of items? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request . It looks like you're adding another invoice item no?
sure let me get you the requestid
req_xybHwt1oEyO5wN
it stop return 3 when i include this setting in the request: SubscriptionProrationBehavior = "always_invoice",
Can you share the response here?
the response from this upcoming invoice request
let me know if you need additional details
but i think adding SubscriptionProrationBehavior = "always_invoice" seems to works
seems shown up the amount due correctly after include ProrateBehavior as always_invoice
Can you share the request id where it works properly?
req_UvONv6qGuslonq
Ok, I've looked through and I can't figure out what the issue might be here. I recommend that you write in to us at https://support.stripe.com/contact.
got it thanks
i think adding proratebehavior seems to do the trick
i've tested and seems to work
Nice, I'll add this to my test too.
but in term of why it double charge if not specify that's something i don't know
I need to close the server, but we will open back up in a few hours if you need further assistance. Or, you can write in to us at https://support.stripe.com/contact