Using the square API, I am able to create my invoices, publish my invoices but I seem to be having a problem getting my dates to work out the way that I want them to. I am usually processing my invoices the day before they are due, 1st or 15th, so processing them on the 14th or last day of the month. I notice that when I manually type in an invoice and I pick the 15th for the scheduled day and the 15th for the charge card on file, it says pay upon receipt. For me to do this when I am processing my invoices through the API, do I set the scheduled date and the due date the same, the 15th?
due date format: 2025-03-15
scheduled date format: 2025-03-15T00:02:45.883Z
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Create and Publish Invoices
Working with Dates
Pay or Refund Invoices
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Yes, you can set both the scheduled date and the due date to the 15th. The scheduled date is when the invoice is sent to the customer and the due date is when the payment is due. If you want the invoice to be paid upon receipt, you can set both dates to be the same. However, please note that the scheduled date should be in the format “YYYY-MM-DDTHH:MM:SS.sssZ” and the due date should be in the format “YYYY-MM-DD”. So for your example, you can set the due date as “2025-03-15” and the scheduled date as “2025-03-15T00:00:00Z”.
This answer was reviewed by @Bryan-Square.