#.dylana

1 messages ยท Page 1 of 1 (latest)

peak valleyBOT
proper goblet
#

Hi! Let me help you with this.

#

Could you please share an example?

raw river
#

So i am creating quotes for connect account and i would like to apply taxes on my quote

#

i have got that

#

and i would like to apply taxe if needed and if there is no taxes i would like to display a message on my quote

#

(french laws)

proper goblet
raw river
#
const parseProductToLine = () => {
      let lines: Stripe.QuoteCreateParams.LineItem[] = []
      for (const product of products) {
         const line = { price: product.default_price as string, quantity: 1 }
         lines = [...lines, line]
      }
      return lines
   }
#

here is my line item converter from products

#

beacause i can't do it only from line items right ?

#

Where have I to put my taxe rate ?

proper goblet
#
const line = { price: product.default_price as string, quantity: 1, tax_rates: [...] }
raw river
#

ok and what should i put into tax_rates ?

proper goblet
raw river
#

but what if i want to apply this tax_rates to each items of the quote and display a message when there is not tax_rates ?

peak valleyBOT
proper goblet
west venture
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

raw river
#

Hello so i was asking for setting global tax-rates on my quote

west venture
raw river
#

ok so i should use default _tax_rates ?

#

what should i put inside ?

west venture
west venture
raw river
west venture
#

more precisely tax rate ID

peak valleyBOT
raw river
#

but my quote is sent via on_behalf_of does that make a difference ?

dense cobalt
#

Does it make a difference to what?

raw river
#

Because each of the connected accounts can have different taxes rates depending on the service provided

dense cobalt
#

Then you need to account for that by creating all appropriate Tax Rates and applying them when required

raw river
#

and i did create taxes but there are only visible on my invoices

#

So i tried something and it's says that i cannot apply taxes on behalf of someone

dense cobalt
raw river
#

it's not an id

dense cobalt
#

Ah, this is in the Dashboard?

raw river
#

yes but i'm trying first via the dashboard

dense cobalt
#

Maybe you can't do what you want to do then

raw river
#

oh so what can i do ?

dense cobalt
#

Well, what is it you're trying to achieve?

raw river
#

i m creating a plateform where i m making relationship between freelancer and company. And i want to send quote and invoice from the freelancer to company. To achieve that i have to apply freelancer's taxes on each quotes/invoices and also application fee.

#

because in france there several law and i have to manage them, that's why i have got problemes with quotes/invoices/taxes

dense cobalt
#

Ok, but you're doing destination charges yes? (i.e. passing transfer_data)

raw river
#

yes

#
export const createStripeQuote = async ({
   products,
   sellerId,
   customerId,
   applicationFee
}: IStripeQuote) => {
   const parseProductToLine = () => {
      let lines: Stripe.QuoteCreateParams.LineItem[] = []
      for (const product of products) {
         const line = {
            price: product.default_price as string,
            quantity: 1,
            tax_rates: []
         }
         lines = [...lines, line]
      }
      return lines
   }
   const quote = await stripe.quotes.create({
      customer: customerId,
      // create the different line of the quote
      line_items: parseProductToLine(),
      // apply the application fee
      application_fee_amount: applicationFee,
      // is to send the quote on behalf of a freelancer
      on_behalf_of: sellerId,
      footer:
         'Coexis obligations legals: qhsudih squikjdh sqjkdhisqjh dkjsqj dqksjd kslqjd klsqjdkslq je qsjdklsqjkdlkqskdsqkdmlqskdlmsqkdqlsm lqsdklqsm dklmqskd lmsqkd lmqsk  dsqlmdk qsl dklms klsqdklmq kqlms',
      description:
         'Siret: xxxx x xx x xxxx xxxx      address: 11 village de la coquerire             50480 sainte mere รฉglise              TVA: xxx xx  xx x x xx ',
      transfer_data: {
         destination: sellerId
      }
   })
   console.log('quote', quote)
   return quote
}
dense cobalt
#

Ok, and if you add default_tax_rates what happens?

raw river
#

seem to be working for 20%

#

but when my customer want to add custom taxe ?

dense cobalt
#

What I'm trying to get is the req_xxx ID of a failing API request

#

Right now I don't know what the issue is, other than a vague Dashboard screenshot in a language I can't read

raw river
dense cobalt
#

If you can re-create the issue/error via the API that would be super helpful

raw river
#

now it's working thanks to your advice

dense cobalt
#

Oh, great ๐Ÿ™‚

peak valleyBOT
raw river
#

but why i can't see the application fee on the quotes?

dense cobalt
#

My guess is we don't include those on the PDFs

raw river
#

ok thanks

#

is there a way to display a legal notice when a freelancer's doesn't have to apply tva?

dense cobalt
raw river
#

ok and for the tva cool i create custom rates while creating the quote ?

echo summit
#

Hello ๐Ÿ‘‹
Catching up here