#helloworld_code

1 messages ยท Page 1 of 1 (latest)

south hazelBOT
#

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

restive wasp
#

Could you provide the example Invoice ID?

white eagle
#

You mean this?
in_1SQPqhKVER9ATJINa4SUop1L

restive wasp
#

I see each invoice line item has the description. What do you see on your itemized balance report?

#

(a screenshot would help)

white eagle
#

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.

restive wasp
#

Ah alright this is the Balance Transaction

#

The line of "200" here is the Invoice in total, not each of the Invoice Item

white eagle
#

yup

restive wasp
#

Is this the itemized balance report you mentioned? Or you may want to find another report when it displays each item line first

white eagle
#

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?

restive wasp
#

You can change it by changing the Balance Transaction, found from the Payment Intent from the Invoice

white eagle
#

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?

restive wasp
#

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

white eagle
#

I tried editing it via the dashboard and regenerate the report export but it didn't reflect. Does it take some time?

restive wasp
#

What do you edit via Dashboard?

white eagle
#

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.

restive wasp
#

Hmm

south hazelBOT
shut sage
#

๐Ÿ‘‹ Hey, taking over here, just taking a look

white eagle
#

thank you

shut sage
#

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

white eagle
#

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

shut sage
#

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

south hazelBOT
oblique valve
#

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