#nerder_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1245893131044388926
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
One attempt i've done is using invoice_settings.custom_fields
While this works correctly and adds the value to the invoice, then the value is not present in the export for some reason
And give where the invoice template places it I guess that it (up top) I don't think is meant to be used this way
How are these invoices created? Is it one-time invoice or the invoice from subscription?
then the value is not present in the export for some reason
What do you mean by the export here?
Could you illustrate the scenario in an example invoice (in_xxx)?
the export as CSV that you can do for invoices
yes one sec
in_1PMIz4LAVB3C1lDIWwgBfJxY
you can see the details here
my invoice_settings.custom_fields['TIN'] is added up top
but my intention was to add an extra filed under the customer information (so under Bill to)
What do you mean by the export here?
And by export I mean the CSV export of the invoices
Thanks for sharing! The custom fields on the invoice will be shown at the top of the invoice
I'm afraid if it's not possible to add custom tax ID under Bill to section
Ok, then I guess is just not possible to add any text at all
my second best option will be invoice.metadata then
metadata won't be shown on the invoice, but it'll be helpful for your own reference
Yes, but I see that they will be added in the CSV export
so that might work actually
You can custom Tax ID in both custom fields and metadata, so that tax ID can be shown on invoice and exported CSV
ok that is one option
another qq
does the customer.description appears in the Invoice?
It only appears if the customer name is not set
if the customer name is set, description on the customer won't be shown
Ok too bad
all other solutions I can think off are quite hackinsh
but why the validation on the Tax ID is so strict anyway?
I mean, is not like there is an actual validation going on
we actually do validate it in for certain scenarios : https://docs.stripe.com/tax/invoicing/tax-ids#validation
ok it make sense
Is just thought for business customers only
but now that i'm checking there is no actual way to set the metadata of the invoice when creating a subscription
Is the invoice taking the ones from the subscription instead?
in the CSV export there is the column for the metadata of the subscription, but is always empty
can you share the subscription id where you tried setting the metadata?
you can check this one: sub_1PMJS3LAVB3C1lDIiz5XaI9J
Are you exporting CSV of the invoice or subscription?
invoice
This is expected. Stripe doesn't copy metadata from one object to another [0], i.e. metadata on subscription doesn't get copied to invoice
You'd need to manually update the metadata on the invoice object itself. Your system could listen to invoice.created event and update the metadata on the Invoice, so that the metadata will be shown in the CSV export
ok i see
I was mislead by the fact that I saw the column there
achieving this is quite a lot of work
seems like i'm fighting agains the system
as of now, tax ID is only supported on the business, so this is the only workaround