#mayank_sharma.
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- mayank_sharma., 21 hours ago, 17 messages
- mayank_sharma., 22 hours ago, 9 messages
Can you share an example?
Ok. A customer subscribed to a plan of Rs. 499 montly plan on let's say Oct 7. At the time of renewal on Nov 7, let's say the payment failed. Now the proration is getting updated to -499 ans it shows the reason as "Unused time on plan after Nov 7th", because of this proration adjustment the balance is updated to -499 which is causing issues in our refund flow ( as it seems we owe the customer this amount)
AFAIK that is just how it works. We apply prorations for unused time as we assume payment of the invoice
You'd ned to disable prorations in those scenarios where the previous invoice is unpaid
But how can we do that? We are using Low code integration, moreover it will affect the customer subscription proration behviour not for that particular invoice ( e.g DOwngrading from paid plan to free plan in the middle of the cycle, where proration should actually happen)
What does a low-code integration look like? How are you triggering updated?
We are using Stripe managed Customer portal and we are listening to Stripe events using Webhook
So stripe triggers the updated events for us
Yeah you can't control proration on updates via the portal unfortunately
Oh, wait. You can: https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-proration_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
From the Dashboard:
let me check
But @gentle sandal this is for overall subscription behaviour, what if we want to disable proration just for a failed invoice only...
No-code/low-code likely prevent that. You'd need to make an API call
Which API can we call then just for disabling proration for failed invoices. Can you share the API if any?
Well you don't disable proration at the invocie level. It's a parameter you'd pass when you make the subscription update, or in the case of the portal when you create the session (as shared above)
So I guess you'd check the status of the most recent invoice on the subscription and if unpaid then disable prorations when you make the portal session/update the subscription
Still it does not solve our use case, because then we would have to reenable it again after that for paid invoice...because in normal successfull flows we do need prorations