#grace-invoice-customerbalance
1 messages ยท Page 1 of 1 (latest)
Hi ๐
I'm sorry but that question doesn't make any sense to me. What are you trying to do?
creating an api, this API should take a look at the balance adjustment made on the customer of an invoice that adjusted the customers balance due to a zero-dollar invoice and should perform a stripe transfer to the associated connect account for the amount of the balance adjustment on that invoice
hello, are you there?
hello???
oh, i see
Once again, the question doesn't make sense.
You don't invoice a Connected Account
So what are you trying to do here?
Create an invoice, create a transfer, apply a customer balance?
after applying a customer balance, let's say 100, what will the ending_balance be for that invoice?
on the invoice you just created
I don't know what you are talking about. I didn't create an invoice
Please try to be specific about an integration and a behavior you are seeing. API request IDs would also be helpful
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
let me rephrase my question, how can i get the balance adjustment made on the customer of an invoice, when given the invoice id
Okay so you have a Invoice ID and you want to get to a record that represents the change in the customer balance? You would take a look at the Invoice object's Payment Intent.
https://site-admin.stripe.com/docs/api/invoices/object#invoice_object-payment_intent
From there you would go to the Latest Charge: https://site-admin.stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
And Balances transaction: https://site-admin.stripe.com/docs/api/charges/object#charge_object-balance_transaction
this is the test invoice i created, seems like the payment intent is null.
The screenshot isn't super helpful here but it looks like the amount may be 0. In that case we don't generate a Payment Intent because you won't be accepting any payment
so i have a amount_due=0 invoice, and i want to see the balance adjustment made on the customer of that invoice, what would be a way to do it?
Do you have the invoice ID I can check?
i don't have a specific id, i'm trying to write the logic to achieve what i just said above. Is there a way to create a test invoice that fits this scenario?
grace-invoice-customerbalance
@exotic prism https://stripe.com/docs/billing/customer/balance
you want to add a credit to the Customer's balance for example before the Invoice
did it with the test invoice in the screen shot i sent
All you're sharing are pictures
What do you need help with exactly? I'm sorry I don't really follow the confusion/problem
how can i get the balance adjustment providing the invoice id?
in the dashboard, i edit the invoice credit balance, it is affecting the invoice on the screen shot. In my code, i have that invoice id, how can i get that balance adjustment amount?
hello?
Sorry there are like 20 other developers needing help.
oh, i see
Wht have you tried? It's right there in your previous picture?
ya, but i'm trying to get that in my code, like accessing an api
https://stripe.com/docs/api/invoices/object has every property and what you want is starting_balance which is the Customer balance total before the Invoice, and ending_balance which is the customer balance after the Invoice
ya, my assumption was start and end balance but saw that, the ending balance is null,
please don't keep sharing pictures
If you can share exact id from your exact code instead of pictures of a network tab in Chrome, I'm happy to help you or try at least.
in_1Mni8LFyrvghf3LktaCJo3BB this is the test invoice i created
That Invoice is a draft right? You haven't finalized it, so the balance hasn't applied yet and so there's no ending_balance
Also that Invoice is completely empty with no line items
https://stripe.com/docs/api/invoices/object#invoice_object-ending_balance
Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
Our docs say the exact same thing and are as detailed too
can i finalize that invoice somewhere in the dashboard?
Just to clarify, this Discord server is for developers asking questions about their own code. So usually you would do all of this quickly with code as the developer.
And you can't finalize an Invoice that has no line items, you forgot to add a real Price to it at least. But yes after that you can finalize in the Dashboard
i see send , duplicate etc, where is the button to finalize?
I explained you have no line items on it
Are you a developer yourself? Or just playing with the Dashboard?
i just added one item
i am not just playing with dashboard, i'm building an api, need a test invoice in that scenario
and, that is why i sent screen shots, do that you can see what i did with your eyes
1/ Create an Invoice: https://stripe.com/docs/api/invoices/create
2/ Add a Price to the Invoice: https://stripe.com/docs/api/invoiceitems/create
3/ Finalize the Invoice: https://stripe.com/docs/api/invoices/finalize
it would take you a minute to write code that does this for you end to end and you would be all set
again, can i finalize it on the dashboard?
yes
could you please send me a screen shot as to where to do it, i would really appreciate it
hum I can't see the button either and I am helping 20 other people with coding questions
Please write code instead which will take you a minute and solve the problem
can i talk to your manager?
You can definitely contact our support team yes: https://support.stripe.com/contact
I did answer your question though. It does look like something change and the button is not there anywhere. It definitely should, and I'm flagging internally, but right now the only option will be to write code for it
oh, i see, thx then
so you don't know if the dashboard can still finalize the invoice? you should have told me that
i do want to ask someone who knows in the dev help
I'm the one answering, you can't ask someone else, this is my shift. For now I have explained the button isn't here and while it should be, it's likely a UI change and for now you will need to write code.
My team rarely touches the Dashboard, we help developers with their code. If you do want to mostly focus on the Dashboard for now, I would recommend talking to our support team directly at https://support.stripe.com/contact as they are more familiar with this UI