#mangle8582

1 messages · Page 1 of 1 (latest)

versed berryBOT
zinc quiver
exotic umbra
#

Is there a option to calculate this automatically? Or i need to calculate it on backend based on time passed?

zinc quiver
#

Just to clarify, why are you refunding partially in this scenario?

#

What's the use-case exactly?

exotic umbra
#

So user is buying subscription monthly, it's 5 dollars let's say.

By law, you need to give him a 14 day interval so he can refund his money.
Meanwhile he used the servers, he cannot get 5 full dollars back after 14 days. Because he can stay in a unlimited refunding and he won't pay any money while using the servers.

So i need to prorate him, after 13-14 days if he wishes to refund, he will get money based on how much time he used of subscription plan.

#

So if it's a 5 dollar subscription monthly and he stayed 14 days, he will get like 2.60 dollars something like that, if he wants to refund

#

after 14 days he cannot refund anymore

zinc quiver
#

Got it

#

And are you cancelling the subscription after refund, or want to keep billing them?

exotic umbra
#

cancel the subscription and refund yes at the same time

versed berryBOT
zinc quiver
#

So if you cancel and prorate their credit balance will be the amount you need to refund them

#

You can then adjust their credit balance back to 0 since you refunded them the funds

exotic umbra
#

Before he presses the Refund button i will need to show him how much money he will get back, so i will do an invoice call from stripe

#

is invoice_now a boolean?

#

Will i need to use await stripe.refund.create if i pass the invoice_now param to stripe.subscriptions.cancel?

#

Or i can remove it

night flame
night flame
exotic umbra
#

I want to send the funds back to the payment method yea

night flame
#

So you would create the refund with the code you mentioned above, then adjust the customer balance back to 0

exotic umbra
#

Do i get the remaining proration on await stripe.subscriptions.cancel with invoice_now on the response? So i can pass it to stripe.refund.create({ amount: ??

night flame
#

The Invoice created in this case would have the amount you're looking for, which you could get from the Subscription object that gets returned after subscription.cancel()

exotic umbra
#

Oh nice nice, and if i pass it to await stripe.refund.create({ amount }); Then it will send the funds back to their payment method i suppose.

#

But then how do i reset the customer balance?

night flame
exotic umbra
#

Why do i need to reset the balance to 0? It doens't get automatically reseted after refund is done?

night flame
#

It does not

exotic umbra
#

I undestand, so it will allways need to stay 0 right?

#

In my case

night flame
#

Yup!

exotic umbra
#

Thank you!