#josula_api

1 messages ยท Page 1 of 1 (latest)

polar vergeBOT
#

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

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

quasi dragon
#

When i simply call stripes.quotes.update() I get this error:

When a quote is in `open` status, you can only pass supported parameters. `default_tax_rates` is not supported.
```
bitter kite
quasi dragon
#

woah thats insane

#

thanks!

#

What would your recommended flow then be?

  1. I will fetch the quote ID.
  2. I would create a new quote from that one, and then I would probably cancel the old one.
    Or what is the recommendation of your flow?
bitter kite
#

That would be the flow that makes the most sense for me.
One thing to note, is when cloning an existing quote with the from_quote make sure you use from_quote.is_revision: 'true' to ensure the cloned quote is a draft.

quasi dragon
#

thanks for the heads up

#

One more question: How can I set the language of the quote? For some reason, it's always in German for me

#

Is that tied to the customer's preferred locale?

#

Also, regarding the quotes, is there any possibility that the user who clicks on the old quote gets redirected to the new one? Or is there any possibility to create a link between these two quotes so that, when the customer wrongly clicks on the old quote, they get forwarded to the correct one?

bitter kite
#

Looking into that for you. I would suspect the customers preferred locale because I don't see any other option to select the language, but let me test really quick.

quasi dragon
#

yes it works with the locale tbh

bitter kite
#

My understanding is if Customer Locale is set it will default to that, if not it will fall back to Merchant Locale

#

I don't believe there is a way to forward the new quote or link back to the new one if the old one is selected. I'd suggest canceling the original quote once the new quote is available and finalized.

quasi dragon
#

I will probably attach it to a different object I'm using and then just cross-reference in case the object exists in my quote item in my shop system

#

Sorry, one last question also related to quotes. When we move a quote into the finalized state and the customer accepts it so that there is an invoice created, I somehow cannot pay the invoice by bank transfer so that the customer simply transfers the money to the Stripe account. This option is not given. I can only select credit card and PayPal for some reason. Am I doing something wrong?

#

It is telling me then in the API that this payment method is not valid to pay via bank transfer

bitter kite
#

Do you have an example Invoice ID I could look at?

quasi dragon
#
  await stripe.invoices.update(invoiceId, {
      metadata: {
        ...invoice.metadata,
        ...invoiceMetadata,
      },
      custom_fields: customFields.length > 0 ? customFields : undefined,
      // Set payment_settings to include all supported payment methods for invoices
      // Note: Billie and Mondu are B2B payment methods that are NOT supported via invoice payment_settings
      // They must be handled separately via direct Payment Intent confirmation
      payment_settings: {
        payment_method_types: [
          "card",
          "paypal",
        ] as Stripe.InvoiceUpdateParams.PaymentSettings.PaymentMethodType[],
      },
    });

E.g. here I a updating the invoice from the quote before finalisng it. I cannot add bank transfer into the payment method types somehow. or what do I need to add here?

bitter kite
#

Also to handle this via API you can pass customer_balance to payment_method_types to enable bank transfers on the invoice.

quasi dragon
#

The payment method type customer_balance cannot be used with invoices that have the collection_method set to charge_automatically.

bitter kite
#

Ah, yeah I'm fairly positive bank transfers will only work for send_invoice

#

Would you be able to provide a bit more about the desired goal or ideal flow you had in mind? Just want to see if we can brainstorm any alternatives.

polar vergeBOT
quasi dragon
#

mhmm but we have other payment methods e.g. BNPL like billie that require to use charge_automatically...

oblique lance
#

taking over for mossy, i'm looking into this and i am not finding a way to make bank transfers work without moving to send_invoice

quasi dragon
#

Yeah, but we have the problem that we offer both payment methods, so we don't know in advance what payment method the customer will be using. If the customer wants to use a BNPL payment method, we need to update the invoice differently, but the problem is that once the customer pays, the invoice is already finalized, so we cannot make any further adjustments

oblique lance
#

hmmmm ok

#

i don't think there's an easy solution here, but let me poke around and potentilly chat with my team

quasi dragon
#

thank you!

oblique lance
#

do you have an example subscription with charge_automatically and billie being used as a payment method handy?

polar vergeBOT
mellow lion
#

Hello! I'm taking over for solanum. I believe they asked for an example to confirm:

  1. billie does indeed work with subscriptions
  2. billie does indeed require charge_automatically
mellow lion
#

I'm not very familiar with billie but I was able to confirm that the API blocks the customer_balance payment method type with the charge_automatically collection method as you suspected, so I think you'll have to pick one.