Collecting invoices from websites and services automatically

· GitHub ·

2 min read Original article ↗

Introduction

If you have a company and you need to collect all the invoices (e.g. PDF) from different websites and services for accounting reasons, that may take a lot of time. It's especially time consuming if you have many recurrent invoices (e.g. monthly invoices from many different services).

Downloading the invoices (e.g. PDF) from all the websites takes a lot of time. Some websites send the invoices by email, some websites don't and everyone does it in a different way.

I propose a simple protocol to collect the invoices automatically.

Proposed Solution

Let's say that company Alpha is a customer of company Beta. Sometimes Beta needs to send a PDF invoice to Alpha.

Alpha logs in to the dashboard of the service provider Beta and in the billing section adds a URL like:

https://example.com/collect/invoices/LONG_RANDOM_TOKEN

Then Beta can send a normal HTTP POST request with the PDF file (or any other format) whenever generates a new invoice (beside other methods like sending the PDF by email, which can coexist).

Alpha uses the normal HTTP status codes for a semantic response.

Alpha gives a URL with a different LONG_RANDOM_TOKEN to each authorized service, so that they can be sure about the origin of the request.

Privacy & Security Considerations

No considerable privacy or security concerns are expected, but we welcome community feedback.