#maverick_refund-invoicebalance

1 messages ยท Page 1 of 1 (latest)

karmic currentBOT
#

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

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

flat owl
#

hello! looking at this now

thorn spade
#

๐Ÿ‘‹ Got an escalation internally too from a friend of yours I think

#

solanum and I figured it out, and it's a complete misunderstanding of how our API works and how confusing our naming can be

#

You have a Customer cus_123 with an invoice credit balance but you are trying to refund it using the origin: 'customer_balance' which is about a completely separate Customer balance called the cash balance which happens when they wire money to a VBAN we created for them

#

There is no flow (API or Dashboard) that can "magically" refund this amount for you. Usually this credit comes from previous payments on Invoices/Subscriptions and sometimes proration/downgrades if that makes sense

#

For each of those Customer objects, you need to find their related Invoice/Charges that really charged them and refund those original ones instead.
It's really complex and convoluted sadly but that's the way this works.
Does that make sense overall?

#

cc @kind ember

kind ember
#

Thank you both for helping out!

thorn spade
#

sure! Let me know if anything is unclear

kind ember
#

I think it makes sense, I was just hoping I could avoid the invoice/charge lookup per customer. Once I do set up the refund specific to each invoice/charge, would we be able to use the funds in "Future refunds or disputes prefunding" ?

thorn spade
#

yes it should work I think. I am not certain because my team doesn't touch this much, but I'm 90% sure it would just work

karmic currentBOT
kind ember
#

Okay, I will make the relevant changes to our batch refund and let you know

thorn spade
#

sounds good!

#

maverick_refund-invoicebalance

kind ember
spark spoke
#

Hi ๐Ÿ‘‹

I'm stepping ins as my colleague had to go

#

Can you explain exactly what you are doing and where? Is this in the Dashboard (Workbench) or in a terminal window?

Is there a reason you are not using the SDK?

kind ember
#

And I think my confusion stems from mischaracterizing to you what it is that I want to do. I don't necessarily want to "refund" customers, I want to make sure that they are not paying for usage they didn't get access to. To make things more concrete, I'm taking a look at one of our customers, Ramp. I've listed out their invoices according to their subscription, sub_1Ja673C6GHGjm0wVtlR3YEws, and I don't see a charge on in_1TFeavC6GHGjm0wVGF27gpSI,

#

I'm using the developers shell to examine the different data models

spark spoke
#

I'm using the developers shell to examine the different data models

In what context? Through the Dashboard or in the console?

kind ember
#

Through the dashboard

spark spoke
#

And in this case the question is about a lack of a charge on in_1TFeavC6GHGjm0wVGF27gpSI?

#

Or are you having trouble listing Invoices by Subscription?

kind ember
#

Yes, I am not sure which invoice and charge to "refund", if refunding is indeed what I would like to do

spark spoke
#

Well that Invoice negative. The amount is -$7,933.69 so there isn't a charge because you didn't collect funds for it

kind ember
#

Does this negative balance get paid to the customer? From examining the invoice on the dashboard, it's not clear to me whether that money was paid to the customer or not. My goal is to make sure the customer receives that credit

spark spoke
#

Negative balances do not result in refunds being issued to customers, no

#

Rather they are applied to the customer balance.

#

That will be used to offset future Invoices for that customer

kind ember
#

Hmm, is there a way to directly translate a negative balance into money being paid to the customer?

spark spoke
#

Yes, but it's a manual process

kind ember
#

Ah, so I can only do that via the dashboard somewhere? (my colleagues have been doing that for larger accounts already)

spark spoke
#

We don't really know much about the Dashboard here, we focus on the APIs and coding integrations with them.

kind ember
#

That's fair, but in conclusion, paying customers a negative balance is something that cannot be done via the API?

spark spoke
#

Sorry I think you are still mixed up a bit.

In that case you would need to identify the payment where the customer sent you the funds that you want to return. This would likely be the most recent payment for the Subscription that was canceled. You would then get the Payment Intent related to that Invoice (where the customer actually paid you the funds) and use that to create a Refund.

You can specify the amount if you want to refund less than the total paid.

Once that succeeds, you will want to debit the Customer Balance. This would zero out the credits that were applied to it. Currently, Stripe doesn't have a way to link these things together so you could wind up refunding the Customer actual money but they would still get the credits applied to their next Invoices.

#

"Paying a negative balance"

Unfortunately that doesn't make any sense in the current context. You can accept payments from customers but sending funds to them can only take place via a Refund.

#

You can modify the Customers Balance via the API directly using a Customer Balance Transaction. I recommend you review our guide for them because I find the design non-intuitive.