#bungee_checkout-prorations

1 messages ยท Page 1 of 1 (latest)

normal foxBOT
#

๐Ÿ‘‹ 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/1217165031939248169

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

keen patrolBOT
burnt herald
#

Sorry I missed your question! Are you trying to update an existing subscription? Is this a new Subscription you're creating?

normal foxBOT
#

bungee_checkout-prorations

burnt herald
#

@gray girder just checking in to make sure you saw my questoin

gray girder
#

Hi! Yes update a subscription via checkout session

burnt herald
#

You can't update Subscriptions through Checkout Sessions - you can only create new ones.

#

You should be using things like the Customer Portal if you want a stripe-hosted UI where you can update a subscription

keen patrolBOT
gray girder
#

My flow is the following:

  • User subscribes to plan A (15$)
  • Then they decide to upgrade to plan B (30$)

Due to proration, there's a $15 credit after upgrading that it's added to their balance, which I prefer to refund immediately. However, the credit appears an hour post-invoice, not instantly, making immediate refunds challenging as the balance temporarily shows $0. Can the checkout session be adjusted for immediate charging, allowing instant credit for any proration?

burnt herald
#

Again, the Checkout Session wouldn't be involved in the upgrading at all since that's soemthing you can only use for subscription creation. How are you upgrading your Subscription to plan B? Usually with upgrade the Invoice is finalized immediately, so I 'm surprised you're seeing the one hour delay. Do you have an example subscription we could take a look at?

gray girder
scarlet oasis
#

๐Ÿ‘‹ Ah the delay is because you're creating a new subscription which is not required.
You can upgrade an existing subscription instead

#

You can specify the proration behavior when you update a subscription object

gray girder
#

Oh! Interesting, that should help, thanks!

Another quick question: is it a good practice (as a workaround) to listen to the webhook event payment_intent.succeeded and perform the refund when listening to it? Or is preferred to use the subscription endpoint instead?

scarlet oasis
#

What are these refunds for exactly?

gray girder
#

Trying to refund Credit Balance to customer after Subscription Downgrade or Cancellation

scarlet oasis
#

Gotcha. Since you're working with subscriptions which uses invoices to manage subscription statuses, I'd say you should listen to invoice.paid event instead.

gray girder
#

Ah! makes sense, cool cool, thanks!