#josula_quote-invoice

1 messages ยท Page 1 of 1 (latest)

chilly sandBOT
#

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

orchid seal
#

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

south kernel
#

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

orchid seal
#

mhmm

#

ok

orchid seal
#

but why is the invoice immediately finalised? I want to keep it in draft after accepting the quote?

south kernel
#

because at that point we assume the quote is the real end state so it's finalized automatically

chilly sandBOT
orchid seal
#

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

ebon brook
#

Hello ๐Ÿ‘‹

I'm stepping in as my colleague has to go. Can you provide an example Invoice ID that demonstrates this behavior?

chilly sandBOT
orchid seal
#

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

ionic idol
#

hello! this looks like the node method is missing, what node stripe JS version are you on?

orchid seal
#

22

#

v22.22.1

ionic idol
orchid seal
#

"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

ionic idol
#

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

orchid seal
#

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.

ionic idol
#

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

orchid seal
#

Thank you very much. I'm actually going all in and updated to the latest version now

ionic idol
#

godspeed ๐Ÿซก

orchid seal
#

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