#sohail_api
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/1380172355577446526
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hey, I create invoices on 1st day of a month for previous month so I need the date on invoice of previous month but looks like I can't change the invoice date, can someone help me find a solution for this issue?
I couldn't find any date param on stripe invoice create api
Hi, what is your use case? Are you just creating the invoice by using the Create an Invoice API endpoint? If so, did you try https://docs.stripe.com/api/invoices/create?api-version=2025-05-28.basil#create_invoice-effective_at ?
The date when this invoice is in effect. Same as finalized_at unless overwritten. When defined, this value replaces the system-generated ‘Date of issue’ printed on the invoice PDF and receipt.
If you're referring to editing an invoice the fact, you can only edit some aspects of it. We document it here: https://docs.stripe.com/invoicing/invoice-edits?testing-method=api
Yes I am using the above api for creating invoice but I need to pass custom date while creating the invoice
I have a prepaid model where I charge customers on let's say May 1 and give them invoice of may on June 1, now since I create invoice on June 1 the date on invoice is June 1 but I need the date on invoice to be of May 1
is there any way I can change the date of invoice while creating invoice using stripe invoice create api?
Have you already tried https://docs.stripe.com/api/invoices/create?api-version=2025-05-28.basil#create_invoice-effective_at ?
no okay let me try this
I just tested that on my end, and I think that is what you'd want.
Invoice date May 5, 2025 is what I see on the invoice if I pass that on that param.
You can also pass in a due date: https://docs.stripe.com/api/invoices/create?api-version=2025-05-28.basil#create_invoice-due_date
oh great let me try it, thanks for your help
Sure
It works, thanks but I also want to change date of mark it as paid, is it possible?
You can padd the due date but not the paid date
I can't use due date since I am not using collection_method=send_invoice
so there's no way to mark invoice as paid in the past?
No there is not
okay, do you have any suggestions for my problem? I charge clients on may 1 so I wanted to mark invoice as paid on may 1 but since I generate and finalize the invoice on june 1, it will have mark as paid on june 1
Anyways your suggestion of effective_at is really helpful to atleast get invoice date of may 1
That is not possible I'm afraid to change to paid date.
oh okay no worries, thanks for your help
Sure
@high glen Just one more question is there any way I can remove all the dates of invoice except just invoice date which is created using effective_at?
No that is not supported