#j0n4

1 messages ยท Page 1 of 1 (latest)

foggy veldtBOT
scarlet star
#

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

split portal
#

Ok thanks for your quick reply ๐Ÿ™Œ , is there something you would recommend checking on our end? to prevent this from occurring again

scarlet star
#

Well what is the desired behaviour? Do you want to prorate (credit) for unused time in scenarios where a user upgrades/downgrades?

split portal
#

If the customer haven't paid for the pending invoice = no credit

scarlet star
#

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

split portal
#

Noted, do you have a guide/tutorial on this?

scarlet star
#

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

Learn about prorations.