#akashpatil7596_api

1 messages ¡ Page 1 of 1 (latest)

regal roseBOT
#

👋 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/1224576994243514390

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

ornate phoenixBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

livid pike
#

When updating the subscription, Stripe will charge to the default payment method that saved onto the subscription automatically

flint mantle
#

hmm, Okay but Do I have to delete the old subscription item?

livid pike
flint mantle
#

If I use this method, it will delete the old subscription item and apply new, right?

livid pike
#

Yes! It'll delete the old price and add new price

flint mantle
#

Okay, I still have one query left.

#

If I upgrade from basic tier - 19.99$/month to premium tier - 999.99$/year, the stripe will automatically calculate the difference amount and charge for that.
But If I downgrade from premium tier - 999.99$/year to basic tier - 19.99$/month, in this case I want to cancel the premiun tier at the period end, and as soon as the period ends, the basic tier subscription cycle starts running, I don't know if that's possible or not? can you tell me?

livid pike
flint mantle
#

No I want to downgrade the subscription from premium to basic, but only the subscription cycle will start at the specific date.

livid pike
flint mantle
#

I don't understand the document you shared

#

First I create a subscription schedule with my existing subscription,
Then in the stripe.subscriptionSchedules.update what is the phases? what does it do? what is iterations ? am I creating new price?

#

Hello

livid pike
#

Thanks for waiting! Discord is busy now and will take time to reply

#

Phase is how you want a price to be configured in each cycle. For example in phase[0], it'll be configured to the current premium plan whereas phase[1] will be the basic plan. After each phase ends the specified timestamp, it will turn into the next phase with new changes

#

You can either choose iteration (how many cycle) or end_date (specific timestamp) on you would like to end this specific phase

flint mantle
#

Okay, forget it, this flow seems bit crucial.
I just want to do this:
If a customer downgrade from premium to basic tier, the amount will get refunded to the customer. what is the API for refund?
And here is my question, if premium plan is 999.99 $ and user used it for six months then the amount that has to refund is 499.99. So will stripe calculated this automatically, or do I have to calculate it manually?

livid pike
#

This is how you can refund the credit balance after downgrading the subscription plan: https://support.stripe.com/questions/refunding-credit-balance-to-customer-after-subscription-downgrade-or-cancellation

flint mantle
#

Actually I need an API which I can use to refund the customer

#

The refunded amount will directly goes to customer's payment method, right?

livid pike
#

After the subscription is downgraded, the fund will go to customer's credit balance. Refund API (https://docs.stripe.com/api/refunds/create) will be used to refund the amount and additional step is required to reset the customer's credit balance to 0. This guide provide step-by-step guide on how to do it: https://support.stripe.com/questions/refunding-credit-balance-to-customer-after-subscription-downgrade-or-cancellation

It's not only about refund, but also resetting the customer balance. If the customer balance is not reset, the next invoice will be $0.

The refunded amount will directly goes to customer's payment method, right?
Yes

flint mantle
#

Wait Wait

#

Once the subscription is downgrade the refund amount will goes to customer's credit balance. and at this stage the customer won't get any money.
But I have to refund the credit balance to customer to send the money to customer's bank account, right?

#

For this which API or webhook I have to use?

livid pike
#

Yes! Have you checked the guide above? It shared the Refund API information to be used

flint mantle
#

Yes I got it, So the downgrade of plan won't give customer their money but create a credit, I have to run the refund API for customers to get their money in their banck account

livid pike
#

Yes, you're right!

flint mantle
#

Okay

#

And can I do this whole process from stripe dashboard?