#helloworld_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1436254261099888662
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Could you provide the example Invoice ID?
You mean this?
in_1SQPqhKVER9ATJINa4SUop1L
I see each invoice line item has the description. What do you see on your itemized balance report?
(a screenshot would help)
I went the Report, under Balance change from activity click Export and view the csv file. It shows "Payment for Invoice"
I am hoping to edit such that the description in this balance export can be more descriptive.
Ah alright this is the Balance Transaction
The line of "200" here is the Invoice in total, not each of the Invoice Item
yup
Is this the itemized balance report you mentioned? Or you may want to find another report when it displays each item line first
Yes, I want the itemized balance report. As it is use for accounting reconciliation.
Can the "Payment for Invoice" text here be edited or changed so it can help the accountant better?
You can change it by changing the Balance Transaction, found from the Payment Intent from the Invoice
Sorry, do you mean this?
invoice = stripe.Invoice.create(
description='This invoice payment is for XXX product'
customer=client_stripe_customer_id,
collection_method='send_invoice',
days_until_due=0,
pending_invoice_items_behavior='include',
)
by including description here?
Nah don't think that works, but you can try
What I mean is after the Invoice is paid, retrieve its Payment Intent, then find the Balance Transaction, then change the Balance Transaction's description instead
I tried editing it via the dashboard and regenerate the report export but it didn't reflect. Does it take some time?
What do you edit via Dashboard?
this
and i checked that txn_3SQPqiKVER9ATJIN0Hg8aPDD is updated after i edited that
but the generated report still shows "Payment for Invoice" rather than "Payment for Invoice sendwill"
stripe API docs answer via AI says (not sure if its true):
Balance transactions in Stripe cannot be edited after they're created, including their descriptions.
Balance transactions are immutable records that represent the movement of funds in your Stripe account.
Hmm
๐ Hey, taking over here, just taking a look
thank you
Yeah, it does look like there's no way of directly editing the balance transaction description. Just trying to see if there's any other way to achieve what you want
but could i pre-edit it for example by settings the description within stripe.Invoice.create, so it generated into the balance transactions description which then reflect in the exported balance report?
Example code:
stripe.InvoiceItem.create(...)
stripe.InvoiceItem.create(...)
invoice = stripe.Invoice.create(
description='This invoice payment is for XXX product'
customer=client_stripe_customer_id,
collection_method='send_invoice',
days_until_due=0,
pending_invoice_items_behavior='include',
)
invoice.send_invoice()
I also faced the same issue for subscription related balance transaction record which when exported show just the generic "Subscription update" or "Subcription creation". Not really helpful too
Setting the invoice description doesn't appear to pass it on to the balance transactions, but retrieving the Payment Intent object, and setting its description may work. Just checking if I can confirm this
hey there! we're still looking into this question, thanks for your patience
yeah the balance transaction object will take the description of the associated PaymentIntent
so if you update the PaymentIntent's description, you can override the 'Subscription update/creation' description