#haris ishtiaq-invoice
1 messages ยท Page 1 of 1 (latest)
exactly so how can i get it using api ?
using the retrieve a customer API https://stripe.com/docs/api/customers/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you will find the balance on that object
is it refundable ?
are you sure the applied balance and the balance in customer object is the same?
yes
balance is still showing 0 every time, no matter what amount is there in applied balance
what i noticed is there are two balances in an upcoming invoice estimation
one is starting_balance and other one is ending_balance
can you tell something about it
im actually looking for credit balance amount that a company yet to pay to the customer or amount is there to be used in future payments
starting_balance and ending_balance are the Customer's balance before and after the invoice
okay but customers balance remains 0 no matter how large the applied balance is
could you please share the id of that invoice where you have the applied balance?
I'm looking at it, please be patient, I will answer you as soon as I can
ok ok i was just making it sure that u read the message
no worries, it's just it's been busy on discord lately ๐
on that invoice, the starting_balance is equal to the balance of the customer (-2399.95), the amount you later see in the Applied Balance in a positive form
the ending_balance is 0 since we used the customer's whole balance to pay the invoice
in the upcoming invoice there wouldn't be any Applied Balance, since the starting_balance is now 0
okay i understand
now have a look at this
this is a customer having credit balance of 2399.98
oh I see that the customer has a credit balance
now when i retrieve this customer object i shows balance 0
did you refund the first invoice?
ok got it
was retrieving the wrong customer
my bad ๐ฎโ๐จ
okay so we can refund this balance at once by putting this amoutn in refund api right ?
the customer still has the account balance even after it was used in the invoice
did you add more balance to their account?
after the invoice I mean
actually i upgraded the subscription (by swapping the previous plans with the new ones) and it was prorated.
so the new plans were cheaper as a result it gives me money back i think..
no i didn't add any more amount
I just figure it out, basically as you said it was a proration thing that started this all thing
yup
the invoice that you first shared had a "small amount" less than the amount that Stripe Charges (50cents)
bcz of prorated thing may be
but this will work for me for now
i just want to confirm that how can we refund this amount to the customer to their bank
the only way to refund an amount is to locate a Charge/Payment done from the customer and refund that
in your case it could be this one https://dashboard.stripe.com/test/payments/pi_3LFCAbJOIuKIWiW60KH7fHst
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
that requires a charge or payment id
so i can not just refund the whole amount at once ?
editted: if it is been collected from multiple payments or charges
that requires a charge or payment id
yes that's correct
unfortunately that's a limitation that we don't have a workaround for
let me know if you need any more help
thank you
have a good day