#zlatko-portal-downgrade

1 messages ยท Page 1 of 1 (latest)

slender sandBOT
hollow rivet
#

zlatko-portal-downgrade

#

@wispy pier yeah that's the best option in that case

wispy pier
#

Could you help me out and let me know which event I can listen to and which API should I call to return the credit. I'm going through the documentation, but can't find the correct event/API

hollow rivet
#

I would listen for invoice.paid I think and see ending_balance and react based on that

wispy pier
#

Do you know what is the best way to return the money(which API)?

hollow rivet
#

there isn't really a good way sadly

#

you basically have to find recent charge(s) for them and refund those until it adds up to the credit

wispy pier
#

So if I understand correctly e.g. Customer buys a plan for 70$ and then immediately downgrades to 30$ plan. This means there would be an invoice.paid for the initial plan and a charge. Then there would be a second invoice for the second plan and a charge.

I then need to listen to invoice.paid and if the ending_balance is positive. I need to get the most recent charge which is 30$ and call the refund API. After this call is made they still have a balance of 10$. So I need to get the first charge(which was 70$) and refund 10$?

hollow rivet
#

I need to get the most recent charge which is 30$
no it's $70

#

They paid $70, then they downgraded to a $30 Price, so they paid 0 and got $40 credit

wispy pier
hollow rivet
#

yes

wispy pier
#

ok, so in theory I could get the last charge and refund that one

#

Quite complicated to return money ๐Ÿ˜…

#

then I also need to handle the failed refund events etc. right?

#

Do you maybe know if it's possible to setup the Customer portal in a way that on upgrades the Customer gets charged right away, but on the downgrade it's at the end of the billing period

hollow rivet
#

I mean failed refunds are not really likely in general and that's no different from any refund flow

wispy pier
#

and the Customer portal configuration? Are you maybe aware if that is possible to setup or it's not supported at this time?

flint kestrel
wispy pier
#

๐Ÿ‘ thank you

#

Based on what I checked you can't control if you make an immediate payment or at the end of the billing cycle if it's an upgrade or a downgrade.
Whatever you select applies to all scenarios

#

My current setup is Prorate subscription updates and Invoice Immediately

flint kestrel
#

Yeah, I think you're right. After looking at it a bit more, you would need to be able to specify when the next subscription starts (in the case of downgrading), and it doesn't look like you can do that with the Customer Portal

wispy pier
#

ok, I thought so. It would be amazing if you could add this as a feature in the Customer portal. I imagine many businesses have this use-case

#

thank you very much, to both of you for your help. I think I have enough information for now to continue my work ๐Ÿ™‚

flint kestrel
#

I submitted the feedback to the product team on your behalf, as that makes perfect sense to me. I've had similar requests in the past from folks that wanted more out of the customer portal, so I can definitely see the demand