#j0n4
1 messages ยท Page 1 of 1 (latest)
Yep, unfortunately prorations are 'dumb' to whether the related invoice paid or unpaid so they're applied regardless if the proration_behavior param passed on the upgrade/downgrade requires
You can just manually adjust the balance if this is a problem: https://stripe.com/docs/billing/customer/balance#modifying
Ok thanks for your quick reply ๐ , is there something you would recommend checking on our end? to prevent this from occurring again
Well what is the desired behaviour? Do you want to prorate (credit) for unused time in scenarios where a user upgrades/downgrades?
If the customer haven't paid for the pending invoice = no credit
Then you'd need to implement logic in your application that handles the downgrades/upgrades to disable proration on the update if they have an unpaid invoice
Noted, do you have a guide/tutorial on this?
Nothing specific to that no. You'd likely need to list the invoice for that subscription/customer (https://stripe.com/docs/api/invoices/list) and check if there are any still open/unpaid. If there are, then pass proration_behavior: 'none' when you make the API call to update: https://stripe.com/docs/billing/subscriptions/prorations#disable-prorations