#bloemy_invoice-description-updates
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/1332130855384125542
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
What have you tested so far?
Hi! Thanks for answering. I've tried updating the description on the subscription but no success. The main issue is that I'm not able to get a hold of the actual invoice that is generated when I add a new subscription item. If I were able to get that invoice, I would be able to modify it while it is still in draft mode, but I am not able to and wondering how I can proceed with that
Can you share an example subscription ID I can take a look at?
yeah wait a sec
so for subscription ID sub_1QMWz4IkpX6A9RL7YyYZwTbM
for instance
for item ID si_RF11KWRF2lFTcX
today the item was increased from 2 to 3
this generated the invoice in_1QkUhPIkpX6A9RL7tlfzOwaX
in this case it was with credit card so it's automatically paid and processed, but in some cases it's manual invoices so they get sent over for payment
what I need is the ability to modify some information on that invoice basically before it's being sent out for payment (to add information so that the vendor paying it can route it properly in their finance system and htey know who to attribute the charge to)
Okay yeah the description on the Subscription is not copied over to the Invoice. I realize that, for the updates, you don't have the 1 hour draft status in which you can make updates before it gets finalized.
would I have the 1 hour draft status if it were an "invoice_sent" type invoice though? or would that get finalized directly as well
So that means you don't have any time where you can update the Invoice before the charge_automatically payment is processed.
because that's the case I care about (when the invoice is sent for manual payment)
right yeah for charge_automatically I understand, and that is fine
Unfortunately no. You have a 1 hour draft period for recurring invoices. Not ones that are generated due to an update.
mmh. So it's impossible to add any information to an updated invoice? is there any way I can work around it? could I generate the invoice myself somehow?
And that happens for both send_invoice and charge_automatically
right, but so no work around at all? this seems like a common use case, I'm confused as to how I should handle this
Just double checking a few places
Hmmmm... I was able to update the Invoice through the Dashboard but it looks like we are using undocumented parameters.
Specifically
invoice_settings: {
description: "What exactly is this doing?",
footer: "I have feet!",
},
I would hesitate to recommend using undocumented parameters in production applications though. Because we don't document them, we feel free to change how they work, what their names are, or even whether they exist or not without telling anyone
that was. in the subscription update?
I see, mmh
or as part of what call was that?
That was an /update call to the Subscription API
aha, fascinating
We document the invoice_settings parameter here: https://docs.stripe.com/api/subscriptions/update#update_subscription-invoice_settings
But we do not document those specific properties I changed.
I will look into that but I recommend the danger of using this as they might change.
Is there at least a reliable way for me to retrieve exactly what the invoice ID was that was generated by an update afterwards? so that I could at least send a follow up email to the client to explain what that invoice was for?
It looks like you are making the update to the Subscription Item directly using the stripe-node SDK. What you could do is and the expand: ['subscription'] parameter when making that call.
https://docs.stripe.com/expand
This would return the full Subscription object which would include the latest_invoice property: https://docs.stripe.com/api/subscriptions/object#subscription_object-latest_invoice. This would have the ID of the most recent invoice generated by that subscription
If you wanted to review the default description, you could change the expand parameter to expand: ['subscription.latest_invoice']. That would return the full Invoice object as well and let you review the details
ok thanks a lot. And so let's say I wanted to actually generate that invoice manually myself so that I was able to include the link, could I imagien a flow where I marked the subscription so that it does not automatically send invoices to the customer, but when I update the subscription I retrieve the latest invoice, I then create a new invoice with the same exact price, but I can add my information on it, and I then send that off to the customer? and I void the initial invoice that was generated? Would that be my easiest solution here?
Well if you use the link associated with the Stripe generated Invoice, then the UI the customer sees will have the details from that Stripe generated Invoice and that is where the payment will be recorded.
the thing is they need a PDF invoice with the information (these are old school systems), so basically either I recreate an enitre PDF myself, or I just re-create a separate invoice in Stripe with the same payment amount right?
is it possible for me to make it so that the update to the subscription does not automatically send the generated invoice to the customer or not? so that I can do what I have to do after?
is it possible for me to make it so that the update to the subscription does not automatically send the generated invoice to the customer or not? so that I can do what I have to do after?
Hmmm.... ๐ค
what you could do is use the Invoice Preview API https://docs.stripe.com/api/invoices/create_preview to create a Preview Invoice object that represents the prorated amounts.
But then, when you make the update, specify proration_behavior: 'none' so that we (Stripe) don't 1) create and charge an invoice or 2) generate prorations for the next invoice.
Then you could create a one-off Invoice for that customer and specify whatever description you want. The downside there is that would not automatically link this Invoice to the Subscription in Stripe
Great ๐ I'm glad we found our way to a reasonable approach.