I’m making a call to the Update Invoices endpoint to change the due date on an existing scheduled invoice. The invoice is scheduled for 10/6/24 and I’m trying to update the due date to 1/31/25. When I make this call, I’m passing in both the ‘due_date’ and the ‘scheduled_at’ parameters. It returns the following error:
[{‘code’: ‘BAD_REQUEST’, ‘detail’: ‘Scheduled date must be before 2024-11-06’, ‘field’: ‘invoice.scheduled_at’, ‘category’: ‘INVALID_REQUEST_ERROR’}]
I retried the API call, changing the date to 11/1/24 and it returned successfully. Is there a limit when changing the due date via the API that it can only move 1 month into the future?
This invoice was originally created as part of a monthly recurring invoice.
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:
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, there is a limitation when updating the due date of a scheduled invoice. The new due date can only be set to a maximum of one month in the future from the original due date. This is why your API call was successful when you changed the date to 11/1/24 (which is within one month of the original due date of 10/6/24) but failed when you tried to set it to 1/31/25 (which is more than one month in the future from the original due date). This limitation applies to all invoices, including those that are part of a monthly recurring series.
Thank you for confirming. From the Square UI, when I click Edit on a recurring series there’s a field called “Next invoice” which I can change to any future date. Is there a way to perform this action via an API call? I have a use case where my customers typically pay monthly via recurring invoices, but sometimes need to skip a few months before resuming their recurring payments. I currently change this date manually, but am looking to automate it via API calls.
Currently, the ability to update recurring invoices with the API isn’t currently available. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.
Thanks for confirming and passing along the feedback to the API team. I know the Subscriptions APIs now exist and have a Pause and Resume feature, which is exactly what I would need. Unfortunately, there are limitations in the Subscriptions API that make it unusable for me. (1) It doesn’t have the ability to enable customers to save a card on file when it sends an invoice, (2) It doesn’t allow you to enable other payment options (like ACH), (3) It doesn’t provide a way to add text to the Message section of the invoice.