#BarrelRider

1 messages · Page 1 of 1 (latest)

proper galeBOT
molten coral
#

Hello 👋
Give me a moment to take a look

stable snow
#

Hello Hanzo, hope you are well. Thank you 🙂

molten coral
stable snow
#

Sure that will be very helpful, also just to add I am looking for the simplest solution really, so can the customer for example transfer the balance manually from stripe credit thingamajig to their account?

#

I mean that as a fallback if I can't do it like I wanted to. I can't imagine having to process for example 1000 refunds by myself, manually.

molten coral
#

Okay apologies for the delay here. Looks like refunding to the PaymentMethod is a dashboard only feature as of today.
When you cancel a subscription via the API then the prorated amount is added to customer credit balance
In order to refund from the credit balance

1/ Look at the credit in the account balance and/or sum pending invoice items
2/ Use the List Invoices API and pass the subscription id in the subscription parameter to only view Invoices for that subscription. Also expand the associated charge if any.
3/ For each invoice:

  • Check if there’s an associated charge
  • If so, create a refund for up to the amount of the account balance
  • If the charge amount is smaller than the credit, refund fully and subtract the charge amount from the credit
    4/ Move to the next invoice in the list until the full credit has been refunded
    5/ Update the customer’s account balance back to 0 via the API and/or delete the pending invoice items.
#

that should allow you to refund the credit balance via the API

stable snow
#

gotcha, not a problem and thank you for all the effort, that seems like whole lot of work!

I do have a follow up questions, simpler one but I feel I know the answer, it has two parts:

  1. Can customer see in the customer portal how much money is in the credit account?
  2. Can user do that by himself via the either billing portal or some other link?
molten coral
#

1/ I don't think that's currently possible. We don't show customer balance in the customer portal
2/ Unfortunately, not possible.

stable snow
#

Ok I may need to rethink if I want to offer refunds in a first seems like a lot of things can go wrong.

You've been great Hanzo, that is all for now, thank you!

molten coral
#

NP! 🙂 Sorry for the wait, server is running is a bit busy today.
Good luck

stable snow
#

No problem at all! 🙂

#

And thanks!