#peterm_invoice-numbers
1 messages ยท Page 1 of 1 (latest)
๐ 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/1230174698277703824
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Good question, I am not sure if this is possible with our invoices API at the moment. Is the issue basically that even if you set a numerical prefix we still insert a dash between that and the invoice's specific number?
the number has to be exactly 10 numbers, and the number part from the stripe invoice numbering schema adds one more position every 10^n + 1 number, so it will either be under 10 symbols or over 10 symbols. The dash I think is not a problem.
Can I do something with the custom fields ? Or by the time the number is generated by Stripe it's too late ?
Gotcha, unfortunately I don't think the length of our invoice numbers can be changed. So yes that may make more sense to set as your own custom field. I'm not sure how that would work out regulation-wise but that would work API-wise
but we have to generate the number ourselves, we can't rely on stripe to give me the next number in the sequence ?
๐ hopping in here - yes, you'd be responsible for generating the number yourself
Also want to note that we do offer the ability to pass in the number when you create the Invoice (https://docs.stripe.com/api/invoices/create#create_invoice-number)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
peterm_invoice-numbers
Well since the invoices are generated for subscriptions, I assume I can just used the invoice being in draft state, ( forgot the actual event name ) and set number then ?
Yeah if the Invoice is still a draft then you should be able to update the Invoice and set the number
ok. and the invoice.finalized event will not override if it was already set, correct?
correct
ok , got it thanks. Are there any plans for future improvements regarding invoice numbering schemas ? Making it a bit more flexible ? Zero padding and numbers should be quite common I would assume.
As far as I know there isn't anything specific planned, but you're welcome to write into support (https://support.stripe.com/contact) to check in - I believe the ability to specify your own number during Invoice creation was what we chose to offer so that users could customeize the numbering scheme as much as they needed to
I understand, thanks I will drop a message to support