#josula_quote-invoice
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/1484208365919010943
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- josula_api, 23 hours ago, 24 messages
- josula_api, 1 day ago, 3 messages
There is no way to prevent an invoice from being created. I know I could immediately cancel or delete it after but that seems very hacky
josula_quote-invoice
@orchid seal the point of the Quote is to turn into a real Invoice or Subscription so there's no way to defer this. The proper way is to not explicitly accept the Quote in the API until you're ready to invoice them
but why is the invoice immediately finalised? I want to keep it in draft after accepting the quote?
because at that point we assume the quote is the real end state so it's finalized automatically
mhmm ok. well thats a bummer.
Actually I don't think what you're saying is correct. When I accept the quote in the dashboard, the resulting invoice is a draft
Hello ๐
I'm stepping in as my colleague has to go. Can you provide an example Invoice ID that demonstrates this behavior?
const invoice = await stripe.invoices.attachPayment(
"in_1Nj68C2eZvKYlo2CGmFJak8q",
{
payment_intent: "pi_1GszwY2eZvKYlo2CohCEmT6b",
expand: ["payments"],
},
Property 'attachPayment' does not exist on type 'InvoicesResource'.ts(2339)
I don't understand why my API version does not have this method
const stripe = new Stripe(process.env.STRIPE_API_KEY!, { apiVersion: "2025-02-24.acacia", });
According to your docs it should be there for this particular stripe version
hello! this looks like the node method is missing, what node stripe JS version are you on?
sorry i meant to say what version of stripe-node are you on, i'm currently looking at our changelog to figure out when this method was added
https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md
i think we added that method in 18.2.0
https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#1820---2025-05-29
"stripe": "^17.6.0",
ok.. What would be your recommendation? We are using Stripe in quite a lot of places. I'm scared I'm breaking a lot of stuff. I could probably also just run it as a curl without the SDK even though that wouldn't be clean.
Are there any crazy breaking changes you are aware of? We are mainly working with payment intents, quotes, and invoices
there are a whole lot in the 18.0.0 release unfortunately, you can see a list of them here
https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#๏ธ-breaking-changes-due-to-changes-in-the-stripe-api
a lot of our SDKs support making less-structured calls to the API without doing a direct CURL, let me double check if you can do that in node
ok i think this might be the easiest option for you
https://github.com/stripe/stripe-node/tree/master?tab=readme-ov-file#custom-requests
Maybe it is also a good time for me to finally update Stripe. I see that a lot of changes that you guys made could be relevant for us. I'll just have Claude analyze every implementation of our Stripe in the codebase.
i would maybe try updating the version to 18.2.0 just as a test to make sure that resolves the error, but yeah the custom requests route is probably the lowest effort option atm
Thank you very much. I'm actually going all in and updated to the latest version now
godspeed ๐ซก
One of the major changes I see is that the finalized invoice call does not return the payment intent related to the finalized invoice. Is that right? How would I retrieve the payment intent of a finalized invoice now?
` const finalizedInvoice = await stripe.invoices.finalizeInvoice(invoice.id);
await stripe.paymentIntents.update(
finalizedInvoice.payment_intent as string,
{
payment_method: [
"paypal",
"sofort",
"billie",`
Property 'payment_intent' does not exist on type 'Response<Invoice>'.ts(2339)
That is actually the only breaking change I see. I also noticed you changed unit amount to amount but that is not an issue