#.dylana
1 messages · Page 1 of 1 (latest)
Hello 👋
What do you mean by siret number exactly?
Ah its something France specific
I don't think we have a separate field for the SIRET number
Are you looking to create quotes and invoices via the API or the Dashboard?
api
Gotcha.
For a quote, I believe you can set it in the header or footer
https://stripe.com/docs/api/quotes/create#create_quote-footer
https://stripe.com/docs/api/quotes/create#create_quote-header
For invoices, you can use Custom Fields
https://stripe.com/docs/invoicing/customize#custom-fields
https://stripe.com/docs/api/invoices/create#create_invoice-custom_fields
but could I set custom the style using html or special characters like \n
I don't think those fields support anything other than text format, so no. You can't use custom styling unfortunately.
oh
and another thing when accepting a quote does the invoice will be generated with the same information used in the quote ?
I believe so, yes.
You can give it a try in test mode to confirm
So i tried and nothing is showing up when creating the invoice
Can you share an example?
export const createStripeQuote = async ({ products, sellerId, customerId }: IStripeQuote) => {
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
}
const quote = await stripe.quotes.create({
customer: customerId,
line_items: parseProductToLine(),
on_behalf_of: sellerId,
header: 'test header',
metadata: { test: 'test' },
footer: 'test footer',
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
}
How did you create the invoice from the quote?
from the button turn into invoice
Where are you seeing the button to convert it into an invoice?
I created a test quote and I don't see it 🤔
ah its draft, give me a second
huh you're right. It doesn't pass through the same information to the invoice.
One thing I observed is that it creates the invoice in draft state so I believe the workaround here would be to update the invoice separately by calling the API once you convert the quote to an invoice and add in a custom field for the SIRET number
So i have to use custom field data in invoice ?
Yes OR you can also update the description if that's where you want to set the number
https://stripe.com/docs/api/invoices/update?lang=node#update_invoice-description
I tried and the result is not really pro
not sure I follow "not really pro" 😅
Is it not adding the SIRET number?
yes it's but i have a list of thing that the french law need and it's look awfull on the quote or invoice
If you want to show it as a list then you can add it as four separate custom fields instead
maybe that would render it a bit better
yes for the invoice but not for the quote right ?
yes, quotes don't have custom fields support yet 😦
I can definitely file a feature request for that
the link doesn't highlight the part you were looking at, mind sharing a screenshot instead?
oh it's about law in europe and they have a differente invoice, is it possible to have this one ?