#.dylana
1 messages ยท Page 1 of 1 (latest)
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)
You can apply tax_rates to line_items: https://stripe.com/docs/api/quotes/create#create_quote-line_items-tax_rates
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 ?
const line = { price: product.default_price as string, quantity: 1, tax_rates: [...] }
ok and what should i put into tax_rates ?
The IDs of Tax Rate objects: https://stripe.com/docs/billing/taxes/tax-rates
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 ?
You can add a description to the Quote: https://stripe.com/docs/api/quotes/create#create_quote-description
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Hello so i was asking for setting global tax-rates on my quote
you can set that using https://stripe.com/docs/api/quotes/create#create_quote-default_tax_rates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if you want a global (default) tax rate on your quote then yes
your tax rate
as a number ?
no as a tax rate object https://stripe.com/docs/api/tax_rates/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
more precisely tax rate ID
but my quote is sent via on_behalf_of does that make a difference ?
Does it make a difference to what?
Because each of the connected accounts can have different taxes rates depending on the service provided
Then you need to account for that by creating all appropriate Tax Rates and applying them when required
where could i create that ?
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
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Ah, this is in the Dashboard?
yes but i'm trying first via the dashboard
Maybe you can't do what you want to do then
oh so what can i do ?
Well, what is it you're trying to achieve?
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
Ok, but you're doing destination charges yes? (i.e. passing transfer_data)
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
}
Ok, and if you add default_tax_rates what happens?
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
If you can re-create the issue/error via the API that would be super helpful
now it's working thanks to your advice
Oh, great ๐
but why i can't see the application fee on the quotes?
My guess is we don't include those on the PDFs
ok thanks
is there a way to display a legal notice when a freelancer's doesn't have to apply tva?
The footer maybe? https://stripe.com/docs/api/quotes/create#create_quote-footer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok and for the tva cool i create custom rates while creating the quote ?
Hello ๐
Catching up here