#josula_api

1 messages ยท Page 1 of 1 (latest)

umbral cloakBOT
#

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

๐Ÿ“ 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.

topaz loom
cedar dragon
#

Yes we tried that first thing. Does not work because the invoice is paid / finalised

topaz loom
#

Maybe footer? But yeah, I doubt what you want to do is possible, really...

cedar dragon
#

Do you have an idea how we could restructure our checkout flow to make this happen?

topaz loom
cedar dragon
#

yes we tried that!

#

but would that credit note memo show up on the invoice pdf?

topaz loom
#

I don't think so, but you said you tried it, right? The PDF was unchanged?

cedar dragon
#
  type: 'StripeInvalidRequestError',
  raw: {
    code: 'parameter_missing',
    doc_url: 'https://stripe.com/docs/error-codes/parameter-missing',
    message: 'Missing required param: amount or lines or shipping_cost.',
    param: 'amount or lines or shipping_cost',
    request_log_url: 'https://dashboard.stripe.com/test/logs/req_TPEM2aE3idfGzJ?t=1737565430',
    type: 'invalid_request_error',
    headers: {

This is what I get when I try to create a credit note for the invoice like this:

    const creditNote = await stripe.creditNotes.create({
      invoice: invoiceId,
      memo: `Order ID: ${order[0].display_id}`,
    });
topaz loom
#

What if you set amount to 0?

cedar dragon
#

cant

#

must be at least 1

topaz loom
#

๐Ÿค”

#

Well, it's probably not a viable path forward anyway, and would be a bit of a hack. Let's go back to the core problem...

cedar dragon
#

Ok mhmm

topaz loom
#

Let me type something out...

cedar dragon
#

ok

topaz loom
#

So this is your current flow:

  1. Customer clicks "buy now"
  2. We create the customer in stripe
  3. We create a new invoice
  4. we add the items to the invoice
  5. we finalise the invoice to receive the payment intent
  6. we pay the payment intent with the chosen payment method from the customer
  7. we placeOrder in our shopsystem and redirect to "Order has been successful".

What if instead of creating the Invoice at step #3 you instead created a Payment Intent for the amount due instead? Then you could get that Payment Intent paid, at which point you could add the amount to the Customer's balance. Then you'd create the Invoice with the order number on it and pay it. The Customer's balance would automatically be used on their next Invoice.

cedar dragon
#

thanks but seems to complicated

#

weird that this is an issue .we cant be the first / only ones having this problem