#aaaaaaaaaaaaaaa-refund-amount

1 messages · Page 1 of 1 (latest)

crude relic
#

Hi there 👋 could you elaborate a bit on what you're trying to accomplish?

stray hedge
#

for example customer have a subscription for 1 year and he want to cancel the subscription after 1 month now how can we calculate the amount for refund depends the period left

crude relic
#

That seems like a business decision that is up to you. Do you already know the formula that you're planning to use to calculate refunds and are trying to figure out how to retrieve the necessary information for that calculation from the related Stripe objects?

stray hedge
#

I guess I dont know the formulae but can we calculate the amount depend on time left with the total amount

#

like I found the formulae 5000-5000/12
5000 is the total ammount paid

crude relic
#

We won't be able to tell you the formula that you should be using when calculating refunds, particularly as we're not familiar with the sector that you're doing business in or any legal requirements that you'll need to take into consideration. This forum is intended for helping developers build API-based integrations and answering the technical questions that arise during that process.

stray hedge
#

is there any way to get the prorated values?

#

??

cobalt cape
crude relic
#

You can also use the invoice_now and prorate parameters when canceling the Subscription to generate an invoice reflecting the prorations. However, if this results in an Invoice with a negative balance, that amount will be credit to the Customer's balance but will not be refunded to their provided payment method. If you decide to issue a refund for the amount, then you'll want to void the negative Invoice to avoid it skewing the Customer's balance.
https://stripe.com/docs/api/subscriptions/cancel