#aw-shreyas_unexpected

1 messages ยท Page 1 of 1 (latest)

unborn sandBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1291737678009598052

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

zinc vine
#

hi there!

dry hill
zinc vine
#

before creating a new subscription, you could check if that user already had a subscription before that they cancelled, or if their payment method was already used in a Subscription before. and if so, prevent them from creating a subscription with a free trial.

dry hill
#

Actually in my application there is a upgrade/downgrade feature so when go from free to paid (it is upgrade) but when go from paid to free its downgrade and we allow this downgrading functionality

zinc vine
#

got it, but it's completely up to you to prevent users from downgrading or upgrading. you have to do some checks on your end.

dry hill
#

or if the subscription is deleted (cancelled) the stripe automatically refunds the charged amount ?

zinc vine
dry hill
zinc vine
#

if you want to refund the user, yes.

dry hill
#

Actually this is first time in my app that user has downgraded to the free tier. So, now if I refund the amount manually, stripe wont do double refund rite

so meaning if paid subscription amount is $50, and if I refund the amount to user manually, there wont be refund processed like $100. Is my understanding correct ?

zinc vine
#

I'm sorry I don't really understand. what is your end goal here and what are you trying to do? a specific example would help, like:

  • User subscribed to a monthly subscription for $5 per month
  • Then user downgraded to a free trial on the 15th of the month
  • Now I'd like to refund the user for the unused time, so $5/2 = $2.5
  • Etc.
dry hill
zinc vine
#

in this case in the Subscription you'll find an Invoice. In the Invoice you'll find a PayemntIntent. And then you create a refund for that PaymentIntent, and the user will be refunded $50.

#

I recommend testing this in test mode to make sure it works as expected.

dry hill
#

So you are suggesting to not to do via manually ?

unborn sandBOT
zinc vine
#

what do you mean by "manually"?

dry hill
#

Since I need to test the API and it should work at that moment when user is downgrading.

remote vortex
#

Hi taking over here

#

You can do this via the api or dashboard doesn't matter

#

Up to you

dry hill
#

Okay do we have any functionality related to pro rata ?

dry hill
#

just confirming with you since you know better than me ๐Ÿ™‚

remote vortex
#

Why would it be double?

#

We only refund what you tell us to refund

dry hill
#

ohh ok ok, Can i do a custom refund as well, meaning I dont want to use the pro rated refund but refund like $35, I need to jst create the refund on that payment Method ?

remote vortex
#

You control the amount you refund

#

At most it can be the payment amount

#

You can always do a partial refund

dry hill
#

yeah i need to do customized refund. Not the pro rated refund ๐Ÿ™‚

remote vortex
#

Yeah, so you'd just pass the payment intent id and the amount you want refunded