While using the production API I MUST be able to download the PDF of the API to send directly to the customer, or have the Invoice PDF with the initial email. The Square API links cannot pass the customers Mail system, nor can the customer pay without a PHYSICAL invoice. they then pay via EFT.
we are starting to do business with larger corporations with automated accounting systems. To get paid, they want a PDF invoice sent to a specific email, they then pay us from that.
so to do this now, we have to download the PDF attach to the email and send. This cannot be done easily because we are mobile and working onsite all the time.
We currently use Webhooks with our signing app to handle the contracts with a different service, so we want to add the Square invoice API webhook to also send them the required invoice PDF from a webhook callback.
So, the use case…
Create the invoice on the app. (which is usually just a copy of an existing one)
Webhook reports the invoice is created to our webhook callback script
Webhook Callback grabs the invoice ID and download the PDF (this is the issue we are trying to solve)
Webhook Callback attaches the newly downloaded PDF to an email and sends it
The customers accounting system gets the email with the attached PDF
Profit
I am more than happy to do whatever is required on the API to download a PDF of the Invoice, but I cannot login to the dashboard, download the PDF, create an email, attach it to the email then send, all from the job site.
Thanks for the detailed explanation. At this time there isn’t a way to programmatically download the invoice with our APIs. 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.
I wanted to follow up and ask if there has been any update on this. Is there currently any way, even via a different endpoint or workaround, to programmatically download the invoice PDF through the API?
We urgently need this capability for a production use case, as we must automatically retrieve and store the official invoice PDF after payment is completed.
If this is still not supported, could you confirm whether it’s on the roadmap or if there’s any recommended approach for production environments?
I had to re-implement the entire invoice in my own PDF. I used FPDF, but there are quite a few others out there that you can use.
They intentionally also make it very difficult to try and programmatically get the PDF of the invoice. If you are logged into the UI, you can batch download them with a script, but not with the API. If you try (as many have) to use the public link in the API response and try to detect the “Download PDF” link, it will require the script to be able to handle javascript context like a browser would. It also changes the URL link for the invoice every time you reload the page..
Im having a really hard time understanding why they don’t allow this, allowing this in the API is rather trivial because it’s already implemented in the app and the web ui. There must be a business reason for it.
I had investigated moving straight to quickbooks for invoicing and accounting and its very feasible, but haven’t taken the time to get it done.
Ive been building automation and integrations for 20+ years and its not the first time a company introduces friction to customers who are trying to get the best out of a product.